Automattic\WooCommerce\Caches
OrderCountCacheService::refresh_cache
Deprecated since 0.7.0. It is no longer supported and may be removed in future releases. Use
d for handling `woocommerce_refresh_order_count_cache` actions instead.Refresh the cache for a given order type.
Method of the class: OrderCountCacheService{}
No Hooks.
Returns
null. Nothing (null).
Usage
$OrderCountCacheService = new OrderCountCacheService(); $OrderCountCacheService->refresh_cache( $order_type );
- $order_type(string) (required)
- The order type.
Changelog
| Deprecated since 10.7.0 | Was used for handling woocommerce_refresh_order_count_cache actions. |
OrderCountCacheService::refresh_cache() OrderCountCacheService::refresh cache code WC 10.9.4
public function refresh_cache( $order_type ) {
$this->order_count_cache->flush( $order_type );
OrderUtil::get_count_for_type( $order_type );
}