woocommerce_analytics_report_should_use_cache filter-hookWC 1.0

Determines if a report will utilize caching.

Usage

add_filter( 'woocommerce_analytics_report_should_use_cache', 'wp_kama_woocommerce_analytics_report_should_use_cache_filter', 10, 2 );

/**
 * Function for `woocommerce_analytics_report_should_use_cache` filter-hook.
 * 
 * @param bool   $use_cache Whether or not to use cache.
 * @param string $cache_key The report's cache key. Used to identify the report.
 *
 * @return bool
 */
function wp_kama_woocommerce_analytics_report_should_use_cache_filter( $use_cache, $cache_key ){

	// filter...
	return $use_cache;
}
$use_cache(true|false)
Whether or not to use cache.
$cache_key(string)
The report's cache key. Used to identify the report.

Where the hook is called

DataStore::should_use_cache()
woocommerce_analytics_report_should_use_cache
woocommerce/src/Admin/API/Reports/DataStore.php 195
return (bool) apply_filters( 'woocommerce_analytics_report_should_use_cache', true, $this->cache_key );

Where the hook is used in WooCommerce

Usage not found.