Automattic\WooCommerce\Caches
ProductCountCache::increment
Increment the cache value for a given product type and status.
Метод класса: ProductCountCache{}
Хуков нет.
Возвращает
int|false.
Использование
$ProductCountCache = new ProductCountCache(); $ProductCountCache->increment( $product_type, $product_status, $offset );
- $product_type(строка) (обязательный)
- The post type (e.g.
'product', 'product_variation'). - $product_status(строка) (обязательный)
- The status of the product.
- $offset(int)
- The amount to increment by.
По умолчанию:1
Код ProductCountCache::increment() ProductCountCache::increment WC 11.2.2
public function increment( string $product_type, string $product_status, int $offset = 1 ) {
return wp_cache_incr( $this->get_cache_key( $product_type, $product_status ), $offset );
}