diff --git a/assets/js/base/components/reviews/review-sort-select/index.tsx b/assets/js/base/components/reviews/review-sort-select/index.tsx index 434390ebcac..e8cb9928644 100644 --- a/assets/js/base/components/reviews/review-sort-select/index.tsx +++ b/assets/js/base/components/reviews/review-sort-select/index.tsx @@ -12,7 +12,7 @@ import './style.scss'; interface ReviewSortSelectProps { onChange: ChangeEventHandler; - readOnly: boolean; + readOnly?: boolean; value: 'most-recent' | 'highest-rating' | 'lowest-rating'; } diff --git a/assets/js/blocks/reviews/frontend-block.tsx b/assets/js/blocks/reviews/frontend-block.tsx index b091c3e9449..956a90485b7 100644 --- a/assets/js/blocks/reviews/frontend-block.tsx +++ b/assets/js/blocks/reviews/frontend-block.tsx @@ -49,7 +49,6 @@ const FrontendBlock = ( { ) } diff --git a/composer.json b/composer.json index 86441c6058b..a43aa558267 100644 --- a/composer.json +++ b/composer.json @@ -3,7 +3,7 @@ "description": "WooCommerce blocks for the Gutenberg editor.", "homepage": "https://woocommerce.com/", "type": "wordpress-plugin", - "version": "11.6.0", + "version": "11.6.1", "keywords": [ "gutenberg", "woocommerce", diff --git a/docs/internal-developers/testing/releases/1161.md b/docs/internal-developers/testing/releases/1161.md new file mode 100644 index 00000000000..579a5cd8a3d --- /dev/null +++ b/docs/internal-developers/testing/releases/1161.md @@ -0,0 +1,36 @@ +# Testing notes and ZIP for release 11.6.1 + +Zip file for testing: [woocommerce-gutenberg-products-block.zip](https://github.com/woocommerce/woocommerce-blocks/files/13450476/woocommerce-gutenberg-products-block.zip) + +## Testing Notes + +### Add missing woocommerce classname to Classic Cart/Checkout Blocks container so UI updates when the cart is emptied. [#11919](https://github.com/woocommerce/woocommerce-blocks/pull/11919) + +1. Edit the cart page +2. Convert the cart block into a "Classic Cart" block if not already there. You can use block transforms. +3. Save the page and go to the store. +4. Add some items to your cart, then head on to the cart page. +5. Remove each item from the cart using the X +6. The last item should be removed from the cart successfully. You can also "undo" the change and the item will come back. + +### Fix an issue that caused the Order by select in Reviews blocks to always be disabled. [#11918](https://github.com/woocommerce/woocommerce-blocks/pull/11918) + +1. Make sure you have at least one review in your store. +2. Create a post or page and add the All Reviews, Reviews by Category and Reviews by Product blocks (in the last two, select the category/product which have reviews). +3. View the page in the frontend. +4. Verify it's possible to change the _Order by_ value and reviews are sorted accordingly. + +| Before | After | +|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Reviews blocks with the _Order by_ select disabled | Reviews blocks with the _Order by_ select enabled | + +### Fix All Reviews, Reviews by Product and Reviews by Category blocks not being rendered. [#11913](https://github.com/woocommerce/woocommerce-blocks/pull/11913) + +1. Make sure you have at least one review in your store. +2. Create a post or page and add the All Reviews, Reviews by Category and Reviews by Product blocks (in the last two, select the category/product which have reviews). +3. Verify no errors are shown in the editor. +4. Verify the blocks are rendered properly in the frontend. + +| Before | After | +|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Reviews blocks showing an error in the editor | Reviews blocks showing no error in the editor | diff --git a/docs/internal-developers/testing/releases/README.md b/docs/internal-developers/testing/releases/README.md index 79ab1112ce0..cfef07759c1 100644 --- a/docs/internal-developers/testing/releases/README.md +++ b/docs/internal-developers/testing/releases/README.md @@ -195,3 +195,4 @@ Every release includes specific testing instructions for new features and bug fi - [11.5.1](./1151.md) - [11.5.4](./1154.md) - [11.6.0](./1160.md) + - [11.6.1](./1161.md) diff --git a/package-lock.json b/package-lock.json index 98e072087c5..42a48a66143 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@woocommerce/block-library", - "version": "11.6.0", + "version": "11.6.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@woocommerce/block-library", - "version": "11.6.0", + "version": "11.6.1", "hasInstallScript": true, "license": "GPL-3.0+", "dependencies": { diff --git a/package.json b/package.json index 4c6afdbc048..48eeff865a4 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "@woocommerce/block-library", "title": "WooCommerce Blocks", "author": "Automattic", - "version": "11.6.0", + "version": "11.6.1", "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 cbb3a3bc7e8..2a120843056 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Tags: gutenberg, woocommerce, woo commerce, products, blocks, woocommerce blocks Requires at least: 6.4 Tested up to: 6.4 Requires PHP: 7.4 -Stable tag: 11.6.0 +Stable tag: 11.6.1 License: GPLv3 License URI: https://www.gnu.org/licenses/gpl-3.0.html @@ -81,12 +81,20 @@ Release and roadmap notes available on the [WooCommerce Developers Blog](https:/ == Changelog == -= 11.6.0 - 2023-11-20 = += 11.6.1 - 2023-11-23 = + +#### Bug Fixes + +- Add missing woocommerce classname to Classic Cart/Checkout Blocks container so UI updates when the cart is emptied. [#11919](https://github.com/woocommerce/woocommerce-blocks/pull/11919) +- Fix an issue that caused the Order by select in Reviews blocks to always be disabled. [#11918](https://github.com/woocommerce/woocommerce-blocks/pull/11918) +- Fix All Reviews, Reviews by Product and Reviews by Category blocks not being rendered. [#11913](https://github.com/woocommerce/woocommerce-blocks/pull/11913) + += 11.6.0 - 2023-11-22 = #### Enhancements - Product Collection - New 'No Results' block with default UI. [#11783](https://github.com/woocommerce/woocommerce-blocks/pull/11783) -- WWe have moved the TotalsItem, TotalsFees, Subtotal, Banner, StoreNotice, StoreNotices, Panel, TextInput, ValidatedTextInput and ValidationInputError components to the @woocommerce/blocks-components package. Previously these were available in @woocommerce/blocks-checkout . Your code will continue to work as we have added aliases to the new location. Despite this, it is recommended that you change your code to import this component from @woocommerce/blocks-components as the import from the checkout package will be deprecated in the future. [#11766](https://github.com/woocommerce/woocommerce-blocks/pull/11766) [#11698](https://github.com/woocommerce/woocommerce-blocks/pull/11698) [#11654](https://github.com/woocommerce/woocommerce-blocks/pull/11654) [#11773](https://github.com/woocommerce/woocommerce-blocks/pull/11773) +- We have moved the TotalsItem, TotalsFees, Subtotal, Banner, StoreNotice, StoreNotices, Panel, TextInput, ValidatedTextInput and ValidationInputError components to the @woocommerce/blocks-components package. Previously these were available in @woocommerce/blocks-checkout . Your code will continue to work as we have added aliases to the new location. Despite this, it is recommended that you change your code to import this component from @woocommerce/blocks-components as the import from the checkout package will be deprecated in the future. [#11766](https://github.com/woocommerce/woocommerce-blocks/pull/11766) [#11698](https://github.com/woocommerce/woocommerce-blocks/pull/11698) [#11654](https://github.com/woocommerce/woocommerce-blocks/pull/11654) [#11773](https://github.com/woocommerce/woocommerce-blocks/pull/11773) - Improve performance in patterns registration. [#11733](https://github.com/woocommerce/woocommerce-blocks/pull/11733) - Patterns: remove unused author, sticky, and parents attributes from the Product Collection block in patterns. [#11673](https://github.com/woocommerce/woocommerce-blocks/pull/11673) - Semantic enhancement to the position of a phone field in Checkout. [#11651](https://github.com/woocommerce/woocommerce-blocks/pull/11651) @@ -336,7 +344,7 @@ Release and roadmap notes available on the [WooCommerce Developers Blog](https:/ - Fix Store Notices block breaks page editors. ([11165](https://github.com/woocommerce/woocommerce-blocks/pull/11165)) - Ensure the Just Arrived Full Hero pattern can have an AI-selected images assigned to it and add a background dim. ([11159](https://github.com/woocommerce/woocommerce-blocks/pull/11159)) - Testimonials 3 Columns pattern > Update the width and fix the PHP warnings that could be triggered if the content saved within the wc_blocks_patterns_content option didn't match the updated patterns dictionary. ([11158](https://github.com/woocommerce/woocommerce-blocks/pull/11158)) -- Pattern: Fetch product ID with JS to prevent unnecesary queries on every page load. ([11138](https://github.com/woocommerce/woocommerce-blocks/pull/11138)) +- Pattern: Fetch product ID with JS to prevent unnecessary queries on every page load. ([11138](https://github.com/woocommerce/woocommerce-blocks/pull/11138)) - Fix checkout state/country field width in the site editor. ([11133](https://github.com/woocommerce/woocommerce-blocks/pull/11133)) - Fixed PHP notice that would appear if an API endpoint failed to load. ([11128](https://github.com/woocommerce/woocommerce-blocks/pull/11128)) - Made error icon on checkout match text color. ([11127](https://github.com/woocommerce/woocommerce-blocks/pull/11127)) @@ -757,7 +765,7 @@ Release and roadmap notes available on the [WooCommerce Developers Blog](https:/ - Blockified Single Product Template: Add product-classes. ([9697](https://github.com/woocommerce/woocommerce-blocks/pull/9697)) - Blockified Single Product Template: Show upsells. ([9636](https://github.com/woocommerce/woocommerce-blocks/pull/9636)) - Template Placeholder Design for the Order Received Template. ([9602](https://github.com/woocommerce/woocommerce-blocks/pull/9602)) -- Mini-Cart: Update cart error notices to be non-dismissable (to match the behavior of the regular Cart). ([9578](https://github.com/woocommerce/woocommerce-blocks/pull/9578)) +- Mini-Cart: Update cart error notices to be non-dismissible (to match the behavior of the regular Cart). ([9578](https://github.com/woocommerce/woocommerce-blocks/pull/9578)) - Classic Product Template block visible in the inserter. ([9573](https://github.com/woocommerce/woocommerce-blocks/pull/9573)) - Hide the Product Rating when the product has no reviews. Previously, a link to the Reviews section was displayed. ([9556](https://github.com/woocommerce/woocommerce-blocks/pull/9556)) - Reduced the amount of settings data consumed by the cart and checkout blocks. ([9552](https://github.com/woocommerce/woocommerce-blocks/pull/9552)) @@ -893,7 +901,7 @@ Release and roadmap notes available on the [WooCommerce Developers Blog](https:/ - Fix: Ensure the product title within the Single Product Block matches the selected product instead of the title of the post/page where it was inserted. ([9335](https://github.com/woocommerce/woocommerce-blocks/pull/9335)) - Fix a regression which caused the Mini Cart drawer not to open until its contents have completely loaded. ([9329](https://github.com/woocommerce/woocommerce-blocks/pull/9329)) -- Prevent email being cleared when changing shipping method or when first entering shipping informaiton. ([9328](https://github.com/woocommerce/woocommerce-blocks/pull/9328)) +- Prevent email being cleared when changing shipping method or when first entering shipping information. ([9328](https://github.com/woocommerce/woocommerce-blocks/pull/9328)) - Product Image Gallery: Fix resize width when the window resizes. ([9299](https://github.com/woocommerce/woocommerce-blocks/pull/9299)) - Product Image Gallery: Fix the inline displayed issue. ([9297](https://github.com/woocommerce/woocommerce-blocks/pull/9297)) - Single Product Template - Related Products: Fix items per page option. ([9286](https://github.com/woocommerce/woocommerce-blocks/pull/9286)) @@ -1057,7 +1065,7 @@ Release and roadmap notes available on the [WooCommerce Developers Blog](https:/ #### Bug Fixes -- Fixed an issue where extensions were unable to programatically set the shipping address during payment processing. ([8878](https://github.com/woocommerce/woocommerce-blocks/pull/8878)) +- Fixed an issue where extensions were unable to programmatically set the shipping address during payment processing. ([8878](https://github.com/woocommerce/woocommerce-blocks/pull/8878)) - Fix border styles not visible in the editor in Featured Product and Featured Category blocks. ([8838](https://github.com/woocommerce/woocommerce-blocks/pull/8838)) - Fix Local Pickup "Save changes" default behavior bug in the Firefox browser. ([8754](https://github.com/woocommerce/woocommerce-blocks/pull/8754)) @@ -1115,7 +1123,7 @@ Release and roadmap notes available on the [WooCommerce Developers Blog](https:/ - Products by Attributes: Fix the block rendered empty in the Editor. ([8759](https://github.com/woocommerce/woocommerce-blocks/pull/8759)) - Fix the local pickup price in the shipping type selector and pickup options. ([8623](https://github.com/woocommerce/woocommerce-blocks/pull/8623)) - Enable users to migrate to the blockified Single Product template.([8902](https://github.com/woocommerce/woocommerce-blocks/pull/8902)) -- Fixed an issue where extensions were unable to programatically set the shipping address during payment processing. ([8878](https://github.com/woocommerce/woocommerce-blocks/pull/8878)) +- Fixed an issue where extensions were unable to programmatically set the shipping address during payment processing. ([8878](https://github.com/woocommerce/woocommerce-blocks/pull/8878)) - Fix unlinked border widths not being applied correctly in the frontend in WP 6.2 for some blocks. ([8893](https://github.com/woocommerce/woocommerce-blocks/pull/8893)) = 9.8.0 - 2023-03-14 = @@ -1299,7 +1307,7 @@ Release and roadmap notes available on the [WooCommerce Developers Blog](https:/ #### Bug Fixes -- Check if session is set before returing updated customer address. ([8537](https://github.com/woocommerce/woocommerce-blocks/pull/8537)) +- Check if session is set before returning updated customer address. ([8537](https://github.com/woocommerce/woocommerce-blocks/pull/8537)) = 9.4.3 - 2023-02-01 = @@ -1555,7 +1563,7 @@ Prevent Cart and Checkout notices from disappearing immediately after adding. ([ #### Bug fixes -- Fix a bug in which cart totals aren't recalculated aftering running CartExtensions ([#7490](https://github.com/woocommerce/woocommerce-blocks/pull/7490)) +- Fix a bug in which cart totals aren't recalculated after running CartExtensions ([#7490](https://github.com/woocommerce/woocommerce-blocks/pull/7490)) = 8.8.0 - 2022-10-24 = @@ -1773,7 +1781,7 @@ Prevent Cart and Checkout notices from disappearing immediately after adding. ([ - Fix missing translations in the inspector (editor mode). ([6737](https://github.com/woocommerce/woocommerce-blocks/pull/6737)) - Fix: Navigate through Mini Cart contents with keyboard. ([6731](https://github.com/woocommerce/woocommerce-blocks/pull/6731)) - Fix: Ensure add to cart notices are displayed on pages containing the Mini Cart block. ([6728](https://github.com/woocommerce/woocommerce-blocks/pull/6728)) -- Fix Cart an d Checkout blocks compatiblity issue with wordpress.com in which blocks wouldn't load in the editor. ([6718](https://github.com/woocommerce/woocommerce-blocks/pull/6718)) +- Fix Cart an d Checkout blocks compatibility issue with wordpress.com in which blocks wouldn't load in the editor. ([6718](https://github.com/woocommerce/woocommerce-blocks/pull/6718)) - Fixes an issue where search lists would not preserve the case of the original item. ([6551](https://github.com/woocommerce/woocommerce-blocks/pull/6551)) = 8.1.0 - 2022-07-18 = @@ -1800,7 +1808,7 @@ Prevent Cart and Checkout notices from disappearing immediately after adding. ([ #### Bug Fixes -- Fix: Correctly calculacte taxes for local pickups. ([6631](https://github.com/woocommerce/woocommerce-blocks/pull/6631)) +- Fix: Correctly calculate taxes for local pickups. ([6631](https://github.com/woocommerce/woocommerce-blocks/pull/6631)) - Fix: Ensure WooCommerce templates show correct titles. ([6452](https://github.com/woocommerce/woocommerce-blocks/pull/6452)) = 7.9.0 - 2022-06-20 = @@ -3060,7 +3068,7 @@ You can read [more about the release here](https://woocommerce.wordpress.com/?p= - Show a message in the editor if no products are found rather than show nothing. - Show previews for all included blocks in the block inserter. Requires WordPress 5.3. - Products on Sale, Products Tag and Product Search blocks have new icons. -- Officialy deprecate NPM package `@woocommerce/block-library`. +- Officially deprecate NPM package `@woocommerce/block-library`. - Use Server Side Rendering for Product Category List block to remove the need to pass large amounts of data around when not needed. - RTL fixes to several blocks. - All block icons are displayed gray in the editor shortcuts inserter. diff --git a/src/BlockTypes/ClassicShortcode.php b/src/BlockTypes/ClassicShortcode.php index 0db6af24f25..8ad3a705d33 100644 --- a/src/BlockTypes/ClassicShortcode.php +++ b/src/BlockTypes/ClassicShortcode.php @@ -67,7 +67,7 @@ protected function render( $attributes, $content, $block ) { * @return string space-separated list of classes. */ protected function get_container_classes( $attributes = array() ) { - $classes = array( 'wp-block-group' ); + $classes = array( 'woocommerce', 'wp-block-group' ); if ( isset( $attributes['align'] ) ) { $classes[] = "align{$attributes['align']}"; diff --git a/src/Package.php b/src/Package.php index 05f2b6a3ea8..fb92ab0e841 100644 --- a/src/Package.php +++ b/src/Package.php @@ -109,7 +109,7 @@ public static function container( $reset = false ) { NewPackage::class, function ( $container ) { // leave for automated version bumping. - $version = '11.6.0'; + $version = '11.6.1'; return new NewPackage( $version, dirname( __DIR__ ), diff --git a/src/StoreApi/Schemas/V1/ProductReviewSchema.php b/src/StoreApi/Schemas/V1/ProductReviewSchema.php index 29d62b55d42..7aed050f9e9 100644 --- a/src/StoreApi/Schemas/V1/ProductReviewSchema.php +++ b/src/StoreApi/Schemas/V1/ProductReviewSchema.php @@ -170,7 +170,7 @@ public function get_item_response( $review ) { 'product_permalink' => get_permalink( (int) $review->comment_post_ID ), 'product_image' => $this->image_attachment_schema->get_item_response( get_post_thumbnail_id( (int) $review->comment_post_ID ) ), 'reviewer' => $review->comment_author, - 'review' => wp_autop( $review->comment_content ), + 'review' => wpautop( $review->comment_content ), 'rating' => $rating, 'verified' => wc_review_is_from_verified_owner( $review->comment_ID ), 'reviewer_avatar_urls' => rest_get_avatar_urls( $review->comment_author_email ), diff --git a/woocommerce-gutenberg-products-block.php b/woocommerce-gutenberg-products-block.php index 4cb5d28dfd8..1cd5486f0f6 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: 11.6.0 + * Version: 11.6.1 * Author: Automattic * Author URI: https://woocommerce.com * Text Domain: woo-gutenberg-products-block