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.

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

Хуков нет.


int. The ID of the stored action.


$ActionScheduler_ActionFactory = new ActionScheduler_ActionFactory();
$ActionScheduler_ActionFactory->async( $hook, $args, $group );
$hook(строка) (обязательный)
The hook to trigger when this action runs.
Args to pass when the hook is triggered.
По умолчанию: array()
A group to put the action in.
По умолчанию: ''

Код ActionScheduler_ActionFactory::async() WC 7.7.2

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