Automattic\WooCommerce\Internal\EmailEditor\WCTransactionalEmails
WCEmailTemplateAutoApplier::schedule
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.
Method of the class: WCEmailTemplateAutoApplier{}
No Hooks.
Returns
null. Nothing (null).
Usage
$result = WCEmailTemplateAutoApplier::schedule(): void;
Changelog
| Since 10.8.0 | Introduced. |
WCEmailTemplateAutoApplier::schedule() WCEmailTemplateAutoApplier::schedule code 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 );
}