WC_Admin_Report::set_cached_query
Set the cached query result.
Метод класса: WC_Admin_Report{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->set_cached_query( $query_hash, $data );
- $query_hash(строка) (обязательный)
- The query hash.
- $data(разное) (обязательный)
- The data to cache.
Код WC_Admin_Report::set_cached_query() WC Admin Report::set cached query WC 11.3.0
protected function set_cached_query( $query_hash, $data ) {
$class = strtolower( get_class( $this ) );
if ( ! isset( self::$cached_results[ $class ] ) ) {
self::$cached_results[ $class ] = get_transient( $class );
}
if ( false === self::$cached_results[ $class ] ) {
self::$cached_results[ $class ] = array();
}
self::add_update_transients_hook();
self::$transients_to_update[ $class ] = $class;
self::$cached_results[ $class ][ $query_hash ] = $data;
}