Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --all flag to cron event delete #98

Merged
merged 12 commits into from
Feb 13, 2024

Conversation

Mike-Hermans
Copy link
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 Add --all flag to cron event delete Jun 8, 2023
features/cron.feature Outdated Show resolved Hide resolved
src/Cron_Event_Command.php Outdated Show resolved Hide resolved
src/Cron_Event_Command.php Outdated Show resolved Hide resolved
src/Cron_Event_Command.php Outdated Show resolved Hide resolved
@janw-me
Copy link
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
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
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Suggestion, add a --all flag to wp cron delete
4 participants