ActionScheduler_ActionFactory::single()publicWC 1.0

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

Хуков нет.


int. The ID of the stored action


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

Код ActionScheduler_ActionFactory::single() WC 6.9.4

public function single( $hook, $args = array(), $when = null, $group = '' ) {
	$date = as_get_datetime_object( $when );
	$schedule = new ActionScheduler_SimpleSchedule( $date );
	$action = new ActionScheduler_Action( $hook, $args, $schedule, $group );
	return $this->store( $action );