Verified Commit 786fd593 authored by Erick Hitter's avatar Erick Hitter
Browse files

Fix returns, otherwise the default message turns up with other successes

parent e0f74269
......@@ -74,11 +74,13 @@ class Events extends \WP_CLI_Command {
// Remove a specific event
if ( isset( $assoc_args['event_id'] ) ) {
$this->delete_event_by_id( $args, $assoc_args );
return;
}
// Remove all events with a given action
if ( isset( $assoc_args['action'] ) ) {
$this->delete_event_by_action( $args, $action );
return;
}
\WP_CLI::error( __( 'Specify something to delete, or see the `cron-control-fixers` command to remove all data.', 'automattic-cron-control' ) );
......@@ -305,8 +307,6 @@ class Events extends \WP_CLI_Command {
}
\WP_CLI::error( sprintf( __( 'Failed to delete event %d. Please confirm that the entry exists and that the ID is that of an event.', 'automattic-cron-control' ), $jid ) );
return;
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment