diff --git a/.wordpress-org/banner-1544x500.png b/.wordpress-org/banner-1544x500.png
index 0571083ad86..3a83246f164 100644
Binary files a/.wordpress-org/banner-1544x500.png and b/.wordpress-org/banner-1544x500.png differ
diff --git a/.wordpress-org/banner-772x250.png b/.wordpress-org/banner-772x250.png
index 0ca87162671..b932f21dd77 100644
Binary files a/.wordpress-org/banner-772x250.png and b/.wordpress-org/banner-772x250.png differ
diff --git a/.wordpress-org/icon-128x128.png b/.wordpress-org/icon-128x128.png
index 26530882c0c..6d5a0f50715 100644
Binary files a/.wordpress-org/icon-128x128.png and b/.wordpress-org/icon-128x128.png differ
diff --git a/.wordpress-org/icon-256x256.png b/.wordpress-org/icon-256x256.png
index 127951966e6..1ff4a1d6106 100644
Binary files a/.wordpress-org/icon-256x256.png and b/.wordpress-org/icon-256x256.png differ
diff --git a/assets/css/style.scss b/assets/css/style.scss
index a4810fb9c9e..f024fe53caf 100644
--- a/assets/css/style.scss
+++ b/assets/css/style.scss
@@ -139,6 +139,7 @@
}
}
}
+.wc-block-grid__product-image .wc-block-grid__product-onsale,
.wc-block-grid .wc-block-grid__product-onsale {
@include font-size(small);
padding: em($gap-smallest) em($gap-small);
diff --git a/composer.json b/composer.json
index 1efd18301b3..f2d80363ade 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": "10.9.0",
+ "version": "10.9.1",
"keywords": [
"gutenberg",
"woocommerce",
diff --git a/docs/internal-developers/testing/releases/1091.md b/docs/internal-developers/testing/releases/1091.md
new file mode 100644
index 00000000000..4eb41036f68
--- /dev/null
+++ b/docs/internal-developers/testing/releases/1091.md
@@ -0,0 +1,42 @@
+# Testing notes and ZIP for release 10.9.1
+
+Zip file for testing: [woocommerce-gutenberg-products-block.zip](https://github.com/woocommerce/woocommerce-blocks/files/12370561/woocommerce-gutenberg-products-block.zip)
+
+## WooCommerce Core
+
+### Bug Fixes
+
+#### Remove client side navigation from Products beta block. [#10636](https://github.com/woocommerce/woocommerce-blocks/pull/10636)
+
+1. Create a new post
+2. Add Products (Beta) block & publish it
+3. On Frontend, verify that
+ 1. Client-side navigation isn't there anymore i.e. changing the page should also refresh the page
+ 2. Verify that Product button(Add to cart) still works as expected.
+
+## Testing notes for the development team
+
+### Bug Fixes
+
+1. Checkout to the PR branch and run `npm run start`.
+2. Enable a blocks theme (like TT3).
+3. Create a new page or post.
+4. Add the Products (Beta), Products Collection, Products by Attribute, Products by Tag, Products by Category, Handpicked products, and All products blocks.
+5. Check the Sale badge is shown on the top-right corner of the image on all of them, in the editor, and in the frontend.
+6. Go to the classic shop page and check the Sale badge also shows in the top-right corner of the product image.
+7. Repeat steps 3 to 6 with Storefront enabled.
+
+#### Screenshots
+
+
+
+Before:
+
+
+ |
+After:
+
+
+ |
+
+
diff --git a/docs/internal-developers/testing/releases/README.md b/docs/internal-developers/testing/releases/README.md
index 819ac0e0d30..cd786f6e977 100644
--- a/docs/internal-developers/testing/releases/README.md
+++ b/docs/internal-developers/testing/releases/README.md
@@ -170,6 +170,7 @@ Every release includes specific testing instructions for new features and bug fi
- [10.8.2](./1082.md)
- [10.8.3](./1083.md)
- [10.9.0](./1090.md)
+ - [10.9.1](./1091.md)
diff --git a/package-lock.json b/package-lock.json
index 4813442c961..a4e65622393 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "@woocommerce/block-library",
- "version": "10.9.0",
+ "version": "10.9.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@woocommerce/block-library",
- "version": "10.9.0",
+ "version": "10.9.1",
"hasInstallScript": true,
"license": "GPL-3.0+",
"dependencies": {
diff --git a/package.json b/package.json
index 89c0c3ed034..35d1d15a5e5 100644
--- a/package.json
+++ b/package.json
@@ -2,7 +2,7 @@
"name": "@woocommerce/block-library",
"title": "WooCommerce Blocks",
"author": "Automattic",
- "version": "10.9.0",
+ "version": "10.9.1",
"description": "WooCommerce blocks for the Gutenberg editor.",
"homepage": "https://github.com/woocommerce/woocommerce-gutenberg-products-block/",
"keywords": [
diff --git a/readme.txt b/readme.txt
index 54e00757676..eacfeefceed 100644
--- a/readme.txt
+++ b/readme.txt
@@ -4,7 +4,7 @@ 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: 10.9.0
+Stable tag: 10.9.1
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.html
@@ -81,7 +81,18 @@ Release and roadmap notes available on the [WooCommerce Developers Blog](https:/
== Changelog ==
-= 10.9/0 - 2023-08-14 =
+= 10.9.1 - 2023-08-17 =
+
+#### Enhancements
+
+- Update WooCommerce Blocks brand assets. ([10622](https://github.com/woocommerce/woocommerce-blocks/pull/10622))
+
+#### Bug Fixes
+
+- Fix "On sale" badge class. ([10634](https://github.com/woocommerce/woocommerce-blocks/pull/10634))
+- Remove client side navigation from Products beta block. ([10636](https://github.com/woocommerce/woocommerce-blocks/pull/10636))
+
+= 10.9.0 - 2023-08-14 =
#### Enhancements
diff --git a/src/BlockTypes/ProductButton.php b/src/BlockTypes/ProductButton.php
index 204b95629c6..6bd773a5912 100644
--- a/src/BlockTypes/ProductButton.php
+++ b/src/BlockTypes/ProductButton.php
@@ -192,7 +192,7 @@ protected function render( $attributes, $content, $block ) {
return apply_filters(
'woocommerce_loop_add_to_cart_link',
strtr(
- '
<{html_element}
diff --git a/src/BlockTypes/ProductQuery.php b/src/BlockTypes/ProductQuery.php
index ca15ea1bf1b..158ea820a10 100644
--- a/src/BlockTypes/ProductQuery.php
+++ b/src/BlockTypes/ProductQuery.php
@@ -80,82 +80,6 @@ protected function initialize() {
);
add_filter( 'rest_product_query', array( $this, 'update_rest_query' ), 10, 2 );
add_filter( 'rest_product_collection_params', array( $this, 'extend_rest_query_allowed_params' ), 10, 1 );
- add_filter( 'render_block_core/query', array( $this, 'add_navigation_id_directive' ), 10, 3 );
- add_filter( 'render_block_core/query-pagination', array( $this, 'add_navigation_link_directives' ), 10, 3 );
- }
-
- /**
- * Mark the Product Query as an interactive region so it can be updated
- * during client-side navigation.
- *
- * @param string $block_content The block content.
- * @param array $block The full block, including name and attributes.
- * @param \WP_Block $instance The block instance.
- */
- public function add_navigation_id_directive( $block_content, $block, $instance ) {
- if ( self::is_woocommerce_variation( $block ) ) {
- // Enqueue the Interactivity API runtime.
- wp_enqueue_script( 'wc-interactivity' );
-
- $p = new \WP_HTML_Tag_Processor( $block_content );
-
- // Add `data-wc-navigation-id to the query block.
- if ( $p->next_tag( array( 'class_name' => 'wp-block-query' ) ) ) {
- $p->set_attribute(
- 'data-wc-navigation-id',
- 'woo-products-' . $block['attrs']['queryId']
- );
- $p->set_attribute( 'data-wc-interactive', true );
- $block_content = $p->get_updated_html();
- }
- }
-
- return $block_content;
- }
-
- /**
- * Add interactive links to all anchors inside the Query Pagination block.
- *
- * @param string $block_content The block content.
- * @param array $block The full block, including name and attributes.
- * @param \WP_Block $instance The block instance.
- */
- public function add_navigation_link_directives( $block_content, $block, $instance ) {
- if (
- self::is_woocommerce_variation( $this->parsed_block ) &&
- $instance->context['queryId'] === $this->parsed_block['attrs']['queryId']
- ) {
- $p = new \WP_HTML_Tag_Processor( $block_content );
- $p->next_tag( array( 'class_name' => 'wp-block-query-pagination' ) );
-
- while ( $p->next_tag( 'a' ) ) {
- $class_attr = $p->get_attribute( 'class' );
- $class_list = preg_split( '/\s+/', $class_attr );
-
- $is_previous = in_array( 'wp-block-query-pagination-previous', $class_list, true );
- $is_next = in_array( 'wp-block-query-pagination-next', $class_list, true );
- $is_previous_or_next = $is_previous || $is_next;
-
- $navigation_link_payload = array(
- 'prefetch' => $is_previous_or_next,
- 'scroll' => false,
- );
-
- $p->set_attribute(
- 'data-wc-navigation-link',
- wp_json_encode( $navigation_link_payload )
- );
-
- if ( $is_previous ) {
- $p->set_attribute( 'key', 'pagination-previous' );
- } elseif ( $is_next ) {
- $p->set_attribute( 'key', 'pagination-next' );
- }
- }
- $block_content = $p->get_updated_html();
- }
-
- return $block_content;
}
/**
diff --git a/src/Package.php b/src/Package.php
index e644927a654..2b915f4390b 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 = '10.9.0';
+ $version = '10.9.1';
return new NewPackage(
$version,
dirname( __DIR__ ),
diff --git a/tests/e2e-jest/specs/shopper/cart-checkout/translations.test.js b/tests/e2e-jest/specs/shopper/cart-checkout/translations.test.js
index 6f40cc74033..883816c42f1 100644
--- a/tests/e2e-jest/specs/shopper/cart-checkout/translations.test.js
+++ b/tests/e2e-jest/specs/shopper/cart-checkout/translations.test.js
@@ -20,7 +20,7 @@ describe( 'Shopper → Cart & Checkout → Translations', () => {
await merchant.changeLanguage( 'en_EN' );
} );
- it( 'User can view translated Cart block', async () => {
+ it.skip( 'User can view translated Cart block', async () => {
await shopper.goToShop();
await shopper.addToCartFromShopPage( '128GB USB Stick' );
await shopper.block.goToCart();
@@ -53,7 +53,7 @@ describe( 'Shopper → Cart & Checkout → Translations', () => {
await expect( orderSummary ).toMatch( 'Totaal' );
} );
- it( 'User can view translated Checkout block', async () => {
+ it.skip( 'User can view translated Checkout block', async () => {
await shopper.block.goToCheckout();
const contactHeading = await page.$(
diff --git a/tests/e2e-jest/specs/shopper/mini-cart.test.js b/tests/e2e-jest/specs/shopper/mini-cart.test.js
index c89d2fe5207..f43596c4f89 100644
--- a/tests/e2e-jest/specs/shopper/mini-cart.test.js
+++ b/tests/e2e-jest/specs/shopper/mini-cart.test.js
@@ -543,7 +543,7 @@ describe( 'Shopper → Mini-Cart', () => {
);
} );
- it( 'User can see translation in filled Mini-Cart', async () => {
+ it.skip( 'User can see translation in filled Mini-Cart', async () => {
await page.click(
selectors.frontend.productWithAddToCartButton
);
@@ -575,7 +575,7 @@ describe( 'Shopper → Mini-Cart', () => {
);
} );
- it( 'User can see translation in filled Mini-Cart', async () => {
+ it.skip( 'User can see translation in filled Mini-Cart', async () => {
await page.click(
selectors.frontend.productWithAddToCartButton
);
diff --git a/woocommerce-gutenberg-products-block.php b/woocommerce-gutenberg-products-block.php
index 10d10b165d3..d2f05131fb9 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: 10.9.0
+ * Version: 10.9.1
* Author: Automattic
* Author URI: https://woocommerce.com
* Text Domain: woo-gutenberg-products-block