Automattic\WooCommerce\Caches

ProductCountCacheService::prime_cache_if_coldpublicWC 1.0

Primes the product count cache for a given post type when it is cold.

Method of the class: ProductCountCacheService{}

No Hooks.

Returns

null. Nothing (null).

Usage

$ProductCountCacheService = new ProductCountCacheService();
$ProductCountCacheService->prime_cache_if_cold( $product_type ): void;
$product_type(string)
The product post type.
Default: 'product'

ProductCountCacheService::prime_cache_if_cold() code WC 11.0.0

public function prime_cache_if_cold( string $product_type = 'product' ): void {
	// Until persistent counters reactivated, this task is no-op.
}