Automattic\WooCommerce\Caches

ProductCountCacheService::schedule_background_actionspublicWC 1.0

Register background caching for each product type.

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

Хуков нет.

Возвращает

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

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

$ProductCountCacheService = new ProductCountCacheService();
$ProductCountCacheService->schedule_background_actions(): void;

Код 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 );
}