Action_Scheduler\WP_CLI
Action_Command::cancel
Cancel the next occurrence or all occurrences of a scheduled action.
OPTIONS
- [<hook>]
- Name of the action hook.
- [--group=<group>]
- The group the job is assigned to.
- [--args=<args>]
- JSON object of arguments assigned to the job.
--- default: []
--- - [--all]
- Cancel all occurrences of a scheduled action.
Метод класса: Action_Command{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$Action_Command = new Action_Command(); $Action_Command->cancel( $args, $assoc_args );
- $args(массив) (обязательный)
- Positional arguments.
- $assoc_args(массив) (обязательный)
- Keyed arguments.
Код Action_Command::cancel() Action Command::cancel WC 10.0.2
public function cancel( array $args, array $assoc_args ) { require_once 'Action/Cancel_Command.php'; $command = new Action\Cancel_Command( $args, $assoc_args ); $command->execute(); }