Automattic\WooCommerce\Caches

OrderCountCache::decrementpublicWC 1.0

Decrement the cache value for a given order status.

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

Хуков нет.

Возвращает

int. The new value of the cache.

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

$OrderCountCache = new OrderCountCache();
$OrderCountCache->decrement( $order_type, $order_status, $offset );
$order_type(строка) (обязательный)
The type of order.
$order_status(строка) (обязательный)
The status of the order.
$offset(int)
The amount to decrement by.
По умолчанию: 1

Код OrderCountCache::decrement() WC 10.3.6

public function decrement( $order_type, $order_status, $offset = 1 ) {
	$cache_key = $this->get_cache_key( $order_type, $order_status );
	return wp_cache_decr( $cache_key, $offset );
}