This release cherry picks some changes from #614 to update how supported features from WC are handled and to add a basic Blocks_Handler to ensure we can declare the plugin's compatibility with blocks and display a notice otherwise.
Plugins implementing this version of the FW need to mainly change the supports_hpos argument in the main plugin file constructor to a supported_features param, which by default will be assumed as follows:
If a plugin is compatible with HPOS, they need to change the corresponding key to true value. Same with either the cart/checkout blocks.
If a plugin is not compatible with either block, dismissble notices like the following will be produced if either block is found to be active in the respective cart/checkout pages:
No other action is required in the plugin implementing this version other than QA.
QA
The following QA applies to all plugins, so I'm placing the steps here as a catch-all, with notes added on a per-plugin basis when necessary.
Setup
Use WooCommerce version 8.3-RC1 or higher
Switch to the plugin branch utilizing this FW version
Steps
You have an install using the cart/checkout shortcodes
[x] The notice won't appear, plugin functionality unchanged
You have an install using the cart/checkout blocks instead
[x] The notice(s) will appear
Click on the documentation links of either notice
[x] You are redirected in the appropriate doc page in a new browser window
Click on the CTA button
[x] You are redirected to the corresponding edit screen in the same window
[x] A WooCommerce tool to help you revert the block to shortcode should be present
Test the notice behavior by reverting either incompatible block to shortcode manually
[x] The corresponding notice disappears
Dismiss a notice
[x] The notice is dismissed permanently regardless of block present or not
Summary
This release cherry picks some changes from #614 to update how supported features from WC are handled and to add a basic
Blocks_Handler
to ensure we can declare the plugin's compatibility with blocks and display a notice otherwise.Plugins implementing this version of the FW need to mainly change the
supports_hpos
argument in the main plugin file constructor to asupported_features
param, which by default will be assumed as follows:If a plugin is compatible with HPOS, they need to change the corresponding key to
true
value. Same with either the cart/checkout blocks.If a plugin is not compatible with either block, dismissble notices like the following will be produced if either block is found to be active in the respective cart/checkout pages:
No other action is required in the plugin implementing this version other than QA.
QA
The following QA applies to all plugins, so I'm placing the steps here as a catch-all, with notes added on a per-plugin basis when necessary.
Setup
Steps
Before merge