diff --git a/composer.json b/composer.json index 30e9601a613..1aa68ca12a3 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.4.0-dev", + "version": "11.5.0-dev", "keywords": [ "gutenberg", "woocommerce", diff --git a/docs/internal-developers/testing/releases/1140.md b/docs/internal-developers/testing/releases/1140.md new file mode 100644 index 00000000000..d758d2c5c39 --- /dev/null +++ b/docs/internal-developers/testing/releases/1140.md @@ -0,0 +1,392 @@ +# Testing notes and ZIP for release 11.4.0 + +Zip file for testing: [woocommerce-gutenberg-products-block.zip](https://github.com/woocommerce/woocommerce-blocks/files/13127290/woocommerce-gutenberg-products-block.zip) + +## WooCommerce Core + +### Enhancements + +#### Store Customization > Update the "Large Footer" pattern [11381](https://github.com/woocommerce/woocommerce-blocks/pull/11381) + +1. Create a new page or post. +2. Insert the `Large Footer` pattern. +3. Check that it looks like the design. + +| Before | After | +| ------ | ----- | +| Screenshot 2023-10-20 at 13 12 39 | Screenshot 2023-10-20 at 13 12 07 | + +#### [Store Customization] Update the Footer with 3 Menus pattern [11356](https://github.com/woocommerce/woocommerce-blocks/pull/11356) + +1. Create a new page or post. +2. Insert the `Footer with 3 Menus` pattern. +3. Check the space between menu items is smaller than before. + +| Before | After | +| ------ | ----- | +|Screenshot 2023-10-19 at 15 57 55|Screenshot 2023-10-19 at 15 57 13 | + +#### [Store Customization] Update the Social pattern [11355](https://github.com/woocommerce/woocommerce-blocks/pull/11355) + +1. Create a new page or post. +2. Add the `Social: Follow us on social media` pattern. +3. Save and check that the social icons align to the left on a mobile screen size. + +| Before | After | +| ------ | ----- | +| Screenshot 2023-10-19 at 15 43 46 | Screenshot 2023-10-19 at 15 42 34 | + +#### [Store Customization] Re-enable the Product Hero 2 Column 2 Row pattern [11346](https://github.com/woocommerce/woocommerce-blocks/pull/11346) + +1. Create a new page or post. +2. Insert the `Product Hero 2 Column 2 Row` pattern. +3. Check it has images and it renders correctly in the editor and the front end. + +![CleanShot 2023-10-19 at 10 26 13@2x](https://github.com/woocommerce/woocommerce-blocks/assets/186112/186796fb-c05e-403b-91d0-aeb8e13fd466) + +#### Product Collection - shrink columns to fit [11320](https://github.com/woocommerce/woocommerce-blocks/pull/11320) + +1. Go to Editor +2. Add Product Collection block +3. "Shrink columns to fit" is disabled by default. Enable it +4. Label of columns control should change from "Columns" to "Max Columns" +5. Play with the "Max Columns" control and make sure it's respected in the Editor +6. Narrow down the screen width and make sure the number of columns decreases as the screen gets narrower +7. Save the Editor with couple of different "Max Columns" settings and go to frontend +8. Narrow down the screen width and make sure the number of columns decreases as the screen gets narrower +9. Verify frontend on major browsers + +| Before | After | +| ------ | ----- | +|[before](https://github.com/woocommerce/woocommerce-blocks/assets/20098064/ae3e12e0-b894-46b8-9027-614da9a5fb51)|[after](https://github.com/woocommerce/woocommerce-blocks/assets/20098064/ecc7e75c-c787-486c-a000-8f951c52416e)| + +#### [Store Customization] Adjust margins and paddings for the Featured Category Triple [11319](https://github.com/woocommerce/woocommerce-blocks/pull/11319) + +1. Create a new page or post. +2. Add the `Featured Category Triple` pattern. +3. Check the margin and padding are right in the editor and the front end (check screenshots below). + +| Before | After | +| ------ | ----- | +| Screenshot 2023-10-18 at 15 55 33 | Screenshot 2023-10-18 at 15 51 15 | + +#### Move Spinner to components package [11317](https://github.com/woocommerce/woocommerce-blocks/pull/11317) + +1. Ensure you have two or more shipping zones set up on your site and each zone contains at least one method. +2. Add an item to your cart and go to the Checkout block. +3. Change country and observe the shipping options list. +4. Ensure the spinner shows while the shipping methods update. +5. Fill in your details and place the order. +6. On the "Place order" button ensure a spinner shows while it processes. + +#### [Store Customization] Fix "Discount Banner" pattern [11315](https://github.com/woocommerce/woocommerce-blocks/pull/11315) + +1. Create a new page or post. +2. Add the `Discount Banner` pattern. +3. Check that is centered on the page (like the "after" banner in the screenshot 👇). +4. Check it works well on mobile as well. + +![CleanShot 2023-10-18 at 14 36 38@2x](https://github.com/woocommerce/woocommerce-blocks/assets/186112/00dfd99e-e997-49a3-b1c5-5397ccdd1b0f) + +#### Move RadioControland RadioControlAccordion components to components package [11312](https://github.com/woocommerce/woocommerce-blocks/pull/11312) + +1. Install [Multiple Packages for WooCommerce](https://wordpress.org/plugins/multiple-packages-for-woocommerce/) and go to WooCommerce > Settings > Multiple Packages. Set the "Group by" option to Product (individual). +2. Create at least 2 pickup locations (WooCommerce > Settings > Shipping > Local Pickup) +3. Add multiple products to your cart. Ensure you add one product more than once (so you have 2+ of a single item in the cart) +4. Visit the checkout +5. In the shipping options section, switch between different options and make sure the right option is selected and they are greyed out while the http request is in progress. +6. In the shipping method section, switch to Local Pickup +7. Select one of the other pickup locations and make sure the right option is selected. +8. Scroll down to the Payment Options section. +9. Change the payment method and make sure the right option is selected. +10. Fill in all the other details, place the order and make sure it goes through ok. + +#### [Store Customization] Fix pattern spacing in homepage template 3 [11279](https://github.com/woocommerce/woocommerce-blocks/pull/11279) + +1. Create a new page or post. +2. Add all the patterns mentioned above in order. +3. Check there is a margin of exactly 80px between all of them. + +#### [Store Customization] Fix pattern spacing in homepage template 2 [11278](https://github.com/woocommerce/woocommerce-blocks/pull/11278) + +1. Create a new page or post. +2. Add all the patterns mentioned above in order. +3. Check there is a margin of exactly `80px` between all of them. + +#### [Store Customization] Fix pattern spacing in homepage template 1 [11268](https://github.com/woocommerce/woocommerce-blocks/pull/11268) + +1. Create a new page or post. +2. Add all the patterns mentioned above in order. +3. Check there is a margin of exactly `80px` between all of them. + +#### Add: menu-order orderby option for Product Attribute Terms route [11232](https://github.com/woocommerce/woocommerce-blocks/pull/11232) + +1. Edit or create a new page contain Attribute Filter block. +2. See the attribute terms list sorted by custom order in the Editor. +3. Check the page on the front end, confirm the terms are also sorted by custom ordering. + +#### Move FormattedMonetaryAmount to the components package [11230](https://github.com/woocommerce/woocommerce-blocks/pull/11230) + +1. Set a product to be on sale in your store. +2. Install [Multiple Packages for WooCommerce](https://wordpress.org/plugins/multiple-packages-for-woocommerce/) and go to WooCommerce > Settings > Multiple Packages. Set the "Group by" option to Product (individual). +3. Set up local pickup (WooCommerce -> Settings -> Shipping -> Local Pickup) and add a couple of locations. Add a price to this. +4. Set up a couple of shipping options with a price. +5. Add the `Filter by Price` and `Products (Beta)` blocks to a page on your site. +6. Go to the page and ensure the Filter by Price block is displaying the correct range of product prices. +7. Check the product that you set to be on sale, it should be showing the correct sale price, and all other products should be showing the correct price too. +8. Add 2 products to your cart. +9. Go to the Cart block. Ensure all products listed in the order summary sidebar show the correct prices. +10. Ensure the shipping options shown in the Cart block show the correct prices. +11. Ensure all totals in the Cart block are show the correct price. +12. Go to the Checkout block. +13. Ensure the Local Pickup/Shipping selector shows the correct "From" price in the buttons +image + +14. Select Shipping and scroll down to the shipping section. Ensure all shipping options show the correct price. +15. Change to Local Pickup and ensure the correct price is shown alongside the pickup location's name. +16. Ensure the totals are correct in the checkout sidebar. +17. Repeat steps 5, 6, 7 but with the `All Products block`. + +#### Cart and Checkout block transforms for classic shortcodes [11228](https://github.com/woocommerce/woocommerce-blocks/pull/11228) + +Prerequisite: Ensure you're already using cart and checkout blocks and you have an incompatible extension installed. You can use `WooCommerce Checkout Field Editor` as an example. + +1. Go to WooCommece > Home. There should be a task list item "Review your shopper's checkout experience". Click it. You should be taken to the page editor. +2. Edit the cart page + 1. Edit the cart page + 2. Focus on the parent cart block and click its icon. You should be able to transform to "classic cart" + 3. Refresh the editor + 4. Focus on the cart block. See the incompatibility notice in the sidebar. Click the "switch to classic cart" button. + 5. Modal should open. Click switch. Block should be replaced. + 6. In the snackbar bottom left, click "undo". Should revert back to blocks. +3. Repeat above tests for **checkout block**. Pay attention to wording and ensure any references to "cart" are updated with "checkout" during the process. + +#### Move Chip and RemovableChip to components package [11223](https://github.com/woocommerce/woocommerce-blocks/pull/11223) + +1. Create a coupon +2. Add the Active Filters block to a page, add the Filter by Attribute block, the Filter by Stock block, and the Products (Beta) block too. +3. Visit the page, apply some filters, ensure the chips show up correctly in the Active Filters block. Remove the filters by pressing the `x` on the chip. +image + +4. Visit the Cart block. Apply the coupon you created in step 1. Ensure the coupon shows correctly: +image + +5. Remove the coupon. +6. Proceed to the Checkout block and re-apply the coupon, ensure it shows correctly and ensure it can be removed. + +#### Move CheckboxList and create new blocksComponents package [11214](https://github.com/woocommerce/woocommerce-blocks/pull/11214) + +1. Add the `Filter by Rating`, `Filter by Attribute`, `Filter by Stock`, and `Products (Beta)` blocks to a page. +2. View the page and ensure all the checkboxes work correctly on each of the filter blocks. +3. View the Cart and then Checkout blocks. Ensure they render correctly. +4. Check out and ensure the Checkout form works correctly (Should not be affected by this PR but run this test anyway to make sure we didn't miss anything) + +#### [Store Customization MVP] Add fallbacks to all the pattern titles, descriptions and buttons [11208](https://github.com/woocommerce/woocommerce-blocks/pull/11208) + +1. Create a new page or post. +2. Insert all the patterns in the `dictionary.json` file. +3. Make sure they work as expected both on the editor side and on the front end. +4. Check your PHP error log and confirm you don't see any errors related to any pattern. + +#### Make patterns full width and fix margin [11206](https://github.com/woocommerce/woocommerce-blocks/pull/11206) + +##### Test the individual patterns + +1. Create a new page or post. +2. Insert the blocks mentioned on the PR description. +3. Make sure they are `Full width` and look good on the editor and the front end. + +**Test the homepage templates** +Compare the 3 templates show below to the designs: Mrk6SERPZ4KrFHSjM0a8TK-fi-5716_46688 + +| Homepage 1 | Homepage 2 | Homepage 3 | +|--------|--------|--------| +| ![homepage1](https://github.com/woocommerce/woocommerce-blocks/assets/186112/a0f6f306-1891-48ff-a219-44c55873cfc9)| ![homepage2](https://github.com/woocommerce/woocommerce-blocks/assets/186112/1221406c-95b6-4c8b-8f34-c2efc1d829f9)|![homepage3](https://github.com/woocommerce/woocommerce-blocks/assets/186112/6778ba76-1b20-4a84-a74f-c5ff0741f0bb)| + +#### Product Collection 5 Columns pattern - Update title and price to be rows instead of columns [11205](https://github.com/woocommerce/woocommerce-blocks/pull/11205) + +1. Create post or page. +2. Insert the `Product Collection 5 Columns` pattern and check that the title and price are stacked rather than side-by-side. +3. Ensure the spacing between the title and price is consistent with other Product Collection patterns. You can check by searching `Product Collection` under the patterns tab to find others. + +| Before | After | +| ------ | ----- | +| ![Screenshot 2023-10-11 at 11 24 44](https://github.com/woocommerce/woocommerce-blocks/assets/8639742/704652b0-7fe4-4d0a-95a8-e06156444eb0) | ![Screenshot 2023-10-11 at 11 24 07](https://github.com/woocommerce/woocommerce-blocks/assets/8639742/a30a275b-ee03-4e72-9e97-d2164101de90) | + +#### Product Collection: Featured Products 5 Columns - Remove no results block. [11198](https://github.com/woocommerce/woocommerce-blocks/pull/11198) + +1. Create new page or post +2. add Product Collection: Featured Products 5 Columns pattern +3. Ensure the `wp:query-no-results` block isn't rendered and that the text `Add text or blocks that will display when a query returns no results.` isn't present. + +| Before | After | +| ------ | ----- | +| ![Screenshot 2023-10-10 at 14 11 47](https://github.com/woocommerce/woocommerce-blocks/assets/8639742/fdd7f061-7411-4158-af11-6a226215ea45) | ![Screenshot 2023-10-10 at 14 09 50](https://github.com/woocommerce/woocommerce-blocks/assets/8639742/776f45a2-1cfc-431f-9df8-8b66175ca804) | + +### Bug Fixes + +#### Remove hardcoded queryIds from patterns that include Product Collection [11290](https://github.com/woocommerce/woocommerce-blocks/pull/11290) + +1. Go to Editor +2. Add patterns: + - Product Collection Full Grid + - Product Collection Grid + - Product Collection Rows + - Product Collection Simple Grid + - Product Gallery +3. Save and go to frontend +4. Change the pages of each Product Collection +5. Expected: Each Product Collection changes pages independently and layout of Product Collection doesn't change + +#### Fix: Mini-Cart block shows wrong total if theres multiple installs on the same domain [11257](https://github.com/woocommerce/woocommerce-blocks/pull/11257) + +1. Setup _Site B_ on domain.com/test and use USD as the currency +5. See the Site B Mini Cart works as expected. +1. Setup _Site A_ on domain.com, lets use EUR as the currency +3. Add something to the cart on _Site A_ +4. Go to _Site B_ and **don't see** its mini-cart affected by site A. + +#### Fix inconsistent border focus styles [11203](https://github.com/woocommerce/woocommerce-blocks/pull/11203) + +1. Create a test page and add the Checkout block to it. +2. Go to the frontend and add a product to the cart. +3. Go to the checkout and select these fields: `Text input`, `Textarea`, `Radio input`, and `Checkbox input`. +4. Verify that the border focus styles of the `Text input` and `Textarea` are identical. +5. Verify that the border focus styles of the `Radio input` and `Checkbox input` are identical. + + +> **Important** +> Only the border focus styles of the `Radio input` and `Textarea` were adjusted in this PR, as the `Text input` and `Checkbox input` focus styles were already correct. + +##### `Radio input` + + + + + + +
Before: +

