Automattic\WooCommerce\Caches
OrderCountCacheService::refresh_cache
Устарела с версии 0.7.0. Больше не поддерживается и может быть удалена. Используйте
d for handling `woocommerce_refresh_order_count_cache` actions.Refresh the cache for a given order type.
Метод класса: OrderCountCacheService{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$OrderCountCacheService = new OrderCountCacheService(); $OrderCountCacheService->refresh_cache( $order_type );
- $order_type(строка) (обязательный)
- The order type.
Список изменений
| Устарела с 10.7.0 | Was used for handling woocommerce_refresh_order_count_cache actions. |
Код OrderCountCacheService::refresh_cache() OrderCountCacheService::refresh cache WC 10.9.4
public function refresh_cache( $order_type ) {
$this->order_count_cache->flush( $order_type );
OrderUtil::get_count_for_type( $order_type );
}