WC_Action_Queue::add
Enqueue an action to run one time, as soon as possible
Метод класса: WC_Action_Queue{}
Хуков нет.
Возвращает
int. The action ID.
Использование
$WC_Action_Queue = new WC_Action_Queue(); $WC_Action_Queue->add( $hook, $args, $group );
- $hook(строка) (обязательный)
- The hook to trigger.
- $args(массив)
- Arguments to pass when the hook triggers.
По умолчанию:array() - $group(строка)
- The group to assign this job to.
По умолчанию:''
Код WC_Action_Queue::add() WC Action Queue::add WC 11.0.0
public function add( $hook, $args = array(), $group = '' ) {
return $this->schedule_single( time(), $hook, $args, $group );
}