+Screenshot 2023-10-11 at 15 58 06 +
After: +

+Screenshot 2023-10-11 at 15 54 25 +
+ +##### `Textarea` + + + + + + +
Before: +

+Screenshot 2023-10-11 at 15 58 19 +
After: +

+Screenshot 2023-10-11 at 15 54 43 +
+ +#### Product Gallery pattern: Use the Product Collection block [11194](https://github.com/woocommerce/woocommerce-blocks/pull/11194) + +1. Create a page and add the `woocommerce-blocks/product-query-product-gallery` pattern. +2. Ensure that `Add "remove more" link text` doesn't appear in the editor above the price. +3. Ensure that it looks accurate on the frontend based on what you see in the editor. + +#### Increase number of visible products when cart is empty [11182](https://github.com/woocommerce/woocommerce-blocks/pull/11182) + +1. Create a testing site using [WordPress 6.4 Beta 2](https://wordpress.org/news/2023/10/wordpress-6-4-beta-2/). +2. Ensure that you are using the Twenty Twenty-Four theme. +3. Ensure that you have at least four products of which at least one of the most recent ones has a discounted price. +4. Create a test page and add the Cart block to it. +5. Switch the view from `Filled Cart` to `Empty Cart`. +6. Verify that four products are visible and that the sales badge is shown within the product image. +7. Go to the frontend. +8. Do not add a product to the cart and go directly to the test page with the cart block. +9. Verify that four products are visible and that the sales badge is shown within the product image. + + + + + + +
Before: +

