Automattic\WooCommerce\Caches

OrderCountCache::incrementpublicWC 1.0

Increment the cache value for a given order status.

Method of the class: OrderCountCache{}

No Hooks.

Returns

Int. The new value of the cache.

Usage

$OrderCountCache = new OrderCountCache();
$OrderCountCache->increment( $order_type, $order_status, $offset );
$order_type(string) (required)
The type of order.
$order_status(string) (required)
The status of the order.
$offset(int)
The amount to increment by.
Default: 1

OrderCountCache::increment() code WC 10.7.0

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 );
}