From ab49193a3c570f943e7b21642d3f3d8d55e3eca9 Mon Sep 17 00:00:00 2001 From: github-actions Date: Wed, 27 Apr 2022 09:35:44 +0000 Subject: [PATCH 1/5] Empty commit for release pull request From 75cfd5d1a2be68b9c015b25e1a0cb08a0da7e3d1 Mon Sep 17 00:00:00 2001 From: Tung Du Date: Tue, 26 Apr 2022 15:21:14 +0700 Subject: [PATCH 2/5] Fix: Customizer fatal error for bundled woocommerce-blocks package (#6317) --- src/BlockTypes/MiniCart.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/BlockTypes/MiniCart.php b/src/BlockTypes/MiniCart.php index 91c222f8f7c..2364c4b2c6a 100644 --- a/src/BlockTypes/MiniCart.php +++ b/src/BlockTypes/MiniCart.php @@ -150,8 +150,14 @@ protected function enqueue_data( array $attributes = [] ) { * * $wp_scripts->print_translations() calls load_script_textdomain() * which calls load_script_translations() containing the below filter. + * + * In Customzier, woocommerce_blocks_get_i18n_data_json doesn't exist + * at the time of this filter call. So we need checking for its + * existence to prevent fatal error. */ - remove_filter( 'pre_load_script_translations', 'woocommerce_blocks_get_i18n_data_json', 10, 4 ); + if ( function_exists( 'woocommerce_blocks_get_i18n_data_json' ) ) { + remove_filter( 'pre_load_script_translations', 'woocommerce_blocks_get_i18n_data_json', 10, 4 ); + } $script_data = $this->asset_api->get_script_data( 'build/mini-cart-component-frontend.js' ); @@ -187,7 +193,9 @@ protected function enqueue_data( array $attributes = [] ) { ); // Re-add the filter. - add_filter( 'pre_load_script_translations', 'woocommerce_blocks_get_i18n_data_json', 10, 4 ); + if ( function_exists( 'woocommerce_blocks_get_i18n_data_json' ) ) { + add_filter( 'pre_load_script_translations', 'woocommerce_blocks_get_i18n_data_json', 10, 4 ); + } $this->asset_data_registry->add( 'mini_cart_block_frontend_dependencies', From d527f8247fb0523c40031ac00953753eb855ac49 Mon Sep 17 00:00:00 2001 From: tjcafferkey Date: Wed, 27 Apr 2022 10:45:44 +0100 Subject: [PATCH 3/5] Add 7.4.3 changelog to readme.txt --- readme.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/readme.txt b/readme.txt index 97c5076dd04..fec7d3ef7fe 100644 --- a/readme.txt +++ b/readme.txt @@ -86,6 +86,12 @@ Release and roadmap notes available on the [WooCommerce Developers Blog](https:/ == Changelog == += 7.4.3 - 27-04-2022 = + +#### Bug Fixes + +- Fix Customizer fatal error on PHP 8. ([6317](https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/6317)) + = 7.4.2 - 2022-04-15 = #### Bug Fixes From 673ca02869d773f85091480485542fb55c409b7f Mon Sep 17 00:00:00 2001 From: tjcafferkey Date: Wed, 27 Apr 2022 10:58:22 +0100 Subject: [PATCH 4/5] Release 7.4.3 testing instructions --- docs/testing/releases/743.md | 15 +++++++++++++++ docs/testing/releases/README.md | 1 + 2 files changed, 16 insertions(+) create mode 100644 docs/testing/releases/743.md diff --git a/docs/testing/releases/743.md b/docs/testing/releases/743.md new file mode 100644 index 00000000000..4eaa6a8fd40 --- /dev/null +++ b/docs/testing/releases/743.md @@ -0,0 +1,15 @@ +## Testing notes and ZIP for release 7.4.3 + +[woocommerce-gutenberg-products-block.zip](https://github.com/woocommerce/woocommerce-gutenberg-products-block/files/8570975/woocommerce-gutenberg-products-block.zip) + + +## Feature plugin and package inclusion in WooCommerce + +#### Bug Fixes + +### Fix Customizer fatal error on PHP 8. ([6317](https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/6317)) + +1. Using a site running on PHP 8. +2. Activate WC 6.5 beta 1 and Storefront. +4. Go to Appearance > Customize. +5. See no fatal error, the Customizer is loading and working as expected. diff --git a/docs/testing/releases/README.md b/docs/testing/releases/README.md index bf414755766..28f037ed744 100644 --- a/docs/testing/releases/README.md +++ b/docs/testing/releases/README.md @@ -67,6 +67,7 @@ Every release includes specific testing instructions for new features and bug fi - [7.4.0](./740.md) - [7.4.1](./741.md) - [7.4.2](./742.md) + - [7.4.3](./743.md) --- From 63abd07733ae4e4c12e05eb6d3828f9ab3ff4667 Mon Sep 17 00:00:00 2001 From: tjcafferkey Date: Wed, 27 Apr 2022 13:18:32 +0100 Subject: [PATCH 5/5] Bumping version strings to new version. --- package.json | 2 +- readme.txt | 2 +- src/Package.php | 2 +- woocommerce-gutenberg-products-block.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 116d94b5c7b..9ac5cfeddff 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "@woocommerce/block-library", "title": "WooCommerce Blocks", "author": "Automattic", - "version": "7.4.2", + "version": "7.4.3", "description": "WooCommerce blocks for the Gutenberg editor.", "homepage": "https://github.com/woocommerce/woocommerce-gutenberg-products-block/", "keywords": [ diff --git a/readme.txt b/readme.txt index fec7d3ef7fe..2db157f4aa1 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Tags: gutenberg, woocommerce, woo commerce, products, blocks, woocommerce blocks Requires at least: 5.9 Tested up to: 5.9 Requires PHP: 7.0 -Stable tag: 7.4.2 +Stable tag: 7.4.3 License: GPLv3 License URI: https://www.gnu.org/licenses/gpl-3.0.html diff --git a/src/Package.php b/src/Package.php index c0ad41fbfb5..0b298de3383 100644 --- a/src/Package.php +++ b/src/Package.php @@ -106,7 +106,7 @@ public static function container( $reset = false ) { NewPackage::class, function ( $container ) { // leave for automated version bumping. - $version = '7.4.2'; + $version = '7.4.3'; return new NewPackage( $version, dirname( __DIR__ ), diff --git a/woocommerce-gutenberg-products-block.php b/woocommerce-gutenberg-products-block.php index 82b9c173ec3..992ba152441 100644 --- a/woocommerce-gutenberg-products-block.php +++ b/woocommerce-gutenberg-products-block.php @@ -3,7 +3,7 @@ * Plugin Name: WooCommerce Blocks * Plugin URI: https://github.com/woocommerce/woocommerce-gutenberg-products-block * Description: WooCommerce blocks for the Gutenberg editor. - * Version: 7.4.2 + * Version: 7.4.3 * Author: Automattic * Author URI: https://woocommerce.com * Text Domain: woo-gutenberg-products-block