woocommerce_analytics_report_should_use_cache хук-фильтр . WC 1.0
Determines if a report will utilize caching.
Использование
add_filter( 'woocommerce_analytics_report_should_use_cache', 'filter_function_name_1197', 10, 2 ); function filter_function_name_1197( $use_cache, $cache_key ){ // filter... return $use_cache; }
- $use_cache(true|false)
- Whether or not to use cache.
- $cache_key(строка)
- The report's cache key. Used to identify the report.
Где вызывается хук
woocommerce_analytics_report_should_use_cache
woocommerce/packages/woocommerce-admin/src/API/Reports/DataStore.php 143
return (bool) apply_filters( 'woocommerce_analytics_report_should_use_cache', true, $this->cache_key );