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

Ignore cached plugin data when checking if plugins are WooCommerce-aware #38836

Merged
merged 2 commits into from Jun 26, 2023

Conversation

barryhughes
Copy link
Member

@barryhughes barryhughes commented Jun 20, 2023

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):

Screenshot 2023-06-20 at 13 28 53Screenshot 2023-06-20 at 13 29 37

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 to get_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:

  1. Enable HPOS via WooCommerce ▸ Settings ▸ Advanced ▸ Features.
  2. Visit the main plugin screen and activate test plugins A and B.
  3. Return to (and refresh if needed) the feature admin page. You should find a link to manage incompatible plugins:
Screenshot 2023-06-20 at 13 40 56
  1. Follow the link, and you should be brought to a filtered version of the plugin list table. Without this change, the list will be empty. With this change, it should include at least test plugin B:
Screenshot 2023-06-20 at 14 26 18

☝️ 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.

@github-actions github-actions bot added the plugin: woocommerce Issues related to the WooCommerce Core plugin. label Jun 20, 2023
@barryhughes barryhughes requested review from a team and rrennick and removed request for a team June 20, 2023 20:45
@github-actions
Copy link
Contributor

Hi @rrennick,

Apart from reviewing the code changes, please make sure to review the testing instructions as well.

You can follow this guide to find out what good testing instructions should look like:
https://github.com/woocommerce/woocommerce/wiki/Writing-high-quality-testing-instructions

@barryhughes barryhughes removed the request for review from rrennick June 20, 2023 21:03
@barryhughes
Copy link
Member Author

Temporarily removing the review request, there may be another aspect that needs to be addressed.

@github-actions
Copy link
Contributor

github-actions bot commented Jun 20, 2023

Test Results Summary

Commit SHA: a473a00

Test 🧪Passed ✅Failed 🚨Broken 🚧Skipped ⏭️Unknown ❔Total 📊Duration ⏱️
API Tests25900202611m 2s
E2E Tests1900018020815m 21s

To view the full API test report, click here.
To view the full E2E test report, click here.
To view all test reports, visit the WooCommerce Test Reports Dashboard.

@barryhughes
Copy link
Member Author

Back to review! Testing instructions updated.

Copy link
Contributor

@rrennick rrennick left a comment

Choose a reason for hiding this comment

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

Nice work @barryhughes . Works as descibed.

@rrennick rrennick merged commit f44694f into trunk Jun 26, 2023
18 checks passed
@rrennick rrennick deleted the fix/37343-incompatible-plugins-list branch June 26, 2023 18:01
@github-actions github-actions bot added this to the 8.0.0 milestone Jun 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugin: woocommerce Issues related to the WooCommerce Core plugin.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[HPOS] Incompatible Plugins List May Be Unreliable
2 participants