Skip to content

Add --all flag to cron event delete#98

Merged
danielbachhuber merged 12 commits intowp-cli:mainfrom
Mike-Hermans:add-all-flag-to-delete
Feb 13, 2024
Merged

Add --all flag to cron event delete#98
danielbachhuber merged 12 commits intowp-cli:mainfrom
Mike-Hermans:add-all-flag-to-delete

Conversation

@Mike-Hermans
Copy link
Copy Markdown
Contributor

This is a redo of #81

Fixes #39 by making the command more consistent with the wp cron event run command.

It is now possible to delete multiple cron events at once by either:

  • Specifying multiple hooks that need to be deleted:
$ wp cron event delete wp_version_check wp_update_plugins
  • Delete all cron events that are due now
$ wp cron event delete --due-now
  • Delete all cron events at once
$ wp cron event delete --all

Since the selection process of the run and delete command is now the same, a separate function has been added to filter the required hooks (::get_selected_cron_events()).

This function now also includes support for the --exclude parameter added in #97.

@Mike-Hermans Mike-Hermans requested a review from a team as a code owner June 8, 2023 09:06
@schlessera schlessera changed the title Add all flag to delete Jun 8, 2023
@Mike-Hermans Mike-Hermans requested a review from schlessera June 8, 2023 13:12
@janw-me
Copy link
Copy Markdown
Member

janw-me commented Nov 10, 2023

I took another look at the out of sync files and corrected them.
@Mike-Hermans feel free to take a second look.
All should be well. As far as I'm concerned this can be merged.

@schlessera can you confirm your review conflicts are now resolved?

@danielbachhuber danielbachhuber added this to the 2.3.0 milestone Feb 13, 2024
Copy link
Copy Markdown
Member

@danielbachhuber danielbachhuber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your work on this, @Mike-Hermans !

@danielbachhuber danielbachhuber dismissed schlessera’s stale review February 13, 2024 22:03

Changes have been addressed

@danielbachhuber danielbachhuber merged commit 46e49e2 into wp-cli:main Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment