Automattic\WooCommerce\Caches
ProductCountCache::get_cache_key
Get the cache key for a given product type and status.
Method of the class: ProductCountCache{}
No Hooks.
Returns
String.
Usage
// private - for code of main (parent) class only $result = $this->get_cache_key( $product_type, $product_status ): string;
- $product_type(string) (required)
- The post type (e.g.
'product', 'product_variation'). - $product_status(string) (required)
- The status of the product.
ProductCountCache::get_cache_key() ProductCountCache::get cache key code WC 11.0.0
private function get_cache_key( string $product_type, string $product_status ): string {
return $this->cache_prefix . '_' . $product_type . '_' . $product_status;
}