WC_Action_Queue::add()
Enqueue an action to run one time, as soon as possible
Method of the class: WC_Action_Queue{}
No Hooks.
Return
String
. The action ID.
Usage
$WC_Action_Queue = new WC_Action_Queue(); $WC_Action_Queue->add( $hook, $args, $group );
- $hook(string) (required)
- The hook to trigger.
- $args(array)
- Arguments to pass when the hook triggers.
Default: array() - $group(string)
- The group to assign this job to.
Default: ''
WC_Action_Queue::add() WC Action Queue::add code WC 9.7.1
public function add( $hook, $args = array(), $group = '' ) { return $this->schedule_single( time(), $hook, $args, $group ); }