Automattic\WooCommerce\Caches

OrderCountCache::is_cached │ public │ WC 1.0

Check if the cache has a value for a given order type and status.

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

Хуков нет.

Возвращает

bool. True if the cache has a value, false otherwise.

Использование

$OrderCountCache = new OrderCountCache();
$OrderCountCache->is_cached( $order_type, $order_status );
$order_type(строка) (обязательный)
The type of order.
$order_status(строка) (обязательный)
The status of the order.

Код OrderCountCache::is_cached() WC 11.3.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;
}