ActionScheduler_ActionFactory::async()publicWC 1.0

Enqueue an action to run one time, as soon as possible (rather a specific scheduled time).

This method creates a new action using the NullSchedule. In practice, this results in an action scheduled to execute "now". Therefore, it will generally run as soon as possible but is not prioritized ahead of other actions that are already past-due.

Method of the class: ActionScheduler_ActionFactory{}

No Hooks.

Return

Int. The ID of the stored action.

Usage

$ActionScheduler_ActionFactory = new ActionScheduler_ActionFactory();
$ActionScheduler_ActionFactory->async( $hook, $args, $group );
$hook(string) (required)
The hook to trigger when this action runs.
$args(array)
Args to pass when the hook is triggered.
Default: array()
$group(string)
A group to put the action in.
Default: ''

ActionScheduler_ActionFactory::async() code WC 8.6.1

public function async( $hook, $args = array(), $group = '' ) {
	return $this->async_unique( $hook, $args, $group, false );
}