WC_Action_Queue::add( string $hook, array $args = array(), string $group = '' )

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


Description Description


Parameters Parameters

$hook

(Required) The hook to trigger.

$args

(Optional) Arguments to pass when the hook triggers.

Default value: array()

$group

(Optional) The group to assign this job to.

Default value: ''


Top ↑

Return Return

(string) The action ID.


Top ↑

Source Source

File: includes/queue/class-wc-action-queue.php

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


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.