WC_Admin_Report::set_cached_query() protected WC 1.0
Set the cached query result.
{} Это метод класса: WC_Admin_Report{}
Хуков нет.
Возвращает
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 5.0.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( strtolower( get_class( $this ) ) );
}
self::add_update_transients_hook();
self::$transients_to_update[ $class ] = $class;
self::$cached_results[ $class ][ $query_hash ] = $data;
}