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.
Method of the class: Action_Command{}
No Hooks.
Returns
null. Nothing (null).
Usage
$Action_Command = new Action_Command(); $Action_Command->cancel( $args, $assoc_args );
- $args(array) (required)
- Positional arguments.
- $assoc_args(array) (required)
- Keyed arguments.
Action_Command::cancel() Action Command::cancel code WC 10.6.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();
}