WordPress at Your Fingertips
function is not described

WC_Action_Queue::add() public WC 1.0

Enqueue an action to run one time, as soon as possible

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

No Hooks.


String. The action ID.


$WC_Action_Queue = new WC_Action_Queue();
$WC_Action_Queue->add( $hook, $args, $group );
$hook(string) (required)
The hook to trigger.
Arguments to pass when the hook triggers.
Default: array()
The group to assign this job to.
Default: ''

Code of WC_Action_Queue::add() WC 5.9.0

public function add( $hook, $args = array(), $group = '' ) {
	return $this->schedule_single( time(), $hook, $args, $group );