Automattic\WooCommerce\Caches
ProductCountCacheService::schedule_background_actions
Register background caching for each product type.
Метод класса: ProductCountCacheService{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$ProductCountCacheService = new ProductCountCacheService(); $ProductCountCacheService->schedule_background_actions(): void;
Код ProductCountCacheService::schedule_background_actions() ProductCountCacheService::schedule background actions WC 11.0.1
public function schedule_background_actions(): void {
$frequency = HOUR_IN_SECONDS * 12;
$timestamp = time() + $frequency;
as_schedule_recurring_action( $timestamp, $frequency, self::BACKGROUND_EVENT_HOOK, array( 'product' ), 'count', true );
}