Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
Merge branch 'trunk' into fix/render-product-summary-and-title-blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
nefeline authored Jun 23, 2023
2 parents 9e66771 + 872e2ad commit f8d4d54
Show file tree
Hide file tree
Showing 6 changed files with 94 additions and 4 deletions.
67 changes: 67 additions & 0 deletions docs/internal-developers/testing/releases/1024.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Testing notes and ZIP for release 10.2.4

Zip file for testing: [woocommerce-gutenberg-products-block.zip](https://github.com/woocommerce/woocommerce-blocks/files/11835530/woocommerce-gutenberg-products-block.zip)

## WooCommerce Core

### Add back filter blocks frontend scripts ([9954](https://github.com/woocommerce/woocommerce-blocks/pull/9954))

#### Test that the old markup of filter blocks still works

1. Add a new page, click on three dots on the right top corner and select "Code Editor"
![image](https://github.com/woocommerce/woocommerce-blocks/assets/11503784/dc294e6a-d924-49b0-8ce5-51f0df829390)

2. Paste the following code and exit the code editor

```HTML
<!-- wp:columns -->
<div class="wp-block-columns"><!-- wp:column {"width":"33.33%"} -->
<div class="wp-block-column" style="flex-basis:33.33%"><!-- wp:woocommerce/price-filter -->
<div class="wp-block-woocommerce-price-filter is-loading" data-showinputfields="true" data-showfilterbutton="false" data-heading="Filter by price" data-heading-level="3"><span aria-hidden="true" class="wc-block-product-categories__placeholder"></span></div>
<!-- /wp:woocommerce/price-filter -->

<!-- wp:woocommerce/attribute-filter {"attributeId":1,"displayStyle":"dropdown","heading":"Filter by Color"} -->
<div class="wp-block-woocommerce-attribute-filter is-loading" data-attribute-id="1" data-show-counts="true" data-query-type="or" data-heading="Filter by Color" data-heading-level="3" data-display-style="dropdown"><span aria-hidden="true" class="wc-block-product-attribute-filter__placeholder"></span></div>
<!-- /wp:woocommerce/attribute-filter -->

<!-- wp:woocommerce/attribute-filter {"attributeId":2,"heading":"Filter by Size"} -->
<div class="wp-block-woocommerce-attribute-filter is-loading" data-attribute-id="2" data-show-counts="true" data-query-type="or" data-heading="Filter by Size" data-heading-level="3"><span aria-hidden="true" class="wc-block-product-attribute-filter__placeholder"></span></div>
<!-- /wp:woocommerce/attribute-filter -->

<!-- wp:woocommerce/active-filters -->
<div class="wp-block-woocommerce-active-filters is-loading" data-display-style="list" data-heading="Active filters" data-heading-level="3"><span aria-hidden="true" class="wc-block-active-product-filters__placeholder"></span></div>
<!-- /wp:woocommerce/active-filters -->

<!-- wp:woocommerce/stock-filter -->
<div class="wp-block-woocommerce-stock-filter is-loading" data-show-counts="true" data-heading="Filter by stock status" data-heading-level="3"><span aria-hidden="true" class="wc-block-product-stock-filter__placeholder"></span></div>
<!-- /wp:woocommerce/stock-filter --></div>
<!-- /wp:column -->

<!-- wp:column {"width":"66.66%"} -->
<div class="wp-block-column" style="flex-basis:66.66%"><!-- wp:woocommerce/all-products {"columns":3,"rows":3,"alignButtons":false,"contentVisibility":{"orderBy":true},"orderby":"date","layoutConfig":[["woocommerce/product-image"],["woocommerce/product-title"],["woocommerce/product-price"],["woocommerce/product-rating"],["woocommerce/product-button"]]} -->
<div class="wp-block-woocommerce-all-products wc-block-all-products" data-attributes="{&quot;alignButtons&quot;:false,&quot;columns&quot;:3,&quot;contentVisibility&quot;:{&quot;orderBy&quot;:true},&quot;isPreview&quot;:false,&quot;layoutConfig&quot;:[[&quot;woocommerce/product-image&quot;],[&quot;woocommerce/product-title&quot;],[&quot;woocommerce/product-price&quot;],[&quot;woocommerce/product-rating&quot;],[&quot;woocommerce/product-button&quot;]],&quot;orderby&quot;:&quot;date&quot;,&quot;rows&quot;:3}"></div>
<!-- /wp:woocommerce/all-products --></div>
<!-- /wp:column --></div>
<!-- /wp:columns -->
```

2. Publish the page.
3. Go to the frontend.
4. Verify filter blocks are rendered correctly. Interact with them and verify they work properly.

Before | After
--- | ---
![imatge](https://github.com/woocommerce/woocommerce-blocks/assets/3616980/534ddab8-9bd2-4dde-a41c-7655ab88f265) | ![imatge](https://github.com/woocommerce/woocommerce-blocks/assets/3616980/67992042-c508-48c7-884a-2dfdb75fdc3b)



##### Test that filter blocks translations are loaded correctly

1. Change your store language to a locale that has translations (ie: Spanish).
2. Add the Filter by Attribute, Filter by Price, Filter by Stock and Filter by Rating blocks to a post or page, alongside the Active Filters and Products (beta) blocks.
3. In the frontend, interact with the filter blocks and verify they all work properly.
4. Verify translations are loaded correctly. Ie: Filter by Attribute shows "Seleccionar" instead of "Select" in the input field.

Before | After
--- | ---
![imatge](https://github.com/woocommerce/woocommerce-blocks/assets/3616980/db3c0465-bbb9-4098-8338-3a7418de0284) | ![imatge](https://github.com/woocommerce/woocommerce-blocks/assets/3616980/aec0a8d7-0af2-4166-b0a1-68f1f2d62e01)
11 changes: 10 additions & 1 deletion docs/internal-developers/testing/releases/1040.md
Original file line number Diff line number Diff line change
Expand Up @@ -414,9 +414,18 @@ Note: Notice will appear for a few seconds until we receive the server's respons
2. Edit the `Single Product` template.
3. Be sure that the `Classic Product Template` is visible.
4. Click on `transform into blocks` button.
5. Open the inserter and search for: `WooCommerce Single Product Template` (for other templates, update the name with the name of the template).
5. Open the inserter and search for: `WooCommerce Single Product Block` (for other templates, check the table below).
6. Repeat those steps for: `Product Catalog`, `Products by Attribute`, `Products by Category`, `Products by Tag` and `Products Search Results` templates.

| Template | Block Name |
|------------------------|------------------------------------------|
| Single Product | WooCommerce Single Product Block |
| Product Catalog | WooCommerce Product Grid Block |
| Product Search Results | WooCommerce Product Search Results Block |
| Products by Attribute | WooCommerce Product Attribute Block |
| Products by Category | WooCommerce Product Taxonomy Block |
| Products By Tag | WooCommerce Product Tag Block |


### Add to Cart with Options block: Prevent page redirection when clicking on Add to Cart button [#9691](https://github.com/woocommerce/woocommerce-blocks/pull/9691)

Expand Down
3 changes: 2 additions & 1 deletion docs/internal-developers/testing/releases/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@ Every release includes specific testing instructions for new features and bug fi
- [10.2.0](./1020.md)
- [10.2.1](./1021.md)
- [10.2.2](./1022.md)
- [10.2.2](./1023.md)
- [10.2.3](./1023.md)
- [10.2.4](./1024.md)
- [10.3.0](./1030.md)
- [10.4.0](./1040.md)
- [10.4.2](./1042.md)
Expand Down
6 changes: 6 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,12 @@ Release and roadmap notes available on the [WooCommerce Developers Blog](https:/
- Fix total shipping display info when no shipping method is available. ([8819](https://github.com/woocommerce/woocommerce-blocks/pull/8819))
- Blockified Single Product Template: use h1 for the Product Title when transforming from Classic template. ([9748]((https://github.com/woocommerce/woocommerce-blocks/pull/9748)))

= 10.2.4 - 2023-06-22 =

#### Bug Fixes

- Fix filter blocks using the old markup not rendering and fix missing translations in those blocks. ([9954](https://github.com/woocommerce/woocommerce-blocks/pull/9954))

= 10.2.3 - 2023-06-09 =

#### Bug Fixes
Expand Down
7 changes: 7 additions & 0 deletions src/StoreApi/Schemas/V1/CheckoutSchema.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,12 @@ public function get_properties() {
'context' => [ 'view', 'edit' ],
'readonly' => true,
],
'order_number' => [
'description' => __( 'Order number used for display.', 'woo-gutenberg-products-block' ),
'type' => 'string',
'context' => [ 'view', 'edit' ],
'readonly' => true,
],
'customer_note' => [
'description' => __( 'Note added to the order by the customer during checkout.', 'woo-gutenberg-products-block' ),
'type' => 'string',
Expand Down Expand Up @@ -188,6 +194,7 @@ protected function get_checkout_response( \WC_Order $order, PaymentResult $payme
'order_id' => $order->get_id(),
'status' => $order->get_status(),
'order_key' => $order->get_order_key(),
'order_number' => $order->get_order_number(),
'customer_note' => $order->get_customer_note(),
'customer_id' => $order->get_customer_id(),
'billing_address' => $this->billing_address_schema->get_item_response( $order ),
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/specs/backend/rating-filter.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ describe( `${ block.name } Block`, () => {
} );

it( 'product count can be toggled', async () => {
await expect( page ).toMatchElement(
await expect( page ).not.toMatchElement(
'.wc-block-components-product-rating-count'
);
await expect( page ).toClick( 'label', {
text: 'Display product count',
} );
await expect( page ).not.toMatchElement(
await expect( page ).toMatchElement(
'.wc-block-components-product-rating-count'
);
// reset
Expand Down

0 comments on commit f8d4d54

Please sign in to comment.