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.
Changes proposed in this Pull Request:
WP 5.0.2, which was released yesterday, sets
$query_vars['post_status']
to an empty string instead of leaving it unset (https://core.trac.wordpress.org/ticket/45719 and https://core.trac.wordpress.org/changeset/44185). This change broke the WC orders list in the admin when listing orders of all post statuses as we were checking if$query_vars['post_status']
was not set to add all order statuses to this variable (includes/admin/list-tables/class-wc-admin-list-table-orders.php#L799).To workaround this problem, this commit introduces a change that verifies if
$query_vars['post_status']
is empty instead of verifying if it is not set.This PR also includes a separate commit to fix PHPCS violations in the modified file. I won't cherry-pick this commit when preparing the WC 3.5.3 release.
Closes #22271.
How to test the changes in this Pull Request:
Changelog entry