Automattic\WooCommerce\Internal\EmailEditor\WCTransactionalEmails

WCEmailTemplateAutoApplier::schedulepublic staticWC 10.8.0

Enqueue the batched auto-apply runner as an Action Scheduler async action.

Hooked to woocommerce_email_template_divergence_sweep_complete. The as_has_scheduled_action() guards against double-enqueueing when the detector sweep runs twice in one request — once on woocommerce_updated, once on BACKFILL_COMPLETE_ACTION.

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

Хуков нет.

Возвращает

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

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

$result = WCEmailTemplateAutoApplier::schedule(): void;

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

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

Код WCEmailTemplateAutoApplier::schedule() WC 10.9.1

public static function schedule(): void {
	if ( as_has_scheduled_action( self::AUTO_APPLY_AS_HOOK, array(), self::AUTO_APPLY_AS_GROUP ) ) {
		return;
	}

	as_enqueue_async_action( self::AUTO_APPLY_AS_HOOK, array(), self::AUTO_APPLY_AS_GROUP );
}