Automattic\WooCommerce\Caches
OrderCountCache::is_cached
Check if the cache has a value for a given order type and status.
Method of the class: OrderCountCache{}
No Hooks.
Returns
true|false. True if the cache has a value, false otherwise.
Usage
$OrderCountCache = new OrderCountCache(); $OrderCountCache->is_cached( $order_type, $order_status );
- $order_type(string) (required)
- The type of order.
- $order_status(string) (required)
- The status of the order.
OrderCountCache::is_cached() OrderCountCache::is cached code WC 10.7.0
public function is_cached( $order_type, $order_status ) {
$cache_key = $this->get_cache_key( $order_type, $order_status );
return wp_cache_get( $cache_key ) !== false;
}