From 8758f586e401010e10a4eec967c11d898d475722 Mon Sep 17 00:00:00 2001 From: Luigi Date: Mon, 19 Jun 2023 10:05:54 +0200 Subject: [PATCH 02/24] add readme --- plugins/woocommerce-blocks/readme.txt | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/plugins/woocommerce-blocks/readme.txt b/plugins/woocommerce-blocks/readme.txt index c6389639b7e..813526ad0cb 100644 --- a/plugins/woocommerce-blocks/readme.txt +++ b/plugins/woocommerce-blocks/readme.txt @@ -81,6 +81,32 @@ Release and roadmap notes available on the [WooCommerce Developers Blog](https:/ == Changelog == += 10.5.0 - 2023-06-19 = + +#### Enhancements + +- Allow Customer Account Block to be found with keyword "My Account". ([9815](https://github.com/woocommerce/woocommerce-blocks/pull/9815)) +- Mini Cart: Add an alternative icon setting. ([9570](https://github.com/woocommerce/woocommerce-blocks/pull/9570)) +- Improved the performance of loading frontend assets through the use of caching. ([9120](https://github.com/woocommerce/woocommerce-blocks/pull/9120)) +- Add additional optimization to the Pattern images. ([9803](https://github.com/woocommerce/woocommerce-blocks/pull/9803)) + + +#### Bug Fixes + +- Fix error when adding the Reviews by Category block to a store without any product reviews. ([9868](https://github.com/woocommerce/woocommerce-blocks/pull/9868)) +- Mini Cart block: Fix icon render in the widget selector. ([9828](https://github.com/woocommerce/woocommerce-blocks/pull/9828)) +- WooCommerce Product Filters pattern: Improve the preview of the Filter by Attribute block. ([9812](https://github.com/woocommerce/woocommerce-blocks/pull/9812)) +- Ensure the "Change Address" button is visible in the cart even if local pickup is selected. ([9809](https://github.com/woocommerce/woocommerce-blocks/pull/9809)) +- Fix capitalization in Product Collections: Newest Arrivals pattern. ([9777](https://github.com/woocommerce/woocommerce-blocks/pull/9777)) +- Add RTL preview support for mini-cart. ([9756](https://github.com/woocommerce/woocommerce-blocks/pull/9756)) +- Fix mini cart icon not displaying correctly in RTL sites. ([9707](https://github.com/woocommerce/woocommerce-blocks/pull/9707)) +- Prevent Mini-Cart drawer to show horizontal scrollbar if the system has visible scrollbars. ([9676](https://github.com/woocommerce/woocommerce-blocks/pull/9676)) + +#### Dependencies + +- Peer Dependency: Request 2.88.2. ([9827](https://github.com/woocommerce/woocommerce-blocks/pull/9827)) +- Bump fast-xml-parser from 4.0.7 to 4.2.4. ([9818](https://github.com/woocommerce/woocommerce-blocks/pull/9818)) + = 10.4.2 - 2023-06-12 = #### Bug Fixes From 028d0a90ab179787bcd68342b53453e3993159fa Mon Sep 17 00:00:00 2001 From: Luigi Date: Mon, 19 Jun 2023 11:38:19 +0200 Subject: [PATCH 03/24] bump version --- plugins/woocommerce-blocks/composer.json | 2 +- plugins/woocommerce-blocks/package-lock.json | 4 ++-- plugins/woocommerce-blocks/package.json | 2 +- plugins/woocommerce-blocks/readme.txt | 2 +- plugins/woocommerce-blocks/src/Package.php | 2 +- .../woocommerce-gutenberg-products-block.php | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/plugins/woocommerce-blocks/composer.json b/plugins/woocommerce-blocks/composer.json index 9b5c9fffabd..d66e1a4181f 100644 --- a/plugins/woocommerce-blocks/composer.json +++ b/plugins/woocommerce-blocks/composer.json @@ -3,7 +3,7 @@ "description": "WooCommerce blocks for the Gutenberg editor.", "homepage": "https://woocommerce.com/", "type": "wordpress-plugin", - "version": "10.5.0-dev", + "version": "10.5.0", "keywords": [ "gutenberg", "woocommerce", diff --git a/plugins/woocommerce-blocks/package-lock.json b/plugins/woocommerce-blocks/package-lock.json index 94f3d992fc4..f6611215730 100644 --- a/plugins/woocommerce-blocks/package-lock.json +++ b/plugins/woocommerce-blocks/package-lock.json @@ -1,12 +1,12 @@ { "name": "@woocommerce/block-library", - "version": "10.5.0-dev", + "version": "10.5.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@woocommerce/block-library", - "version": "10.5.0-dev", + "version": "10.5.0", "hasInstallScript": true, "license": "GPL-3.0+", "dependencies": { diff --git a/plugins/woocommerce-blocks/package.json b/plugins/woocommerce-blocks/package.json index 28c51d32169..9afc820daf5 100644 --- a/plugins/woocommerce-blocks/package.json +++ b/plugins/woocommerce-blocks/package.json @@ -2,7 +2,7 @@ "name": "@woocommerce/block-library", "title": "WooCommerce Blocks", "author": "Automattic", - "version": "10.5.0-dev", + "version": "10.5.0", "description": "WooCommerce blocks for the Gutenberg editor.", "homepage": "https://github.com/woocommerce/woocommerce-gutenberg-products-block/", "keywords": [ diff --git a/plugins/woocommerce-blocks/readme.txt b/plugins/woocommerce-blocks/readme.txt index 813526ad0cb..bca838ee4fc 100644 --- a/plugins/woocommerce-blocks/readme.txt +++ b/plugins/woocommerce-blocks/readme.txt @@ -4,7 +4,7 @@ Tags: gutenberg, woocommerce, woo commerce, products, blocks, woocommerce blocks Requires at least: 6.2 Tested up to: 6.2 Requires PHP: 7.3 -Stable tag: 10.4.2 +Stable tag: 10.5.0 License: GPLv3 License URI: https://www.gnu.org/licenses/gpl-3.0.html diff --git a/plugins/woocommerce-blocks/src/Package.php b/plugins/woocommerce-blocks/src/Package.php index 94fe96358e3..982f6f7e85f 100644 --- a/plugins/woocommerce-blocks/src/Package.php +++ b/plugins/woocommerce-blocks/src/Package.php @@ -109,7 +109,7 @@ class Package { NewPackage::class, function ( $container ) { // leave for automated version bumping. - $version = '10.5.0-dev'; + $version = '10.5.0'; return new NewPackage( $version, dirname( __DIR__ ), diff --git a/plugins/woocommerce-blocks/woocommerce-gutenberg-products-block.php b/plugins/woocommerce-blocks/woocommerce-gutenberg-products-block.php index 33221c2c1d5..65890272fd1 100644 --- a/plugins/woocommerce-blocks/woocommerce-gutenberg-products-block.php +++ b/plugins/woocommerce-blocks/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: 10.5.0-dev + * Version: 10.5.0 * Author: Automattic * Author URI: https://woocommerce.com * Text Domain: woo-gutenberg-products-block From 244cdf86e2cc5f148c3878970182aedf61bd7a29 Mon Sep 17 00:00:00 2001 From: Luigi Date: Mon, 19 Jun 2023 11:38:30 +0200 Subject: [PATCH 04/24] add testing instructions --- .../testing/releases/1050.md | 105 ++++++++++++++++++ .../testing/releases/README.md | 4 +- 2 files changed, 108 insertions(+), 1 deletion(-) create mode 100644 plugins/woocommerce-blocks/docs/internal-developers/testing/releases/1050.md diff --git a/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/1050.md b/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/1050.md new file mode 100644 index 00000000000..f7fdd51df66 --- /dev/null +++ b/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/1050.md @@ -0,0 +1,105 @@ +# Testing notes and ZIP for release 10.5.0 + +Zip file for testing: [woocommerce-gutenberg-products-block.zip](https://github.com/woocommerce/woocommerce-blocks/files/11731631/woocommerce-gutenberg-products-block.zip) + +## WooCommerce Core + +### Fix error when adding the Reviews by Category block to a store without any product reviews. ([9868](https://github.com/woocommerce/woocommerce-blocks/pull/9868)) + +1. Create a new post: To do this, navigate to Posts > Add New from the WordPress dashboard. +2. Add the Reviews by Category block: Inside the new post editor, click on the plus icon (+) at the top left corner or within the post editor to add a new block. In the search bar that appears, type Reviews by Category and click on it to add the block to your post. +3. Configure the Reviews by Category block: Now, you can configure the block based on your needs. Select the category you want to display reviews from using the dropdown in the block selector. +4. Check that the block is inserted to the Editor and no error appears. + +| Before | After | +| ------ | ----- | +| ![image](https://github.com/woocommerce/woocommerce-blocks/assets/20469356/7444c66f-8c86-4444-a1ee-419b38eeba25) | ![image](https://github.com/woocommerce/woocommerce-blocks/assets/20469356/da76db67-6d7d-460d-8737-be1a6201b06d) | + +### Allow Customer Account Block to be found with keyword "My Account". ([9815](https://github.com/woocommerce/woocommerce-blocks/pull/9815)) + +1. Create a new post: To do this, navigate to Posts > Add New from the WordPress dashboard. +2. Open the inserter and search for "My account". +3. Check if Customer Account Block shows up. + +### Ensure the "Change Address" button is visible in the cart even if local pickup is selected. ([9809](https://github.com/woocommerce/woocommerce-blocks/pull/9809)) + +1. Ensure you are using the Cart block. +2. Ensure you have an item in the cart that needs shipping, and a mixture of pickup and flat rates. +2. Select the local pickup shipping method. +3. Confirm the "change address" button is still shown. + +![Screenshot 2023-06-13 at 14 18 51](https://github.com/woocommerce/woocommerce-blocks/assets/90977/69156833-3cba-461d-bec6-a4d07fc6bf50) + +### WooCommerce Product Filters pattern: Improve the preview of the Filter by Attribute block. ([9812](https://github.com/woocommerce/woocommerce-blocks/pull/9812)) + +1. Create a new page or post. +2. Open the block inserter and search for the `WooCommerce Product Filters` pattern. +3. Check the preview image of the pattern in the inserter and make sure you see one attribute selected and not the "edit" view of the filter by attribute block (see screenshot above). +4. If the store does not have any attributes you should still see the "edit" view though. + +| Before | After | +| ------ | ----- | +| |Screenshot 2023-06-13 at 16 33 57| + + +### Mini Cart block: Fix icon render in the widget selector. ([9828](https://github.com/woocommerce/woocommerce-blocks/pull/9828)) + +1. Enable the Storefront theme. +2. Click on "Appearance > Customize". +3. Click on "Widgets > Below Header". +4. Search for the Mini Cart widget. +5. Ensure the Mini Cart icon displays correctly. + +| Before | After | +| ------ | ----- | +|before icon|after icon| + + + +### Mini Cart: Add an alternative icon setting. ([9570](https://github.com/woocommerce/woocommerce-blocks/pull/9570)) + +1. Add the Mini-Cart block to a page. +2. Select the Bag alternative icon and save. +3. Make sure it displays correctly in the editor and on the page. +4. Repeat the same for the third icon (Bag-Alt). + +| Before | After | +| ------ | ----- | +| Edit_Page_“Mini_cart”_‹_kirigami_—_WordPress-2|Edit_Page_“Mini_cart”_‹_kirigami_—_WordPress| + + +### Fix capitalization in Product Collections: Newest Arrivals pattern. ([9777](https://github.com/woocommerce/woocommerce-blocks/pull/9777)) + +1. Create a post or page and open the _Patterns_ tab in the inserter. +2. Search for `product collections`. +3. Verify the word _Collections_ is capitalized in all the available patterns. + +### Prevent Mini-Cart drawer to show horizontal scrollbar if the system has visible scrollbars. ([9676](https://github.com/woocommerce/woocommerce-blocks/pull/9676)) + +1. Set up your browser so scrollbars are visible (see [instructions for Mac](https://support.vagaro.com/hc/en-us/articles/204347160-Disable-Disappearing-Scroll-Bars-on-Mac-Computers), on GNOME it's under Settings > Accessibility). +2. Add the Mini-Cart block to the header of your store. +3. In the frontend, open the Mini-Cart drawer and verify there is no horizontal scrollbar in the contents table. + +Before | After +--- | --- +![imatge](https://github.com/woocommerce/woocommerce-blocks/assets/3616980/084b8dee-aff3-435a-aaec-b231609afe6e) | ![imatge](https://github.com/woocommerce/woocommerce-blocks/assets/3616980/1db799a4-cd27-4c06-9acf-b18ffa96bad1) + +### Add RTL preview support for mini-cart. ([9756](https://github.com/woocommerce/woocommerce-blocks/pull/9756)) + +1. Add post/page and insert the mini-cart block. +2. Switch to a RTL language such as Arabic. +3. Click on the mini-cart block in the Editor. +4. In the inspector controls, you should see a preview of the mini-cart drawer that shows a RTL version. ( where the drawer opens from the left ). +5. Switch to English language and now the preview should be opening from the right instead. + +![file.png](https://github.com/woocommerce/woocommerce-blocks/assets/2132595/fc7e0a01-ad54-4c81-8071-e77af8bb4e66) + +### Fix mini cart icon not displaying correctly in RTL sites. ([9707](https://github.com/woocommerce/woocommerce-blocks/pull/9707)) + +1. Install a plugin called "RTL Tester". +2. Switch to RTL with the button in your admin bar. +3. Add a post and insert the `Mini cart` block. +4. Click on the `Mini cart` icon to open the editor drawer. +5. Ensure the `Mini cart` icon is facing left instead of right as seen in the screenshot above. + +![file.png](https://github.com/woocommerce/woocommerce-blocks/assets/2132595/30fd5c40-b035-4765-ad3b-00e8f1837785) diff --git a/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/README.md b/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/README.md index efcb8d09454..4077190575d 100644 --- a/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/README.md +++ b/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/README.md @@ -151,7 +151,9 @@ Every release includes specific testing instructions for new features and bug fi - [10.2.2](./1023.md) - [10.3.0](./1030.md) - [10.4.0](./1040.md) -- [10.4.2](./1042.md) + - [10.4.2](./1042.md) +- [10.5.0](./1050.md) + --- From 677d66f1374b1f330d0dd08f36b81f0a1ed3b953 Mon Sep 17 00:00:00 2001 From: Alexandre Lara Date: Mon, 19 Jun 2023 07:09:54 -0300 Subject: [PATCH 05/24] Fix PropType warning and error when adding All Reviews block to Editor (https://github.com/woocommerce/woocommerce-blocks/pull/9869) --- .../assets/js/blocks/reviews/all-reviews/block.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/woocommerce-blocks/assets/js/blocks/reviews/all-reviews/block.tsx b/plugins/woocommerce-blocks/assets/js/blocks/reviews/all-reviews/block.tsx index 06d89e890f5..e7da183926c 100644 --- a/plugins/woocommerce-blocks/assets/js/blocks/reviews/all-reviews/block.tsx +++ b/plugins/woocommerce-blocks/assets/js/blocks/reviews/all-reviews/block.tsx @@ -75,7 +75,7 @@ const AllReviewsEditor = ( { /> } name={ __( 'All Reviews', 'woo-gutenberg-products-block' ) } - noReviewsPlaceholder={ NoReviewsPlaceholder() } + noReviewsPlaceholder={ NoReviewsPlaceholder } /> ); From edd3dd38dacf86409eff268d0c8b909f80e60886 Mon Sep 17 00:00:00 2001 From: Luigi Date: Mon, 19 Jun 2023 15:23:12 +0200 Subject: [PATCH 06/24] add woocommerce/woocommerce-blocks#9869 PR --- .../docs/internal-developers/testing/releases/1050.md | 6 ++++++ plugins/woocommerce-blocks/readme.txt | 1 + 2 files changed, 7 insertions(+) diff --git a/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/1050.md b/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/1050.md index f7fdd51df66..8b2bde59cf6 100644 --- a/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/1050.md +++ b/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/1050.md @@ -103,3 +103,9 @@ Before | After 5. Ensure the `Mini cart` icon is facing left instead of right as seen in the screenshot above. ![file.png](https://github.com/woocommerce/woocommerce-blocks/assets/2132595/30fd5c40-b035-4765-ad3b-00e8f1837785) + +### Fix error when adding the Reviews by Category block to a store without any product reviews ([9869](https://github.com/woocommerce/woocommerce-blocks/pull/9869)) + +1. Create a new post: Navigate to Posts > Add New from the WordPress dashboard. +2. Add the All Reviews block: When you're in the new post editor, click on the plus icon (+) in the top left corner or within the post editor to add a new block. Type All Reviews in the search bar and click on it to add the block to your post. +3. Check that the block is inserted to the Editor without any errors. diff --git a/plugins/woocommerce-blocks/readme.txt b/plugins/woocommerce-blocks/readme.txt index bca838ee4fc..525d6f82bef 100644 --- a/plugins/woocommerce-blocks/readme.txt +++ b/plugins/woocommerce-blocks/readme.txt @@ -101,6 +101,7 @@ Release and roadmap notes available on the [WooCommerce Developers Blog](https:/ - Add RTL preview support for mini-cart. ([9756](https://github.com/woocommerce/woocommerce-blocks/pull/9756)) - Fix mini cart icon not displaying correctly in RTL sites. ([9707](https://github.com/woocommerce/woocommerce-blocks/pull/9707)) - Prevent Mini-Cart drawer to show horizontal scrollbar if the system has visible scrollbars. ([9676](https://github.com/woocommerce/woocommerce-blocks/pull/9676)) +- Fix error when adding the Reviews by Category block to a store without any product reviews ([9869](https://github.com/woocommerce/woocommerce-blocks/pull/9869)) #### Dependencies From e190f4606406b0bd74f84d64f7b4480e572c49a7 Mon Sep 17 00:00:00 2001 From: Luigi Date: Mon, 19 Jun 2023 15:51:46 +0200 Subject: [PATCH 07/24] update zip file testing --- .../docs/internal-developers/testing/releases/1050.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/1050.md b/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/1050.md index 8b2bde59cf6..aa78c793a2f 100644 --- a/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/1050.md +++ b/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/1050.md @@ -1,6 +1,6 @@ # Testing notes and ZIP for release 10.5.0 -Zip file for testing: [woocommerce-gutenberg-products-block.zip](https://github.com/woocommerce/woocommerce-blocks/files/11731631/woocommerce-gutenberg-products-block.zip) +Zip file for testing: [woocommerce-gutenberg-products-block.zip](https://github.com/woocommerce/woocommerce-blocks/files/11788797/woocommerce-gutenberg-products-block.zip) ## WooCommerce Core From b585355fda08bff42d617943b2525c9274afcc38 Mon Sep 17 00:00:00 2001 From: Luigi Teschio Date: Mon, 19 Jun 2023 17:14:35 +0200 Subject: [PATCH 08/24] Mini Cart Block: show the total price, including tax, according to the option (https://github.com/woocommerce/woocommerce-blocks/pull/9878) * Mini Cart Block: show the total price, including tax, according to the option * Fix tests in PR 9878 (https://github.com/woocommerce/woocommerce-blocks/pull/9880) * add unit test --------- Co-authored-by: Karol Manijak --- .../assets/js/blocks/mini-cart/utils/data.ts | 29 ++++--- .../js/blocks/mini-cart/utils/test/data.ts | 81 ++++++++++++++++++- 2 files changed, 100 insertions(+), 10 deletions(-) diff --git a/plugins/woocommerce-blocks/assets/js/blocks/mini-cart/utils/data.ts b/plugins/woocommerce-blocks/assets/js/blocks/mini-cart/utils/data.ts index 7cb5c78c316..a4d1ea62611 100644 --- a/plugins/woocommerce-blocks/assets/js/blocks/mini-cart/utils/data.ts +++ b/plugins/woocommerce-blocks/assets/js/blocks/mini-cart/utils/data.ts @@ -6,7 +6,16 @@ import { getCurrencyFromPriceResponse, formatPrice, } from '@woocommerce/price-format'; -import { CartResponse } from '@woocommerce/types'; +import { CartResponse, isBoolean } from '@woocommerce/types'; +import { getSettingWithCoercion } from '@woocommerce/settings'; + +const getPrice = ( cartResponse: CartResponse, showIncludingTax: boolean ) => { + const currency = getCurrencyFromPriceResponse( cartResponse.totals ); + + return showIncludingTax + ? formatPrice( cartResponse.totals.total_price, currency ) + : formatPrice( cartResponse.totals.total_items, currency ); +}; export const updateTotals = ( totals: [ string, number ] | undefined ) => { if ( ! totals ) { @@ -86,11 +95,12 @@ export const getMiniCartTotalsFromLocalStorage = (): return undefined; } const miniCartTotals = JSON.parse( rawMiniCartTotals ); - const currency = getCurrencyFromPriceResponse( miniCartTotals.totals ); - const formattedPrice = formatPrice( - miniCartTotals.totals.total_price, - currency + const showIncludingTax = getSettingWithCoercion( + 'displayCartPricesIncludingTax', + false, + isBoolean ); + const formattedPrice = getPrice( miniCartTotals, showIncludingTax ); return [ formattedPrice, miniCartTotals.itemsCount ] as [ string, number ]; }; @@ -107,11 +117,12 @@ export const getMiniCartTotalsFromServer = async (): Promise< return response.json(); } ) .then( ( data: CartResponse ) => { - const currency = getCurrencyFromPriceResponse( data.totals ); - const formattedPrice = formatPrice( - data.totals.total_price, - currency + const showIncludingTax = getSettingWithCoercion( + 'displayCartPricesIncludingTax', + false, + isBoolean ); + const formattedPrice = getPrice( data, showIncludingTax ); // Save server data to local storage, so we can re-fetch it faster // on the next page load. localStorage.setItem( diff --git a/plugins/woocommerce-blocks/assets/js/blocks/mini-cart/utils/test/data.ts b/plugins/woocommerce-blocks/assets/js/blocks/mini-cart/utils/test/data.ts index 73e72b73f8e..7c02da72053 100644 --- a/plugins/woocommerce-blocks/assets/js/blocks/mini-cart/utils/test/data.ts +++ b/plugins/woocommerce-blocks/assets/js/blocks/mini-cart/utils/test/data.ts @@ -3,6 +3,7 @@ * External dependencies */ import { getByTestId, waitFor } from '@testing-library/dom'; +import { getSettingWithCoercion } from '@woocommerce/settings'; /** * Internal dependencies @@ -19,6 +20,7 @@ const responseMock = { json: async () => ( { totals: { total_price: '1600', + total_items: '1400', currency_code: 'USD', currency_symbol: '$', currency_minor_unit: 2, @@ -33,6 +35,7 @@ const responseMock = { const localStorageMock = { totals: { total_price: '1600', + total_items: '1400', currency_code: 'USD', currency_symbol: '$', currency_minor_unit: 2, @@ -67,7 +70,21 @@ const getMiniCartDOM = () => { return div; }; -describe( 'Mini-Cart frontend script', () => { +jest.mock( '@woocommerce/settings', () => { + return { + ...jest.requireActual( '@woocommerce/settings' ), + getSettingWithCoercion: jest.fn(), + }; +} ); + +describe( 'Mini-Cart frontend script when "the display prices during cart and checkout" option is set to "Including Tax"', () => { + beforeAll( () => { + ( getSettingWithCoercion as jest.Mock ).mockReturnValue( true ); + } ); + + afterAll( () => { + jest.resetModules(); + } ); it( 'updates the cart contents based on the localStorage values', async () => { initializeLocalStorage(); const container = getMiniCartDOM(); @@ -125,3 +142,65 @@ describe( 'Mini-Cart frontend script', () => { jest.restoreAllMocks(); } ); } ); + +describe( 'Mini-Cart frontend script when "the display prices during cart and checkout" option is set to "Excluding Tax"', () => { + beforeAll( () => { + ( getSettingWithCoercion as jest.Mock ).mockReturnValue( false ); + } ); + it( 'updates the cart contents based on the localStorage values', async () => { + initializeLocalStorage(); + const container = getMiniCartDOM(); + document.body.appendChild( container ); + + updateTotals( getMiniCartTotalsFromLocalStorage() ); + + // Assert that we are rendering the amount. + await waitFor( () => + expect( getByTestId( container, 'amount' ).textContent ).toBe( + '$14.00' + ) + ); + // Assert that we are rendering the quantity. + await waitFor( () => + expect( getByTestId( container, 'quantity' ).textContent ).toBe( + '2' + ) + ); + } ); + + it( 'updates the cart contents based on the API response', async () => { + jest.spyOn( window, 'fetch' ).mockResolvedValue( responseMock ); + const container = getMiniCartDOM(); + document.body.appendChild( container ); + + getMiniCartTotalsFromServer().then( updateTotals ); + + // Assert we called the correct endpoint. + await waitFor( () => + expect( window.fetch ).toHaveBeenCalledWith( + '/wp-json/wc/store/v1/cart/' + ) + ); + + // Assert we saved the values returned to the localStorage. + await waitFor( () => + expect( window.localStorage.setItem.mock.calls[ 0 ][ 1 ] ).toEqual( + JSON.stringify( localStorageMock ) + ) + ); + + // Assert that we are rendering the amount. + await waitFor( () => + expect( getByTestId( container, 'amount' ).textContent ).toBe( + '$14.00' + ) + ); + // Assert that we are rendering the quantity. + await waitFor( () => + expect( getByTestId( container, 'quantity' ).textContent ).toBe( + '2' + ) + ); + jest.restoreAllMocks(); + } ); +} ); From 51bc46594d3f03de131da22211eed8ecfab71204 Mon Sep 17 00:00:00 2001 From: Luigi Date: Mon, 19 Jun 2023 17:15:55 +0200 Subject: [PATCH 09/24] add woocommerce/woocommerce-blocks#9878 PR --- .../testing/releases/1050.md | 25 ++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/1050.md b/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/1050.md index aa78c793a2f..97c915b4f98 100644 --- a/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/1050.md +++ b/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/1050.md @@ -104,8 +104,31 @@ Before | After ![file.png](https://github.com/woocommerce/woocommerce-blocks/assets/2132595/30fd5c40-b035-4765-ad3b-00e8f1837785) -### Fix error when adding the Reviews by Category block to a store without any product reviews ([9869](https://github.com/woocommerce/woocommerce-blocks/pull/9869)) +### Fix error when adding the Reviews by Category block to a store without any product reviews. ([9869](https://github.com/woocommerce/woocommerce-blocks/pull/9869)) 1. Create a new post: Navigate to Posts > Add New from the WordPress dashboard. 2. Add the All Reviews block: When you're in the new post editor, click on the plus icon (+) in the top left corner or within the post editor to add a new block. Type All Reviews in the search bar and click on it to add the block to your post. 3. Check that the block is inserted to the Editor without any errors. + +### Mini Cart Block: show the total price, including tax, according to the option. ([9878](https://github.com/woocommerce/woocommerce-blocks/pull/9878)) + +1. Open the WooCommerce Settings via WooCommerce > Settings from the sidebar menu of the WP-Admin. +2. Enable the option "Enable tax rates and calculations". +3. Click on the "Tax" tab. +4. Click on "Standard Rates" and configure a tax rate. Save. +5. Click on the "Tax" tab. +6. Set the "Display prices during cart and checkout" option to "Including Tax". +7. With the Site Editor adds the Mini Cart in the header. +8. On the front end, add a product to the cart. +9. Refresh the page. +10. Ensure that the Mini Cart shows the price including the tax. +11. Hover the Mini Cart. +12. Ensure that the Mini Cart shows always the same price. +13. Open the WooCommerce Settings. +14. Click on the "Tax" tab. +15. Set the "Display prices during cart and checkout" option to "Excluding Tax". +16. On the front end, add a product to the cart. +17. Refresh the page. +18. Ensure that the Mini Cart shows the price excluding the tax. +19. Hover the Mini Cart. +20. Ensure that the Mini Cart shows always the same price. From b8d072b29130a604f7e75f9ddfbd1d7069daddf3 Mon Sep 17 00:00:00 2001 From: Luigi Teschio Date: Tue, 20 Jun 2023 08:56:55 +0200 Subject: [PATCH 10/24] fix products block layout on gutenberg 16 (https://github.com/woocommerce/woocommerce-blocks/pull/9886) --- .../assets/js/blocks/product-query/constants.ts | 4 ++++ .../blocks/product-query/variations/related-products.tsx | 8 +++++++- .../docs/internal-developers/testing/smoke-testing.md | 2 +- .../patterns/featured-products-5-cols.php | 2 +- .../patterns/product-collections-featured-collection.php | 2 +- .../patterns/product-collections-newest-arrivals.php | 2 +- .../patterns/product-featured-2-columns.php | 2 +- .../templates/templates/blockified/archive-product.html | 2 +- .../templates/blockified/product-search-results.html | 2 +- .../templates/templates/blockified/single-product.html | 2 +- .../templates/blockified/taxonomy-product_attribute.html | 4 ++-- .../templates/blockified/taxonomy-product_cat.html | 4 ++-- .../templates/blockified/taxonomy-product_tag.html | 4 ++-- 13 files changed, 25 insertions(+), 15 deletions(-) diff --git a/plugins/woocommerce-blocks/assets/js/blocks/product-query/constants.ts b/plugins/woocommerce-blocks/assets/js/blocks/product-query/constants.ts index 61e0b9771cc..f4ef7d34a82 100644 --- a/plugins/woocommerce-blocks/assets/js/blocks/product-query/constants.ts +++ b/plugins/woocommerce-blocks/assets/js/blocks/product-query/constants.ts @@ -74,6 +74,10 @@ export const INNER_BLOCKS_TEMPLATE: InnerBlockTemplate[] = [ 'core/post-template', { __woocommerceNamespace: PRODUCT_TEMPLATE_ID, + layout: { + type: 'grid', + columnsCount: 3, + }, /** * This class is used to add default styles for inner blocks. */ diff --git a/plugins/woocommerce-blocks/assets/js/blocks/product-query/variations/related-products.tsx b/plugins/woocommerce-blocks/assets/js/blocks/product-query/variations/related-products.tsx index e13a243f48b..6ff35170b37 100644 --- a/plugins/woocommerce-blocks/assets/js/blocks/product-query/variations/related-products.tsx +++ b/plugins/woocommerce-blocks/assets/js/blocks/product-query/variations/related-products.tsx @@ -53,7 +53,13 @@ export const INNER_BLOCKS_TEMPLATE: InnerBlockTemplate[] = [ ], [ 'core/post-template', - { __woocommerceNamespace: PRODUCT_TEMPLATE_ID }, + { + __woocommerceNamespace: PRODUCT_TEMPLATE_ID, + layout: { + type: 'grid', + columnsCount: 3, + }, + }, [ [ 'woocommerce/product-image', diff --git a/plugins/woocommerce-blocks/docs/internal-developers/testing/smoke-testing.md b/plugins/woocommerce-blocks/docs/internal-developers/testing/smoke-testing.md index 251f4d00216..7905ffd7277 100644 --- a/plugins/woocommerce-blocks/docs/internal-developers/testing/smoke-testing.md +++ b/plugins/woocommerce-blocks/docs/internal-developers/testing/smoke-testing.md @@ -174,7 +174,7 @@ Note: some blocks might fail to render because they are based on products having
-
+
diff --git a/plugins/woocommerce-blocks/patterns/featured-products-5-cols.php b/plugins/woocommerce-blocks/patterns/featured-products-5-cols.php index db992b2450b..dae4ff3743e 100644 --- a/plugins/woocommerce-blocks/patterns/featured-products-5-cols.php +++ b/plugins/woocommerce-blocks/patterns/featured-products-5-cols.php @@ -14,7 +14,7 @@
- +
diff --git a/plugins/woocommerce-blocks/patterns/product-collections-featured-collection.php b/plugins/woocommerce-blocks/patterns/product-collections-featured-collection.php index 04291c3456d..fbb70e5b508 100644 --- a/plugins/woocommerce-blocks/patterns/product-collections-featured-collection.php +++ b/plugins/woocommerce-blocks/patterns/product-collections-featured-collection.php @@ -23,7 +23,7 @@
- + diff --git a/plugins/woocommerce-blocks/patterns/product-collections-newest-arrivals.php b/plugins/woocommerce-blocks/patterns/product-collections-newest-arrivals.php index c372bdcc66e..117e78d8d8f 100644 --- a/plugins/woocommerce-blocks/patterns/product-collections-newest-arrivals.php +++ b/plugins/woocommerce-blocks/patterns/product-collections-newest-arrivals.php @@ -31,7 +31,7 @@
- +
diff --git a/plugins/woocommerce-blocks/patterns/product-featured-2-columns.php b/plugins/woocommerce-blocks/patterns/product-featured-2-columns.php index 327a432eb21..6ce0f3f557e 100644 --- a/plugins/woocommerce-blocks/patterns/product-featured-2-columns.php +++ b/plugins/woocommerce-blocks/patterns/product-featured-2-columns.php @@ -12,7 +12,7 @@
- + diff --git a/plugins/woocommerce-blocks/templates/templates/blockified/archive-product.html b/plugins/woocommerce-blocks/templates/templates/blockified/archive-product.html index 81687d48b5d..69f533bffd2 100644 --- a/plugins/woocommerce-blocks/templates/templates/blockified/archive-product.html +++ b/plugins/woocommerce-blocks/templates/templates/blockified/archive-product.html @@ -18,7 +18,7 @@
- + diff --git a/plugins/woocommerce-blocks/templates/templates/blockified/product-search-results.html b/plugins/woocommerce-blocks/templates/templates/blockified/product-search-results.html index 109fb56f4d5..17b39c4bb44 100644 --- a/plugins/woocommerce-blocks/templates/templates/blockified/product-search-results.html +++ b/plugins/woocommerce-blocks/templates/templates/blockified/product-search-results.html @@ -16,7 +16,7 @@
- + diff --git a/plugins/woocommerce-blocks/templates/templates/blockified/single-product.html b/plugins/woocommerce-blocks/templates/templates/blockified/single-product.html index 0fecbef4636..501777643c1 100644 --- a/plugins/woocommerce-blocks/templates/templates/blockified/single-product.html +++ b/plugins/woocommerce-blocks/templates/templates/blockified/single-product.html @@ -53,7 +53,7 @@

Related products

- + diff --git a/plugins/woocommerce-blocks/templates/templates/blockified/taxonomy-product_attribute.html b/plugins/woocommerce-blocks/templates/templates/blockified/taxonomy-product_attribute.html index 62d797de82c..3bf25ca4931 100644 --- a/plugins/woocommerce-blocks/templates/templates/blockified/taxonomy-product_attribute.html +++ b/plugins/woocommerce-blocks/templates/templates/blockified/taxonomy-product_attribute.html @@ -18,7 +18,7 @@
- + @@ -46,4 +46,4 @@
- \ No newline at end of file + diff --git a/plugins/woocommerce-blocks/templates/templates/blockified/taxonomy-product_cat.html b/plugins/woocommerce-blocks/templates/templates/blockified/taxonomy-product_cat.html index 62d797de82c..3bf25ca4931 100644 --- a/plugins/woocommerce-blocks/templates/templates/blockified/taxonomy-product_cat.html +++ b/plugins/woocommerce-blocks/templates/templates/blockified/taxonomy-product_cat.html @@ -18,7 +18,7 @@
- + @@ -46,4 +46,4 @@
- \ No newline at end of file + diff --git a/plugins/woocommerce-blocks/templates/templates/blockified/taxonomy-product_tag.html b/plugins/woocommerce-blocks/templates/templates/blockified/taxonomy-product_tag.html index 1de3af7a0ed..9c6699850d0 100644 --- a/plugins/woocommerce-blocks/templates/templates/blockified/taxonomy-product_tag.html +++ b/plugins/woocommerce-blocks/templates/templates/blockified/taxonomy-product_tag.html @@ -18,7 +18,7 @@
- + @@ -43,4 +43,4 @@
-
\ No newline at end of file +
From 6b9c38dfc7debd77dca461a58fdc4159708de757 Mon Sep 17 00:00:00 2001 From: Luigi Date: Tue, 20 Jun 2023 09:00:08 +0200 Subject: [PATCH 11/24] add woocommerce/woocommerce-blocks#9886 PR --- .../docs/internal-developers/testing/releases/1050.md | 7 +++++++ plugins/woocommerce-blocks/readme.txt | 1 + 2 files changed, 8 insertions(+) diff --git a/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/1050.md b/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/1050.md index 97c915b4f98..41a945578e8 100644 --- a/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/1050.md +++ b/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/1050.md @@ -132,3 +132,10 @@ Before | After 18. Ensure that the Mini Cart shows the price excluding the tax. 19. Hover the Mini Cart. 20. Ensure that the Mini Cart shows always the same price. + +### Products block: fix compatibility with Gutenberg 16. ([9878](https://github.com/woocommerce/woocommerce-blocks/pull/9878)) + +1. Ensure that you have Gutenberg 16 installed and enabled. +2. Create a post/page. +3. Add the Products block. +4. Ensure that Products block defaults to the grid layout. diff --git a/plugins/woocommerce-blocks/readme.txt b/plugins/woocommerce-blocks/readme.txt index 525d6f82bef..ae5327bb7af 100644 --- a/plugins/woocommerce-blocks/readme.txt +++ b/plugins/woocommerce-blocks/readme.txt @@ -102,6 +102,7 @@ Release and roadmap notes available on the [WooCommerce Developers Blog](https:/ - Fix mini cart icon not displaying correctly in RTL sites. ([9707](https://github.com/woocommerce/woocommerce-blocks/pull/9707)) - Prevent Mini-Cart drawer to show horizontal scrollbar if the system has visible scrollbars. ([9676](https://github.com/woocommerce/woocommerce-blocks/pull/9676)) - Fix error when adding the Reviews by Category block to a store without any product reviews ([9869](https://github.com/woocommerce/woocommerce-blocks/pull/9869)) +- Products block: fix compatibility with Gutenberg 16. ([9878](https://github.com/woocommerce/woocommerce-blocks/pull/9878)) #### Dependencies From 64438687253ae59ea5050e26df4fd697b44641b0 Mon Sep 17 00:00:00 2001 From: Luigi Date: Tue, 20 Jun 2023 09:01:26 +0200 Subject: [PATCH 12/24] update zip link --- .../docs/internal-developers/testing/releases/1050.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/1050.md b/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/1050.md index 41a945578e8..07215f6af1b 100644 --- a/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/1050.md +++ b/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/1050.md @@ -1,6 +1,6 @@ # Testing notes and ZIP for release 10.5.0 -Zip file for testing: [woocommerce-gutenberg-products-block.zip](https://github.com/woocommerce/woocommerce-blocks/files/11788797/woocommerce-gutenberg-products-block.zip) +Zip file for testing: [woocommerce-gutenberg-products-block.zip](https://github.com/woocommerce/woocommerce-blocks/files/11796960/woocommerce-gutenberg-products-block.zip) ## WooCommerce Core From 8f0d480f73551e1a03e89abd2b7b58b2c92abfac Mon Sep 17 00:00:00 2001 From: Luigi Date: Tue, 20 Jun 2023 09:12:05 +0200 Subject: [PATCH 13/24] update testing instruction for woocommerce/woocommerce-blocks#9809 --- .../docs/internal-developers/testing/releases/1050.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/1050.md b/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/1050.md index 07215f6af1b..615fab4423c 100644 --- a/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/1050.md +++ b/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/1050.md @@ -24,9 +24,10 @@ Zip file for testing: [woocommerce-gutenberg-products-block.zip](https://github. ### Ensure the "Change Address" button is visible in the cart even if local pickup is selected. ([9809](https://github.com/woocommerce/woocommerce-blocks/pull/9809)) 1. Ensure you are using the Cart block. -2. Ensure you have an item in the cart that needs shipping, and a mixture of pickup and flat rates. -2. Select the local pickup shipping method. -3. Confirm the "change address" button is still shown. +2. Go to /wp-admin/profile.php and ensure your test account has a (shipping) address. +3. Ensure you have an item in the cart that needs shipping, and a mixture of pickup and flat rates. +4. Select the local pickup shipping method. +5. Confirm the “change address” button is still shown. ![Screenshot 2023-06-13 at 14 18 51](https://github.com/woocommerce/woocommerce-blocks/assets/90977/69156833-3cba-461d-bec6-a4d07fc6bf50) From 8b1cfe6c879c91b38bf63cf15c4c66f5267e44b8 Mon Sep 17 00:00:00 2001 From: Luigi Date: Tue, 20 Jun 2023 10:26:41 +0200 Subject: [PATCH 14/24] update testing instructions --- .../testing/releases/1050.md | 18 ++++++++++-------- plugins/woocommerce-blocks/readme.txt | 2 +- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/1050.md b/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/1050.md index 615fab4423c..dbe7246dafc 100644 --- a/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/1050.md +++ b/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/1050.md @@ -6,10 +6,11 @@ Zip file for testing: [woocommerce-gutenberg-products-block.zip](https://github. ### Fix error when adding the Reviews by Category block to a store without any product reviews. ([9868](https://github.com/woocommerce/woocommerce-blocks/pull/9868)) -1. Create a new post: To do this, navigate to Posts > Add New from the WordPress dashboard. -2. Add the Reviews by Category block: Inside the new post editor, click on the plus icon (+) at the top left corner or within the post editor to add a new block. In the search bar that appears, type Reviews by Category and click on it to add the block to your post. -3. Configure the Reviews by Category block: Now, you can configure the block based on your needs. Select the category you want to display reviews from using the dropdown in the block selector. -4. Check that the block is inserted to the Editor and no error appears. +1. Make sure your store has no reviews. +2. Create a new post: To do this, navigate to Posts > Add New from the WordPress dashboard. +3. Add the Reviews by Category block: Inside the new post editor, click on the plus icon (+) at the top left corner or within the post editor to add a new block. In the search bar that appears, type Reviews by Category and click on it to add the block to your post. +4. Configure the Reviews by Category block: Now, you can configure the block based on your needs. Select the category you want to display reviews from using the dropdown in the block selector. +5. Check that the block is inserted to the Editor and no error appears. | Before | After | | ------ | ----- | @@ -105,11 +106,12 @@ Before | After ![file.png](https://github.com/woocommerce/woocommerce-blocks/assets/2132595/30fd5c40-b035-4765-ad3b-00e8f1837785) -### Fix error when adding the Reviews by Category block to a store without any product reviews. ([9869](https://github.com/woocommerce/woocommerce-blocks/pull/9869)) +### All Reviews block: Fix error when adding the block to a store without reviews. ([9869](https://github.com/woocommerce/woocommerce-blocks/pull/9869)) -1. Create a new post: Navigate to Posts > Add New from the WordPress dashboard. -2. Add the All Reviews block: When you're in the new post editor, click on the plus icon (+) in the top left corner or within the post editor to add a new block. Type All Reviews in the search bar and click on it to add the block to your post. -3. Check that the block is inserted to the Editor without any errors. +1. Make sure your store has no reviews. +2. Create a new post: Navigate to Posts > Add New from the WordPress dashboard. +3. Add the All Reviews block: When you're in the new post editor, click on the plus icon (+) in the top left corner or within the post editor to add a new block. Type All Reviews in the search bar and click on it to add the block to your post. +4. Check that the block is inserted to the Editor without any errors. ### Mini Cart Block: show the total price, including tax, according to the option. ([9878](https://github.com/woocommerce/woocommerce-blocks/pull/9878)) diff --git a/plugins/woocommerce-blocks/readme.txt b/plugins/woocommerce-blocks/readme.txt index ae5327bb7af..fa10a9d8a3d 100644 --- a/plugins/woocommerce-blocks/readme.txt +++ b/plugins/woocommerce-blocks/readme.txt @@ -101,7 +101,7 @@ Release and roadmap notes available on the [WooCommerce Developers Blog](https:/ - Add RTL preview support for mini-cart. ([9756](https://github.com/woocommerce/woocommerce-blocks/pull/9756)) - Fix mini cart icon not displaying correctly in RTL sites. ([9707](https://github.com/woocommerce/woocommerce-blocks/pull/9707)) - Prevent Mini-Cart drawer to show horizontal scrollbar if the system has visible scrollbars. ([9676](https://github.com/woocommerce/woocommerce-blocks/pull/9676)) -- Fix error when adding the Reviews by Category block to a store without any product reviews ([9869](https://github.com/woocommerce/woocommerce-blocks/pull/9869)) +- All Reviews block: Fix error when adding the block to a store without reviews. ([9869](https://github.com/woocommerce/woocommerce-blocks/pull/9869)) - Products block: fix compatibility with Gutenberg 16. ([9878](https://github.com/woocommerce/woocommerce-blocks/pull/9878)) #### Dependencies From 08842ef3926ef083fbe6d49feeee59d68b5fa36f Mon Sep 17 00:00:00 2001 From: Luigi Date: Tue, 20 Jun 2023 10:30:27 +0200 Subject: [PATCH 15/24] update screenshot --- .../docs/internal-developers/testing/releases/1050.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/1050.md b/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/1050.md index dbe7246dafc..8394731f4e4 100644 --- a/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/1050.md +++ b/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/1050.md @@ -41,7 +41,7 @@ Zip file for testing: [woocommerce-gutenberg-products-block.zip](https://github. | Before | After | | ------ | ----- | -| |Screenshot 2023-06-13 at 16 33 57| +|![image](https://github.com/woocommerce/woocommerce-blocks/assets/4463174/ffa10e39-a8b0-4468-bd6b-30db08cb48a4)|![image](https://github.com/woocommerce/woocommerce-blocks/assets/4463174/5a435970-b94d-477e-986d-478620c60b91)| ### Mini Cart block: Fix icon render in the widget selector. ([9828](https://github.com/woocommerce/woocommerce-blocks/pull/9828)) From e39cc21444b884a54a62a52a14abb733d0ce28d7 Mon Sep 17 00:00:00 2001 From: Niels Lange Date: Tue, 20 Jun 2023 11:52:53 +0200 Subject: [PATCH 16/24] Reference Mini Cart drawer preview dynamically (https://github.com/woocommerce/woocommerce-blocks/pull/9912) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Reference Mini Cart drawer preview dynamically * Update assets/js/blocks/mini-cart/edit.tsx Co-authored-by: Albert Juhé Lluveras --------- Co-authored-by: Albert Juhé Lluveras --- .../woocommerce-blocks/assets/js/blocks/mini-cart/edit.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/woocommerce-blocks/assets/js/blocks/mini-cart/edit.tsx b/plugins/woocommerce-blocks/assets/js/blocks/mini-cart/edit.tsx index e125aa5b7b5..dd72dd190a6 100644 --- a/plugins/woocommerce-blocks/assets/js/blocks/mini-cart/edit.tsx +++ b/plugins/woocommerce-blocks/assets/js/blocks/mini-cart/edit.tsx @@ -19,6 +19,7 @@ import type { ReactElement } from 'react'; import { select } from '@wordpress/data'; import { cartOutline, bag, bagAlt } from '@woocommerce/icons'; import { Icon } from '@wordpress/icons'; +import { WC_BLOCKS_IMAGE_URL } from '@woocommerce/block-settings'; /** * Internal dependencies @@ -163,8 +164,8 @@ const Edit = ( { attributes, setAttributes }: Props ): ReactElement => { className="wc-block-editor-mini-cart__drawer-image" src={ isRTL() - ? '/wp-content/plugins/woocommerce-blocks/images/blocks/mini-cart/cart-drawer-rtl.svg' - : '/wp-content/plugins/woocommerce-blocks/images/blocks/mini-cart/cart-drawer.svg' + ? `${ WC_BLOCKS_IMAGE_URL }blocks/mini-cart/cart-drawer-rtl.svg` + : `${ WC_BLOCKS_IMAGE_URL }blocks/mini-cart/cart-drawer.svg` } alt="" /> From 20be12a52c3bbc947a8ae987e11cda2714891359 Mon Sep 17 00:00:00 2001 From: Luigi Date: Tue, 20 Jun 2023 11:58:01 +0200 Subject: [PATCH 17/24] update zip link --- .../docs/internal-developers/testing/releases/1050.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/1050.md b/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/1050.md index 8394731f4e4..9bc2915d050 100644 --- a/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/1050.md +++ b/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/1050.md @@ -1,6 +1,6 @@ # Testing notes and ZIP for release 10.5.0 -Zip file for testing: [woocommerce-gutenberg-products-block.zip](https://github.com/woocommerce/woocommerce-blocks/files/11796960/woocommerce-gutenberg-products-block.zip) +Zip file for testing: [woocommerce-gutenberg-products-block.zip](https://github.com/woocommerce/woocommerce-blocks/files/11798646/woocommerce-gutenberg-products-block.zip) ## WooCommerce Core From 25f8137e9c7db9e8597fafb24f9e994867d1b0db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Albert=20Juh=C3=A9=20Lluveras?= Date: Tue, 20 Jun 2023 14:41:37 +0200 Subject: [PATCH 18/24] Mini-Cart: don't include shipping price (https://github.com/woocommerce/woocommerce-blocks/pull/9914) --- .../assets/js/blocks/mini-cart/utils/data.ts | 12 ++++++++---- .../assets/js/blocks/mini-cart/utils/test/data.ts | 6 ++++-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/plugins/woocommerce-blocks/assets/js/blocks/mini-cart/utils/data.ts b/plugins/woocommerce-blocks/assets/js/blocks/mini-cart/utils/data.ts index a4d1ea62611..55734b2d259 100644 --- a/plugins/woocommerce-blocks/assets/js/blocks/mini-cart/utils/data.ts +++ b/plugins/woocommerce-blocks/assets/js/blocks/mini-cart/utils/data.ts @@ -10,11 +10,15 @@ import { CartResponse, isBoolean } from '@woocommerce/types'; import { getSettingWithCoercion } from '@woocommerce/settings'; const getPrice = ( cartResponse: CartResponse, showIncludingTax: boolean ) => { - const currency = getCurrencyFromPriceResponse( cartResponse.totals ); + const { totals } = cartResponse; + const currency = getCurrencyFromPriceResponse( totals ); - return showIncludingTax - ? formatPrice( cartResponse.totals.total_price, currency ) - : formatPrice( cartResponse.totals.total_items, currency ); + const subTotal = showIncludingTax + ? parseInt( totals.total_items, 10 ) + + parseInt( totals.total_items_tax, 10 ) + : parseInt( totals.total_items, 10 ); + + return formatPrice( subTotal, currency ); }; export const updateTotals = ( totals: [ string, number ] | undefined ) => { diff --git a/plugins/woocommerce-blocks/assets/js/blocks/mini-cart/utils/test/data.ts b/plugins/woocommerce-blocks/assets/js/blocks/mini-cart/utils/test/data.ts index 7c02da72053..341a590f813 100644 --- a/plugins/woocommerce-blocks/assets/js/blocks/mini-cart/utils/test/data.ts +++ b/plugins/woocommerce-blocks/assets/js/blocks/mini-cart/utils/test/data.ts @@ -19,8 +19,9 @@ const responseMock = { ok: true, json: async () => ( { totals: { - total_price: '1600', + total_price: '1800', total_items: '1400', + total_items_tax: '200', currency_code: 'USD', currency_symbol: '$', currency_minor_unit: 2, @@ -34,8 +35,9 @@ const responseMock = { } as Response; const localStorageMock = { totals: { - total_price: '1600', + total_price: '1800', total_items: '1400', + total_items_tax: '200', currency_code: 'USD', currency_symbol: '$', currency_minor_unit: 2, From 50998bc9fabf61270feedc049ba34a5a82b5147b Mon Sep 17 00:00:00 2001 From: Luigi Date: Tue, 20 Jun 2023 14:46:37 +0200 Subject: [PATCH 19/24] update testing instructions --- .../testing/releases/1050.md | 29 ++++++++++--------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/1050.md b/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/1050.md index 9bc2915d050..72d33121523 100644 --- a/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/1050.md +++ b/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/1050.md @@ -121,20 +121,21 @@ Before | After 4. Click on "Standard Rates" and configure a tax rate. Save. 5. Click on the "Tax" tab. 6. Set the "Display prices during cart and checkout" option to "Including Tax". -7. With the Site Editor adds the Mini Cart in the header. -8. On the front end, add a product to the cart. -9. Refresh the page. -10. Ensure that the Mini Cart shows the price including the tax. -11. Hover the Mini Cart. -12. Ensure that the Mini Cart shows always the same price. -13. Open the WooCommerce Settings. -14. Click on the "Tax" tab. -15. Set the "Display prices during cart and checkout" option to "Excluding Tax". -16. On the front end, add a product to the cart. -17. Refresh the page. -18. Ensure that the Mini Cart shows the price excluding the tax. -19. Hover the Mini Cart. -20. Ensure that the Mini Cart shows always the same price. +7. Now set up a Shipping method going to WooCommerce > Settings > Shipping > Add shipping zone. Create the zone and add a shipping method with a price different from 0. +8. With the Site Editor adds the Mini Cart in the header. +9. On the front end, add a product to the cart and go to the Cart page, so shipping price is calculated. +10. Go back to the Shop page +11. Ensure that the Mini Cart shows the price including the tax, but not including the Shipping prive. +12. Hover the Mini Cart. +13. Ensure that the Mini Cart shows always the same price. +14. Open the WooCommerce Settings. +15. Click on the "Tax" tab. +16. Set the "Display prices during cart and checkout" option to "Excluding Tax". +17. On the front end, add a product to the cart. +18. Refresh the page. +19. Ensure that the Mini Cart shows the price excluding the tax. +20. Hover the Mini Cart. +21. Ensure that the Mini Cart shows always the same price. ### Products block: fix compatibility with Gutenberg 16. ([9878](https://github.com/woocommerce/woocommerce-blocks/pull/9878)) From 70cb05b9914500a60358a24b84e197ae8db17f50 Mon Sep 17 00:00:00 2001 From: Luigi Teschio Date: Tue, 20 Jun 2023 14:52:23 +0200 Subject: [PATCH 20/24] Update docs/internal-developers/testing/releases/1050.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Albert Juhé Lluveras --- .../docs/internal-developers/testing/releases/1050.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/1050.md b/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/1050.md index 72d33121523..2dc3952edde 100644 --- a/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/1050.md +++ b/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/1050.md @@ -88,7 +88,7 @@ Before | After ### Add RTL preview support for mini-cart. ([9756](https://github.com/woocommerce/woocommerce-blocks/pull/9756)) -1. Add post/page and insert the mini-cart block. +1. On a block theme (ie: Twenty Twenty Three), create a new post/page and insert the mini-cart block. 2. Switch to a RTL language such as Arabic. 3. Click on the mini-cart block in the Editor. 4. In the inspector controls, you should see a preview of the mini-cart drawer that shows a RTL version. ( where the drawer opens from the left ). From e92393684c36bb22024611c8814a6b6328b4a01c Mon Sep 17 00:00:00 2001 From: Luigi Teschio Date: Tue, 20 Jun 2023 14:52:31 +0200 Subject: [PATCH 21/24] Update docs/internal-developers/testing/releases/1050.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Albert Juhé Lluveras --- .../docs/internal-developers/testing/releases/1050.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/1050.md b/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/1050.md index 2dc3952edde..3fffa25e461 100644 --- a/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/1050.md +++ b/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/1050.md @@ -25,7 +25,7 @@ Zip file for testing: [woocommerce-gutenberg-products-block.zip](https://github. ### Ensure the "Change Address" button is visible in the cart even if local pickup is selected. ([9809](https://github.com/woocommerce/woocommerce-blocks/pull/9809)) 1. Ensure you are using the Cart block. -2. Go to /wp-admin/profile.php and ensure your test account has a (shipping) address. +2. Go to `/my-account/edit-address/` and ensure your test account has a (shipping) address. 3. Ensure you have an item in the cart that needs shipping, and a mixture of pickup and flat rates. 4. Select the local pickup shipping method. 5. Confirm the “change address” button is still shown. From eb24313fb0437cd2858abc11776d150c93f8afce Mon Sep 17 00:00:00 2001 From: Luigi Teschio Date: Tue, 20 Jun 2023 16:12:30 +0200 Subject: [PATCH 22/24] Products Block: fix grid view with Gutenberg 16 (https://github.com/woocommerce/woocommerce-blocks/pull/9916) * Revert "fix products block layout on gutenberg 16 (https://github.com/woocommerce/woocommerce-blocks/pull/9886)" This reverts commit 53665a5bde7882bf0bda2c1028505082f32af0f9. * add post_template_has_support_for_grid_view setting --- .../js/blocks/product-query/constants.ts | 18 +++++++---- .../variations/related-products.tsx | 15 ++++++--- .../testing/smoke-testing.md | 2 +- .../patterns/featured-products-5-cols.php | 2 +- ...roduct-collections-featured-collection.php | 2 +- .../product-collections-newest-arrivals.php | 2 +- .../patterns/product-featured-2-columns.php | 2 +- .../src/BlockTypes/ProductQuery.php | 32 +++++++++++++++++++ .../templates/blockified/archive-product.html | 2 +- .../blockified/product-search-results.html | 2 +- .../templates/blockified/single-product.html | 2 +- .../taxonomy-product_attribute.html | 4 +-- .../blockified/taxonomy-product_cat.html | 4 +-- .../blockified/taxonomy-product_tag.html | 4 +-- 14 files changed, 69 insertions(+), 24 deletions(-) diff --git a/plugins/woocommerce-blocks/assets/js/blocks/product-query/constants.ts b/plugins/woocommerce-blocks/assets/js/blocks/product-query/constants.ts index f4ef7d34a82..ec91fd2f4f1 100644 --- a/plugins/woocommerce-blocks/assets/js/blocks/product-query/constants.ts +++ b/plugins/woocommerce-blocks/assets/js/blocks/product-query/constants.ts @@ -1,10 +1,10 @@ /** * External dependencies */ -import { getSetting } from '@woocommerce/settings'; +import { getSetting, getSettingWithCoercion } from '@woocommerce/settings'; import { objectOmit } from '@woocommerce/utils'; import type { InnerBlockTemplate } from '@wordpress/blocks'; - +import { isBoolean } from '@woocommerce/types'; /** * Internal dependencies */ @@ -69,19 +69,25 @@ export const QUERY_DEFAULT_ATTRIBUTES: QueryBlockAttributes = { }, }; +// This is necessary to fix https://github.com/woocommerce/woocommerce-blocks/issues/9884. +const postTemplateHasSupportForGridView = getSettingWithCoercion( + 'post_template_has_support_for_grid_view', + false, + isBoolean +); + export const INNER_BLOCKS_TEMPLATE: InnerBlockTemplate[] = [ [ 'core/post-template', { __woocommerceNamespace: PRODUCT_TEMPLATE_ID, - layout: { - type: 'grid', - columnsCount: 3, - }, /** * This class is used to add default styles for inner blocks. */ className: 'products-block-post-template', + ...( postTemplateHasSupportForGridView && { + layout: { type: 'grid', columnCount: 3 }, + } ), }, [ [ diff --git a/plugins/woocommerce-blocks/assets/js/blocks/product-query/variations/related-products.tsx b/plugins/woocommerce-blocks/assets/js/blocks/product-query/variations/related-products.tsx index 6ff35170b37..7fa859db0a9 100644 --- a/plugins/woocommerce-blocks/assets/js/blocks/product-query/variations/related-products.tsx +++ b/plugins/woocommerce-blocks/assets/js/blocks/product-query/variations/related-products.tsx @@ -6,6 +6,8 @@ import { Icon } from '@wordpress/components'; import { __ } from '@wordpress/i18n'; import { stacks } from '@woocommerce/icons'; import { registerBlockSingleProductTemplate } from '@woocommerce/atomic-utils'; +import { getSettingWithCoercion } from '@woocommerce/settings'; +import { isBoolean } from '@woocommerce/types'; /** * Internal dependencies @@ -43,6 +45,12 @@ export const BLOCK_ATTRIBUTES = { }, }; +const postTemplateHasSupportForGridView = getSettingWithCoercion( + 'post_template_has_support_for_grid_view', + false, + isBoolean +); + export const INNER_BLOCKS_TEMPLATE: InnerBlockTemplate[] = [ [ 'core/heading', @@ -55,10 +63,9 @@ export const INNER_BLOCKS_TEMPLATE: InnerBlockTemplate[] = [ 'core/post-template', { __woocommerceNamespace: PRODUCT_TEMPLATE_ID, - layout: { - type: 'grid', - columnsCount: 3, - }, + ...( postTemplateHasSupportForGridView && { + layout: { type: 'grid', columnCount: 3 }, + } ), }, [ [ diff --git a/plugins/woocommerce-blocks/docs/internal-developers/testing/smoke-testing.md b/plugins/woocommerce-blocks/docs/internal-developers/testing/smoke-testing.md index 7905ffd7277..251f4d00216 100644 --- a/plugins/woocommerce-blocks/docs/internal-developers/testing/smoke-testing.md +++ b/plugins/woocommerce-blocks/docs/internal-developers/testing/smoke-testing.md @@ -174,7 +174,7 @@ Note: some blocks might fail to render because they are based on products having
-
+
diff --git a/plugins/woocommerce-blocks/patterns/featured-products-5-cols.php b/plugins/woocommerce-blocks/patterns/featured-products-5-cols.php index dae4ff3743e..db992b2450b 100644 --- a/plugins/woocommerce-blocks/patterns/featured-products-5-cols.php +++ b/plugins/woocommerce-blocks/patterns/featured-products-5-cols.php @@ -14,7 +14,7 @@
- +
diff --git a/plugins/woocommerce-blocks/patterns/product-collections-featured-collection.php b/plugins/woocommerce-blocks/patterns/product-collections-featured-collection.php index fbb70e5b508..04291c3456d 100644 --- a/plugins/woocommerce-blocks/patterns/product-collections-featured-collection.php +++ b/plugins/woocommerce-blocks/patterns/product-collections-featured-collection.php @@ -23,7 +23,7 @@
- + diff --git a/plugins/woocommerce-blocks/patterns/product-collections-newest-arrivals.php b/plugins/woocommerce-blocks/patterns/product-collections-newest-arrivals.php index 117e78d8d8f..c372bdcc66e 100644 --- a/plugins/woocommerce-blocks/patterns/product-collections-newest-arrivals.php +++ b/plugins/woocommerce-blocks/patterns/product-collections-newest-arrivals.php @@ -31,7 +31,7 @@
- +
diff --git a/plugins/woocommerce-blocks/patterns/product-featured-2-columns.php b/plugins/woocommerce-blocks/patterns/product-featured-2-columns.php index 6ce0f3f557e..327a432eb21 100644 --- a/plugins/woocommerce-blocks/patterns/product-featured-2-columns.php +++ b/plugins/woocommerce-blocks/patterns/product-featured-2-columns.php @@ -12,7 +12,7 @@
- + diff --git a/plugins/woocommerce-blocks/src/BlockTypes/ProductQuery.php b/plugins/woocommerce-blocks/src/BlockTypes/ProductQuery.php index 2edd0a5a956..380f9a34224 100644 --- a/plugins/woocommerce-blocks/src/BlockTypes/ProductQuery.php +++ b/plugins/woocommerce-blocks/src/BlockTypes/ProductQuery.php @@ -75,6 +75,38 @@ class ProductQuery extends AbstractBlock { add_filter( 'rest_product_collection_params', array( $this, 'extend_rest_query_allowed_params' ), 10, 1 ); } + /** + * Extra data passed through from server to client for block. + * + * @param array $attributes Any attributes that currently are available from the block. + * Note, this will be empty in the editor context when the block is + * not in the post content on editor load. + */ + protected function enqueue_data( array $attributes = [] ) { + parent::enqueue_data( $attributes ); + + $gutenberg_version = ''; + + if ( is_plugin_active( 'gutenberg/gutenberg.php' ) ) { + if ( defined( 'GUTENBERG_VERSION' ) ) { + $gutenberg_version = GUTENBERG_VERSION; + } + + if ( ! $gutenberg_version ) { + $gutenberg_data = get_file_data( + WP_PLUGIN_DIR . '/gutenberg/gutenberg.php', + array( 'Version' => 'Version' ) + ); + $gutenberg_version = $gutenberg_data['Version']; + } + } + + $this->asset_data_registry->add( + 'post_template_has_support_for_grid_view', + version_compare( $gutenberg_version, '16.0', '>=' ) + ); + } + /** * Check if a given block * diff --git a/plugins/woocommerce-blocks/templates/templates/blockified/archive-product.html b/plugins/woocommerce-blocks/templates/templates/blockified/archive-product.html index 69f533bffd2..81687d48b5d 100644 --- a/plugins/woocommerce-blocks/templates/templates/blockified/archive-product.html +++ b/plugins/woocommerce-blocks/templates/templates/blockified/archive-product.html @@ -18,7 +18,7 @@
- + diff --git a/plugins/woocommerce-blocks/templates/templates/blockified/product-search-results.html b/plugins/woocommerce-blocks/templates/templates/blockified/product-search-results.html index 17b39c4bb44..109fb56f4d5 100644 --- a/plugins/woocommerce-blocks/templates/templates/blockified/product-search-results.html +++ b/plugins/woocommerce-blocks/templates/templates/blockified/product-search-results.html @@ -16,7 +16,7 @@
- + diff --git a/plugins/woocommerce-blocks/templates/templates/blockified/single-product.html b/plugins/woocommerce-blocks/templates/templates/blockified/single-product.html index 501777643c1..0fecbef4636 100644 --- a/plugins/woocommerce-blocks/templates/templates/blockified/single-product.html +++ b/plugins/woocommerce-blocks/templates/templates/blockified/single-product.html @@ -53,7 +53,7 @@

Related products

- + diff --git a/plugins/woocommerce-blocks/templates/templates/blockified/taxonomy-product_attribute.html b/plugins/woocommerce-blocks/templates/templates/blockified/taxonomy-product_attribute.html index 3bf25ca4931..62d797de82c 100644 --- a/plugins/woocommerce-blocks/templates/templates/blockified/taxonomy-product_attribute.html +++ b/plugins/woocommerce-blocks/templates/templates/blockified/taxonomy-product_attribute.html @@ -18,7 +18,7 @@
- + @@ -46,4 +46,4 @@
- + \ No newline at end of file diff --git a/plugins/woocommerce-blocks/templates/templates/blockified/taxonomy-product_cat.html b/plugins/woocommerce-blocks/templates/templates/blockified/taxonomy-product_cat.html index 3bf25ca4931..62d797de82c 100644 --- a/plugins/woocommerce-blocks/templates/templates/blockified/taxonomy-product_cat.html +++ b/plugins/woocommerce-blocks/templates/templates/blockified/taxonomy-product_cat.html @@ -18,7 +18,7 @@
- + @@ -46,4 +46,4 @@
- + \ No newline at end of file diff --git a/plugins/woocommerce-blocks/templates/templates/blockified/taxonomy-product_tag.html b/plugins/woocommerce-blocks/templates/templates/blockified/taxonomy-product_tag.html index 9c6699850d0..1de3af7a0ed 100644 --- a/plugins/woocommerce-blocks/templates/templates/blockified/taxonomy-product_tag.html +++ b/plugins/woocommerce-blocks/templates/templates/blockified/taxonomy-product_tag.html @@ -18,7 +18,7 @@
- + @@ -43,4 +43,4 @@
-
+
\ No newline at end of file From 2349af5216fe240b9ec554e90c67cde4ee9eea1f Mon Sep 17 00:00:00 2001 From: Luigi Date: Tue, 20 Jun 2023 16:14:39 +0200 Subject: [PATCH 23/24] update zip link --- .../docs/internal-developers/testing/releases/1050.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/1050.md b/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/1050.md index 72d33121523..dfd174503cc 100644 --- a/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/1050.md +++ b/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/1050.md @@ -1,6 +1,6 @@ # Testing notes and ZIP for release 10.5.0 -Zip file for testing: [woocommerce-gutenberg-products-block.zip](https://github.com/woocommerce/woocommerce-blocks/files/11798646/woocommerce-gutenberg-products-block.zip) +Zip file for testing: [woocommerce-gutenberg-products-block.zip](https://github.com/woocommerce/woocommerce-blocks/files/11801343/woocommerce-gutenberg-products-block.zip) ## WooCommerce Core From 0cd274d1cf15c6939fa61329331908b15892858f Mon Sep 17 00:00:00 2001 From: Luigi Teschio Date: Wed, 21 Jun 2023 14:27:17 +0200 Subject: [PATCH 24/24] Update docs/internal-developers/testing/releases/1050.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Albert Juhé Lluveras --- .../docs/internal-developers/testing/releases/1050.md | 2 +- plugins/woocommerce-blocks/readme.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/1050.md b/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/1050.md index d626fe7f7f3..2c3a120acf1 100644 --- a/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/1050.md +++ b/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/1050.md @@ -137,7 +137,7 @@ Before | After 20. Hover the Mini Cart. 21. Ensure that the Mini Cart shows always the same price. -### Products block: fix compatibility with Gutenberg 16. ([9878](https://github.com/woocommerce/woocommerce-blocks/pull/9878)) +### Products block: fix compatibility with Gutenberg 16. ([9886](https://github.com/woocommerce/woocommerce-blocks/pull/9886)) 1. Ensure that you have Gutenberg 16 installed and enabled. 2. Create a post/page. diff --git a/plugins/woocommerce-blocks/readme.txt b/plugins/woocommerce-blocks/readme.txt index fa10a9d8a3d..8f5391a87c6 100644 --- a/plugins/woocommerce-blocks/readme.txt +++ b/plugins/woocommerce-blocks/readme.txt @@ -102,7 +102,7 @@ Release and roadmap notes available on the [WooCommerce Developers Blog](https:/ - Fix mini cart icon not displaying correctly in RTL sites. ([9707](https://github.com/woocommerce/woocommerce-blocks/pull/9707)) - Prevent Mini-Cart drawer to show horizontal scrollbar if the system has visible scrollbars. ([9676](https://github.com/woocommerce/woocommerce-blocks/pull/9676)) - All Reviews block: Fix error when adding the block to a store without reviews. ([9869](https://github.com/woocommerce/woocommerce-blocks/pull/9869)) -- Products block: fix compatibility with Gutenberg 16. ([9878](https://github.com/woocommerce/woocommerce-blocks/pull/9878)) +- Products block: fix compatibility with Gutenberg 16. ([9886](https://github.com/woocommerce/woocommerce-blocks/pull/9886)) #### Dependencies