+ +Screenshot 2023-10-09 at 20 05 46 + +
After: +

+ +Screenshot 2023-10-09 at 20 00 50 + +
+ +> **Note** +> Depending on the screen size, the sales badge might overlap or be visible next to the product image. + +#### Copy shipping phone to billing phone if sync is checked [10603](https://github.com/woocommerce/woocommerce-blocks/pull/10603) + +1. In Checkout, make sure the "use shipping as billing" is filled. +2. Fill out the phone number. +3. Uncheck the checkbox, the value should be copied. +4. Update shipping, it shouldn't keep syncing. + +#### Always show the Enable the shipping calculator on the cart page option in WC Admin [11421](https://github.com/woocommerce/woocommerce-blocks/pull/11421) + +1. Go to `WooCommerce -> Settings -> Advanced` - set the Cart page to one containing the Cart Block. Save. +2. Go to `WooCommerce -> Settings -> Shipping -> Shipping Options` - confirm the `Enable the shipping calculator on the cart page` option is displayed. +3. Check the `Enable the shipping calculator on the cart page` option and save. +4. Add a product to the cart and go to the Cart page. Confirm the shipping calculator is displayed +5. Go to `WooCommerce -> Settings -> Shipping -> Shipping Options` - Uncheck the `Enable the shipping calculator on the cart page` option and save. +6. Go to the Cart page on the front-end. Confirm the shipping calculator is hidden. + +| Before | After | +| ------ | ----- | +| image | image | + +#### Add a safe guard that the variable is set before accessing it [11424](https://github.com/woocommerce/woocommerce-blocks/pull/11424) + +1. Go to Editor +2. Add Product Collection block +3. Enter Code Editor mode +4. Find and remove `"shrinkColumns":false"` - it will mimic the case it's undefined + +image + +5. Save the page/template and go to frontend +6. Make sure there's no warning and Product Collection is rendered in non-responsive mode (when you narrow down the screen it will preserve the number of columns and finally collapse to single one for mobile view) + +### Documentation + +#### Add order and checkout order endpoint documentation [11157](https://github.com/woocommerce/woocommerce-blocks/pull/11157) + +1. Check that the docs look complete + +### Should be tested by the development team exclusively + +#### Use the main tag in Cart and Checkout templates [11224](https://github.com/woocommerce/woocommerce-blocks/pull/11224) + +1. Install and activate a blocks theme eg TT3/TT4 +2. Go to `Appearance` > `Editor` > `Templates` > `Manage All Templates` +3. Ensure `Page: Cart` and `Page: Checkout` do not have customizations (or delete them if so), and enter edition mode for each one +4. On List View select `Group` after the `Header` (`Checkout Header` on `Page: Checkout` template), open `Block` > `Advanced` pane and ensure `HTML ELEMENT` is set to `
` +5. Do a test purchase, and on the cart and checkout pages verify the content is wrapped under a `
`tag + +#### Update wording on checkout error message to try to prevent retries [10888](https://github.com/woocommerce/woocommerce-blocks/pull/10888) + +1. Add a new snippet to your site: + +```php +add_filter( 'wp_mail', function( $args ) { + exit; +} ); +``` + +2. Add an item to your cart and go to the Checkout block. +3. Place your order and verify the error shows with the correct wording. + +| Before | After | +| ------ | ----- | +| image | image | diff --git a/docs/internal-developers/testing/releases/1141.md b/docs/internal-developers/testing/releases/1141.md new file mode 100644 index 00000000000..9162934195d --- /dev/null +++ b/docs/internal-developers/testing/releases/1141.md @@ -0,0 +1,13 @@ +# Testing notes and ZIP for release 11.4.1 + +Zip file for testing: [woocommerce-gutenberg-products-block.zip](https://github.com/woocommerce/woocommerce-blocks/files/13166106/woocommerce-gutenberg-products-block.zip) + +## WooCommerce Core + +### Bug Fixes + +#### Regenerate package + +1. Add a new post. +2. Add the All Products block. +3. Make sure there are no errors in the editor or the page. diff --git a/docs/internal-developers/testing/releases/README.md b/docs/internal-developers/testing/releases/README.md index 5c0af25d17f..5f8551a2e37 100644 --- a/docs/internal-developers/testing/releases/README.md +++ b/docs/internal-developers/testing/releases/README.md @@ -181,6 +181,8 @@ Every release includes specific testing instructions for new features and bug fi - [11.2.0](./1120.md) - [11.3.0](./1130.md) - [11.3.1](./1131.md) +- [11.4.0](./1140.md) + - [11.4.1](./1141.md) diff --git a/package-lock.json b/package-lock.json index 583f5515ca5..64f2856eb57 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@woocommerce/block-library", - "version": "11.4.0-dev", + "version": "11.5.0-dev", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@woocommerce/block-library", - "version": "11.4.0-dev", + "version": "11.5.0-dev", "hasInstallScript": true, "license": "GPL-3.0+", "dependencies": { diff --git a/package.json b/package.json index c0f3e6861eb..0b0f71b27f9 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "@woocommerce/block-library", "title": "WooCommerce Blocks", "author": "Automattic", - "version": "11.4.0-dev", + "version": "11.5.0-dev", "description": "WooCommerce blocks for the Gutenberg editor.", "homepage": "https://github.com/woocommerce/woocommerce-gutenberg-products-block/", "keywords": [ diff --git a/patterns/product-collection-4-columns.php b/patterns/product-collection-4-columns.php index 03a6e20e8d8..cfce3bcd55b 100644 --- a/patterns/product-collection-4-columns.php +++ b/patterns/product-collection-4-columns.php @@ -26,7 +26,7 @@ - + diff --git a/readme.txt b/readme.txt index 043dc2eef05..12010d77977 100644 --- a/readme.txt +++ b/readme.txt @@ -1,10 +1,10 @@ === WooCommerce Blocks === Contributors: automattic, woocommerce, claudiulodro, tiagonoronha, jameskoster, ryelle, levinmedia, aljullu, mikejolley, nerrad, joshuawold, assassinateur, haszari, mppfeiffer, nielslange, opr18, ralucastn, tjcafferkey, danielwrobert, patriciahillebrandt, albarin, dinhtungdu, royho, imanish003, karolmanijak, sunyatasattva, alexandrelara, gigitux, danieldudzic, samueljseay, alexflorisca, opr18, tarunvijwani, pauloarromba, saadtarhi Tags: gutenberg, woocommerce, woo commerce, products, blocks, woocommerce blocks -Requires at least: 6.3 -Tested up to: 6.3 -Requires PHP: 7.3 -Stable tag: 11.3.1 +Requires at least: 6.3.2 +Tested up to: 6.3.2 +Requires PHP: 7.4 +Stable tag: 11.4.1 License: GPLv3 License URI: https://www.gnu.org/licenses/gpl-3.0.html @@ -81,6 +81,64 @@ Release and roadmap notes available on the [WooCommerce Developers Blog](https:/ == Changelog == += 11.4.1 - 2023-10-25 = + +#### Bug Fixes + +- Regenerate package. + += 11.4.0 - 2023-10-24 = + +#### Enhancements + +- Store Customization: Update the "Large Footer" pattern. (https://github.com/woocommerce/woocommerce-blocks/pull/11381) +- Store Customization: Update the `Footer with 3 Menus` pattern. (https://github.com/woocommerce/woocommerce-blocks/pull/11356) +- Store Customization: Update the Social pattern. (https://github.com/woocommerce/woocommerce-blocks/pull/11355) +- Store Customization: Re-enable the `Product Hero 2 Column 2 Row` pattern. (https://github.com/woocommerce/woocommerce-blocks/pull/11346) +- Product Collection: Shrink columns to fit. (https://github.com/woocommerce/woocommerce-blocks/pull/11320) +- Store Customization: Adjust margins and paddings for the `Featured Category Triple`. (https://github.com/woocommerce/woocommerce-blocks/pull/11319) +- Move `Spinner` to components package. (https://github.com/woocommerce/woocommerce-blocks/pull/11317) +- Store Customization: Fix "Discount Banner" pattern. (https://github.com/woocommerce/woocommerce-blocks/pull/11315) +- Move `RadioControl`and `RadioControlAccordion` components to components package. (https://github.com/woocommerce/woocommerce-blocks/pull/11312) +- Store Customization: Fix the "Testimonials 3 Columns" title alignment. (https://github.com/woocommerce/woocommerce-blocks/pull/11281) +- Store Customization: Fix pattern spacing in homepage template 3. (https://github.com/woocommerce/woocommerce-blocks/pull/11279) +- Store Customization: Fix pattern spacing in homepage template 2. (https://github.com/woocommerce/woocommerce-blocks/pull/11278) +- Store Customization: Fix pattern spacing in homepage template 1. (https://github.com/woocommerce/woocommerce-blocks/pull/11268) +- Store Customization: Remove placeholder text from the image on the Hero Product Chessboard pattern. (https://github.com/woocommerce/woocommerce-blocks/pull/11250) +- Move `FormStep` to the components package. (https://github.com/woocommerce/woocommerce-blocks/pull/11246) +- Temporarily disable the `woocommerce-blocks/product-hero-2-col-2-row` pattern. (https://github.com/woocommerce/woocommerce-blocks/pull/11234) +- Add: `menu-order` orderby option for Product Attribute Terms route. (https://github.com/woocommerce/woocommerce-blocks/pull/11232) +- Move `FormattedMonetaryAmount` to the components package. (https://github.com/woocommerce/woocommerce-blocks/pull/11230) +- Cart and Checkout block transforms for classic shortcodes. (https://github.com/woocommerce/woocommerce-blocks/pull/11228) +- Use the
tag in Cart and Checkout templates. (https://github.com/woocommerce/woocommerce-blocks/pull/11224) +- Move `Chip` and `RemovableChip` to components package. (https://github.com/woocommerce/woocommerce-blocks/pull/11223) +- Move `CheckboxList` and create new `blocksComponents` package. (https://github.com/woocommerce/woocommerce-blocks/pull/11214) +- Store Customization MVP: Add fallbacks to all the pattern titles, descriptions and buttons. (https://github.com/woocommerce/woocommerce-blocks/pull/11208) +- Checkout Field Padding and Spacing. (https://github.com/woocommerce/woocommerce-blocks/pull/11207) +- Make patterns full width and fix margin. (https://github.com/woocommerce/woocommerce-blocks/pull/11206) +- Product Collection 5 Columns pattern: Update title and price to be rows instead of columns. (https://github.com/woocommerce/woocommerce-blocks/pull/11205) +- Product Collection: Featured Products 5 Columns: Remove no results block. (https://github.com/woocommerce/woocommerce-blocks/pull/11198) +- Add universal border radius for form elements and components. (https://github.com/woocommerce/woocommerce-blocks/pull/11193) +- Update wording on checkout error message to try to prevent retries. (https://github.com/woocommerce/woocommerce-blocks/pull/10888) + +#### Bug Fixes + +- Remove hardcoded queryIds from patterns that include Product Collection. (https://github.com/woocommerce/woocommerce-blocks/pull/11290) +- Fix: Mini-Cart block shows wrong total if theres multiple installs on the same domain. (https://github.com/woocommerce/woocommerce-blocks/pull/11257) +- Fix inconsistent border focus styles. (https://github.com/woocommerce/woocommerce-blocks/pull/11203) +- Product Gallery pattern: Use the Product Collection block. (https://github.com/woocommerce/woocommerce-blocks/pull/11194) +- Increase number of visible products when cart is empty. (https://github.com/woocommerce/woocommerce-blocks/pull/11182) +- Fix a bug in which shipping phone field was not being synced to the billing field. (https://github.com/woocommerce/woocommerce-blocks/pull/10603) +- Always show the `Enable the shipping calculator on the cart page` option. (https://github.com/woocommerce/woocommerce-blocks/pull/11421) + +#### Documentation + +- Add order and checkout order endpoint documentation. (https://github.com/woocommerce/woocommerce-blocks/pull/11157) + +#### Various + +- Add Local Pickup event and Cart/Checkout page views events. (https://github.com/woocommerce/woocommerce-blocks/pull/11225) + = 11.3.1 - 2023-10-16 = #### Bug Fixes diff --git a/src/BlockPatterns.php b/src/BlockPatterns.php index 9895b3696ca..c99b46905e8 100644 --- a/src/BlockPatterns.php +++ b/src/BlockPatterns.php @@ -52,7 +52,8 @@ public function __construct( Package $package ) { $this->patterns_path = $package->get_path( 'patterns' ); add_action( 'init', array( $this, 'register_block_patterns' ) ); - add_action( 'update_option_woo_ai_describe_store_description', array( $this, 'schedule_patterns_content_update' ), 10, 2 ); + add_action( 'update_option_woo_ai_describe_store_description', array( $this, 'schedule_on_option_update' ), 10, 2 ); + add_action( 'upgrader_process_complete', array( $this, 'schedule_on_plugin_update' ), 10, 2 ); add_action( 'woocommerce_update_patterns_content', array( $this, 'update_patterns_content' ) ); } @@ -211,7 +212,36 @@ public function register_block_patterns() { * @param string $option The option name. * @param string $value The option value. */ - public function schedule_patterns_content_update( $option, $value ) { + public function schedule_on_option_update( $option, $value ) { + $this->schedule_patterns_content_update( $value ); + } + + /** + * Update the patterns content when the WooCommerce Blocks plugin is updated. + * + * @param \WP_Upgrader $upgrader_object WP_Upgrader instance. + * @param array $options Array of bulk item update data. + */ + public function schedule_on_plugin_update( $upgrader_object, $options ) { + if ( 'update' === $options['action'] && 'plugin' === $options['type'] ) { + foreach ( $options['plugins'] as $plugin ) { + if ( str_contains( $plugin, 'woocommerce-gutenberg-products-block.php' ) || str_contains( $plugin, 'woocommerce.php' ) ) { + $business_description = get_option( 'woo_ai_describe_store_description' ); + + if ( $business_description ) { + $this->schedule_patterns_content_update( $business_description ); + } + } + } + } + } + + /** + * Update the patterns content when the store description is changed. + * + * @param string $business_description The business description. + */ + public function schedule_patterns_content_update( $business_description ) { if ( ! class_exists( 'WooCommerce' ) ) { return; } @@ -224,7 +254,7 @@ public function schedule_patterns_content_update( $option, $value ) { require_once $action_scheduler; - as_schedule_single_action( time(), 'woocommerce_update_patterns_content', array( $value ) ); + as_schedule_single_action( time(), 'woocommerce_update_patterns_content', array( $business_description ) ); } /** diff --git a/src/Package.php b/src/Package.php index 45aa6a4b860..3924b25e4e6 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.4.0-dev'; + $version = '11.5.0-dev'; return new NewPackage( $version, dirname( __DIR__ ), diff --git a/woocommerce-gutenberg-products-block.php b/woocommerce-gutenberg-products-block.php index c83b8e47a81..92a5babacc7 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.4.0-dev + * Version: 11.5.0-dev * Author: Automattic * Author URI: https://woocommerce.com * Text Domain: woo-gutenberg-products-block