Automattic\WooCommerce\Caches

OrderCountCacheService::flush_cache │ public │ WC 11.2.0

Flush the order count cache for all order types.

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

Хуков нет.

Возвращает

void. Ничего (null).

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

$OrderCountCacheService = new OrderCountCacheService();
$OrderCountCacheService->flush_cache();

Список изменений

С версии 11.2.0 Введена.

Код OrderCountCacheService::flush_cache() 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 );
	}
}