DataStore::should_use_cache()protectedWC 1.0

Whether or not the report should use the caching layer.

Provides an opportunity for plugins to prevent reports from using cache.

Метод класса: DataStore{}


true|false. Whether or not to utilize caching.


// protected - в коде основоного (родительского) или дочернего класса
$result = $this->should_use_cache();

Код DataStore::should_use_cache() WC 8.6.1

protected function should_use_cache() {
	 * Determines if a report will utilize caching.
	 * @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) apply_filters( 'woocommerce_analytics_report_should_use_cache', true, $this->cache_key );