as_enqueue_async_action()
Enqueue an action to run one time, as soon as possible
No Hooks.
Return
Int
. The action ID.
Usage
as_enqueue_async_action( $hook, $args, $group );
- $hook(string) (required)
- The hook to trigger.
- $args(array)
- Arguments to pass when the hook triggers.
Default: array() - $group(string)
- The group to assign this job to.
Default: ''
as_enqueue_async_action() as enqueue async action code WC 7.3.0
function as_enqueue_async_action( $hook, $args = array(), $group = '' ) { if ( ! ActionScheduler::is_initialized( __FUNCTION__ ) ) { return 0; } return ActionScheduler::factory()->async( $hook, $args, $group ); }