Automattic\WooCommerce\Caches

OrderCountCache::incrementpublicWC 1.0

Increment the cache value for a given order type and status.

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

Хуков нет.

Возвращает

int|false. The new value of the cache.

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

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

Код OrderCountCache::increment() WC 11.0.1

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