Action_Scheduler\WP_CLI

Action_Command::delete()publicWC 1.0

Delete existing scheduled action(s).

OPTIONS

<id>...
One or more IDs of actions to delete.
--- default: 0
---

EXAMPLES

# Delete the action with id 100
$ wp action-scheduler action delete 100
# Delete the actions with ids 100 and 200
$ wp action-scheduler action delete 100 200
# Delete the first five pending actions in 'action-scheduler' group
$ wp action-scheduler action delete $( wp action-scheduler action list --status=pending --group=action-scheduler --format=ids )

Method of the class: Action_Command{}

No Hooks.

Return

null. Nothing (null).

Usage

$Action_Command = new Action_Command();
$Action_Command->delete( $args, $assoc_args );
$args(array) (required)
Positional arguments.
$assoc_args(array) (required)
Keyed arguments.

Action_Command::delete() code WC 9.8.1

public function delete( array $args, array $assoc_args ) {
	require_once 'Action/Delete_Command.php';
	$command = new Action\Delete_Command( $args, $assoc_args );
	$command->execute();
}