godaddy-wordpress / wc-plugin-framework

The official SkyVerge WooCommerce plugin framework
Other
137 stars 42 forks source link

Release: v5.11.11 #641

Closed unfulvio-godaddy closed 10 months ago

unfulvio-godaddy commented 10 months ago

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 a supported_features param, which by default will be assumed as follows:

 'supported_features' => [
    'hpos'   => false,
    'blocks' => [
        'cart'     => false,
        'checkout' => false,
    ],
],

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:

image

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

  1. You have an install using the cart/checkout shortcodes
    • [x] The notice won't appear, plugin functionality unchanged
  2. You have an install using the cart/checkout blocks instead
    • [x] The notice(s) will appear
  3. Click on the documentation links of either notice
    • [x] You are redirected in the appropriate doc page in a new browser window
  4. 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
  5. Test the notice behavior by reverting either incompatible block to shortcode manually
    • [x] The corresponding notice disappears
  6. Dismiss a notice
    • [x] The notice is dismissed permanently regardless of block present or not

Before merge