Ignore cached plugin data when checking if plugins are WooCommerce-aware #38836
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.
Submission Review Guidelines:
Changes proposed in this Pull Request:
If WooCommerce detects that one or more plugins are not compatible with an enabled feature, it tries to warn the merchant and provide a list of the relevant plugins. In some cases, though, the list may be empty (even if incompatible plugins are present):
This can happen if another plugin calls
get_plugins()
early in the request (before WooCommerce can filter it, and add WooCommerce header information to each plugin).Closes #37343.
How to test the changes in this Pull Request:
Please install, but do not activate, the following plugins (the zip file contains two single-file plugins):
💾 Download Test Plugins
Issue #37343 ▸ Plugin A
(test plugin A) is the plugin that causes the problem, by making a very early call toget_plugins()
.Issue #37343 ▸ Plugin B
(test plugin B) is a WooCommerce-aware plugin that declares incompatibility with HPOS.Once you've set things up, proceed as follows:
☝️ Note the presence of the inline notification, below plugin B, further calling attention to the fact that the incompatibility is with HPOS. This should also be present when the fix branch is applied.