Action_Scheduler\WP_CLI\Action
Delete_Command::on_action_deleted
Action: action_scheduler_deleted_action
Method of the class: Delete_Command{}
No Hooks.
Returns
null. Nothing (null).
Usage
$Delete_Command = new Delete_Command(); $Delete_Command->on_action_deleted( $action_id );
- $action_id(int) (required)
- Action ID.
Delete_Command::on_action_deleted() Delete Command::on action deleted code WC 10.5.0
public function on_action_deleted( $action_id ) {
if ( 'action_scheduler_deleted_action' !== current_action() ) {
return;
}
$action_id = absint( $action_id );
if ( ! in_array( $action_id, $this->action_ids, true ) ) {
return;
}
$this->action_counts['deleted']++;
\WP_CLI::debug( sprintf( 'Action %d was deleted.', $action_id ) );
}