-
Notifications
You must be signed in to change notification settings - Fork 117
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
Feature: adding the --ignore-group CLI option #784
Closed
ovidiul
wants to merge
29
commits into
woocommerce:trunk
from
thinkovi:feature_ignore_group_cli_addon
Closed
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
4515bbc
adding --exclude-group CLI option and adding comma for supporting mul…
ovidiul 56050a2
removing empty array values from group array
ovidiul 5cd4940
renaming EXCLUDED_GROUP_PREFIX const to EXCLUDE_GROUP_FLAG
ovidiul 440204c
renaming exclude to ignore namings
ovidiul e27831f
renaming exclude to ignore namings
ovidiul c75caec
comments fix
ovidiul b4a5a52
code refactoring if statement
ovidiul 5190367
code refactoring if statement
ovidiul d16c502
code refactoring if statement
ovidiul 0b31d94
code refactoring if statement
ovidiul e8548dc
adding comments
ovidiul 21de107
code refactoring
ovidiul 9f05104
query fix group selection
ovidiul 6685173
query fix group selection
ovidiul 7d4bf23
cli logic fix
ovidiul 6066d44
adding code logic where query
ovidiul 82b8096
code refactoring
ovidiul 2843308
code refactoring
ovidiul 2eb6c04
Update classes/abstracts/ActionScheduler_Store.php
ovidiul c3b2484
Update classes/abstracts/ActionScheduler_Store.php
ovidiul e16a172
Update classes/abstracts/ActionScheduler_Store.php
ovidiul 641cf31
Update classes/data-stores/ActionScheduler_DBStore.php
ovidiul 3325571
Update classes/data-stores/ActionScheduler_DBStore.php
ovidiul 477373b
renaming mark_group_for_exclussion method
ovidiul 85bf9fa
esc_sql sanitize_group_name and regex addon ^
ovidiul 8699ef1
adding --ignore-group docs
ovidiul 0f25f07
Update wp-cli.md
ovidiul b9c9dd7
Update wp-cli.md
ovidiul b3f60cd
Merge branch 'trunk' into feature_ignore_group_cli_addon
ovidiul File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,8 @@ These are the commands available to use with Action Scheduler: | |
* `--batch-size` - This is the number of actions to run in a single batch. The default is `100`. | ||
* `--batches` - This is the number of batches to run. Using 0 means that batches will continue running until there are no more actions to run. | ||
* `--hooks` - Process only actions with specific hook or hooks, like `'woocommerce_scheduled_subscription_payment'`. By default, actions with any hook will be processed. Define multiple hooks as a comma separated string (without spaces), e.g. `--hooks=woocommerce_scheduled_subscription_trial_end,woocommerce_scheduled_subscription_payment,woocommerce_scheduled_subscription_expiration` | ||
* `--group` - Process only actions in a specific group, like `'woocommerce-memberships'`. By default, actions in any group (or no group) will be processed. | ||
* `--group` - Process only actions in a specific group, like `'woocommerce-memberships'`. By default, actions in any group (or no group) will be processed. Accepts comma-separated list of groups to filter by. Adding --*IGNORE*-- in front of a group will cause it to be ignored. | ||
* `--ignore-group` - Ignore processing actions from groups found inside the comma separated list of values. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice, thank you 👍 |
||
* `--force` - By default, Action Scheduler limits the number of concurrent batches that can be run at once to ensure the server does not get overwhelmed. Using the `--force` flag overrides this behavior to force the WP CLI queue to run. | ||
|
||
The best way to get a full list of commands and their available options is to use WP CLI itself. This can be done by running `wp action-scheduler` to list all Action Scheduler commands, or by including the `--help` flag with any of the individual commands. This will provide all relevant parameters and flags for the command. | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Asking this without actually testing 😅 ... but, won't the group ID arrays at this point be comma separated strings without quotation? That is, we will get:
Instead of:
If so, we should add quoting at some suitable point.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The $include_group_ids will actually contain the numerical ID's of each group found in the DB, taken from above line
so I don't think we need to add any quotes here...