WordPress at Your Fingertips
function is not described

ActionScheduler_ActionFactory::single() public WC 1.0

{} It's a method of the class: ActionScheduler_ActionFactory{}

No Hooks.


Int. The ID of the stored action


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

Code of ActionScheduler_ActionFactory::single() WC 6.1.1

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 );