Automattic\WooCommerce\Caches
OrderCountCacheService::flush_cache
Flush the order count cache for all order types.
Method of the class: OrderCountCacheService{}
No Hooks.
Returns
void. Nothing (null).
Usage
$OrderCountCacheService = new OrderCountCacheService(); $OrderCountCacheService->flush_cache();
Changelog
| Since 11.2.0 | Introduced. |
OrderCountCacheService::flush_cache() OrderCountCacheService::flush cache code WC 11.2.1
public function flush_cache() {
foreach ( wc_get_order_types( 'order-count' ) as $order_type ) {
$this->order_count_cache->flush( $order_type );
}
}