facebook-for-woocommerce
facebook-for-woocommerce copied to clipboard
Adds compat checker for versioning and compatibility
Changes proposed in this Pull Request:
Closes #2639.
This PR uses the compat-checker
library from the WooCommerce Grow repo to run compatibility and versioning checks during the plugin initialisation.
Checks:
- [x] Does your code follow the WordPress coding standards?
- [ ] Have you written new tests for your changes, as applicable?
- [ ] Have you successfully run tests with your changes locally?
- [x] Have you checked to ensure there aren't other open Pull Requests for the same update/change?
Screenshots:
Screenshots are for reference. WooCommerce Brands will be replaced by Facebook for WooCommerce.
WooCommerce not installed
WooCommerce not activated
WooCommerce not compatible
WooCommerce not tested
Detailed test instructions:
Pre-requisites
The PR requires deleting transients. A plugin like Transients Manager is recommended to delete the transients between tests.
WooCommerce activation tests
With the above code snippets in place, run the following tests. The instructions are for Facebook for WooCommerce but can be used for other WooGrow Extensions.
- Install and activate Facebook for WooCommerce without installing WooCommerce.
- Deactivate WooCommerce.
- Verify the notice
Facebook for WooCommerce requires WooCommerce to be installed and activated. Please install WooCommerce.
is displayed. - Install WooCommerce without activating.
- Verify the notice
Facebook for WooCommerce requires WooCommerce to be activated. Please activate WooCommerce.
is displayed.
WooCommerce versioning tests
⚠️ Important note: You will need to erase the transient _transient_wc_grow_compat_checker_[EXTENSION].php[VERSION
after each change!!
- Install and activate WooCommerce.
- Install and activate Facebook for WooCommerce.
- Modify the
WC requires at least
header field and set it to a version higher than the active WooCommerce version. Let's say theWC requires at least
is set to8.2
and the active WooCommerce version is8.0.2
. - Verify the notice
Facebook for WooCommerce requires WooCommerce version 8.2 or higher. Please update WooCommerce to the latest version, or download the minimum required version
is displayed. - Modify the
WC tested up to
and set it to a lower version than the active WooCommerce version. Let's say theWC tested up to
is set to7.8
, the active WooCommerce version is8.0.2
and Facebook for WooCommerce version is3.0.34
. - Verify the warning notice
Facebook for WooCommerce - 3.0.34 is untested with WooCommerce 8.0.2
is displayed.
L2 support recommendation notice
- Download the latest minus three WooCommerce version and activate it. Let's say
7.6
. - Verify the warning notice
Heads up! Facebook for WooCommerce will soon discontinue support for WooCommerce 7.6. Please update WooCommerce to take advantage of the latest updates and features.
WordPress versioning tests
⚠️ Important note: You will need to erase the transient _transient_wc_grow_compat_checker_[EXTENSION].php[VERSION
after each change!!
- Modify the
Tested up to
and set it to a lower version than the current WordPress version. Let's say theTested up to
is set to6.2
, the active WordPress version is6.3
, and the Facebook for WooCommerce version is3.0.34
. - Verify the warning notice
Facebook for WooCommerce - 3.0.34 is untested with WordPress 6.3
is displayed.
Additional Details
To delete a transient using Transients Manager, navigate to Tools > Transients, search for wc_grow
and delete the transient.
Changelog entry
Add - Versioning and compatibility checks to implement support policy.
Thank you, @rawdreeg, for taking the time to review the PR. I've pushed a couple of commits addressing your comments. Please let me know your thoughts.