ActionScheduler_ActionFactory::single
Create single action.
Method of the class: ActionScheduler_ActionFactory{}
No Hooks.
Returns
Int. The ID of the stored action.
Usage
$ActionScheduler_ActionFactory = new ActionScheduler_ActionFactory(); $ActionScheduler_ActionFactory->single( $hook, $args, $when, $group );
- $hook(string) (required)
- The hook to trigger when this action runs.
- $args(array)
- Args to pass when the hook is triggered.
Default:array() - $when(int)
- Unix timestamp when the action will run.
Default:null - $group(string)
- A group to put the action in.
Default:''
ActionScheduler_ActionFactory::single() ActionScheduler ActionFactory::single code WC 10.6.2
public function single( $hook, $args = array(), $when = null, $group = '' ) {
return $this->single_unique( $hook, $args, $when, $group, false );
}