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

Release: 9.5.0 #8330

Merged
merged 14 commits into from
Feb 1, 2023
7 changes: 1 addition & 6 deletions assets/js/blocks/product-query/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,6 @@ const GLOBAL_HIDE_OUT_OF_STOCK = getSetting< boolean >(
false
);

const isArchiveProductTemplate = getSetting< boolean >(
'is_archive_product_template',
false
);

export const QUERY_DEFAULT_ATTRIBUTES: QueryBlockAttributes = {
allowedControls: DEFAULT_ALLOWED_CONTROLS,
displayLayout: {
Expand All @@ -69,7 +64,7 @@ export const QUERY_DEFAULT_ATTRIBUTES: QueryBlockAttributes = {
search: '',
exclude: [],
sticky: '',
inherit: isArchiveProductTemplate,
inherit: false,
__woocommerceAttributes: [],
__woocommerceStockStatus: GLOBAL_HIDE_OUT_OF_STOCK
? Object.keys( objectOmit( STOCK_STATUS_OPTIONS, 'outofstock' ) )
Expand Down
375 changes: 375 additions & 0 deletions docs/internal-developers/testing/releases/950.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/internal-developers/testing/releases/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ Every release includes specific testing instructions for new features and bug fi
- [9.4.0](./940.md)
- [9.4.1](./941.md)
- [9.4.2](./942.md)

- [9.5.0](./950.md)

<!-- FEEDBACK -->

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@woocommerce/block-library",
"title": "WooCommerce Blocks",
"author": "Automattic",
"version": "9.5.0-dev",
"version": "9.5.0",
"description": "WooCommerce blocks for the Gutenberg editor.",
"homepage": "https://github.com/woocommerce/woocommerce-gutenberg-products-block/",
"keywords": [
Expand Down
8 changes: 4 additions & 4 deletions phpcs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<exclude-pattern>languages/woo-gutenberg-products-block.php</exclude-pattern>

<!-- Configs -->
<config name="minimum_supported_wp_version" value="5.8" />
<config name="minimum_supported_wp_version" value="5.9" />
<config name="testVersion" value="7.2-" />

<!-- Rules -->
Expand Down Expand Up @@ -59,11 +59,11 @@
</rule>

<rule ref="Generic.Commenting.Todo">
<exclude name="Generic.Commenting.Todo.TaskFound"/>
<exclude name="Generic.Commenting.Todo.TaskFound"/>
<exclude name="Generic.Commenting.Todo.CommentFound"/>
</rule>

<rule ref="Generic.Arrays.DisallowShortArraySyntax.Found">
<exclude-pattern>src/*</exclude-pattern>
</rule>
<exclude-pattern>src/*</exclude-pattern>
</rule>
</ruleset>
32 changes: 31 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Tags: gutenberg, woocommerce, woo commerce, products, blocks, woocommerce blocks
Requires at least: 6.1.1
Tested up to: 6.1.1
Requires PHP: 7.2
Stable tag: 9.5.0-dev
Stable tag: 9.5.0
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Expand Down Expand Up @@ -80,6 +80,36 @@ Release and roadmap notes available on the [WooCommerce Developers Blog](https:/

== Changelog ==

= 9.5.0 - 2023-01-30 =

#### Enhancements

- Enhancement: Add _Store Breadcrumbs_ block, allowing merchants to keep track of their locations within the store and navigate back to parent pages. ([8222](https://github.com/woocommerce/woocommerce-blocks/pull/8222))
- Enhancement: Add _Catalog Sorting_ block. ([8122](https://github.com/woocommerce/woocommerce-blocks/pull/8122))
- Enhancement: Add _Product Results Count_ block. ([8078](https://github.com/woocommerce/woocommerce-blocks/pull/8078))
- Enhancement: Add a `reset` button for the _Filter by Attributes_ block. ([8285](https://github.com/woocommerce/woocommerce-blocks/pull/8285))
- Enhancement: Add a compatibility layer to keep extensions continue working with Blockified Archive Templates. ([8172](https://github.com/woocommerce/woocommerce-blocks/pull/8172))
- Enhancement: Add border style previews in the editor for featured items. ([8304](https://github.com/woocommerce/woocommerce-blocks/pull/8304))
- Enhancement: Graduate margin styling for _Product Price block_ to WooCommerce core. ([8269](https://github.com/woocommerce/woocommerce-blocks/pull/8269))
- Enhancement: Improve free local pickup display during checkout. ([8241](https://github.com/woocommerce/woocommerce-blocks/pull/8241))
- Enhancement: Improve how checkout pushes data to the server when entering address data. ([8030](https://github.com/woocommerce/woocommerce-blocks/pull/8030))
- Enhancement: Move margin for _Product Rating_ from CSS to Global Styles. ([8202](https://github.com/woocommerce/woocommerce-blocks/pull/8202))
- Enhancement: Prevent an edge case where adding the _Product_ blocks above the Classic Template block would cause its ratings to change the markup. ([8247](https://github.com/woocommerce/woocommerce-blocks/pull/8247))
- Enhancement: Refresh the cart after using the back button to return to checkout. ([8236](https://github.com/woocommerce/woocommerce-blocks/pull/8236))
- Enhancement: Replace the collapsed section for the coupon code with a link. ([7993](https://github.com/woocommerce/woocommerce-blocks/pull/7993))
- Enhancement: Set `inherit` setting to true when is inserted in the archive product template. ([8251](https://github.com/woocommerce/woocommerce-blocks/pull/8251))
- Enhancement: Transition _Product Button_ from using CSS margin to Global Styles. ([8239](https://github.com/woocommerce/woocommerce-blocks/pull/8239))

#### Bug Fixes

- Fix: Adjust _Featured Product_ and _Featured Category_ blocks preview for Style Book. ([8313](https://github.com/woocommerce/woocommerce-blocks/pull/8313))
- Fix: Adjust _Store Notices_ text color in dark themes. ([8278](https://github.com/woocommerce/woocommerce-blocks/pull/8278))
- Fix: Adjust _Catalog Sorting_ colors in dark themes. ([8270](https://github.com/woocommerce/woocommerce-blocks/pull/8270))
- Fix: Adjust color and direction of the arrow of the return to cart button on the checkout page. ([8289](https://github.com/woocommerce/woocommerce-blocks/pull/8289))
- Fix: Hide filter blocks and _Product Search_ block for Style Book. ([8309](https://github.com/woocommerce/woocommerce-blocks/pull/8309))
- Fix: Resolve a bug that would display Billing Address for Shipping Address on checkout rest endpoint. ([8291](https://github.com/woocommerce/woocommerce-blocks/pull/8291))
- Fix: Resolve an issue where the WooCommerce tab of the style book would crash and certain blocks would not load correctly. ([8243](https://github.com/woocommerce/woocommerce-blocks/pull/8243))

= 9.4.2 - 2023-01-26 =

#### Bug Fixes
Expand Down
17 changes: 0 additions & 17 deletions src/BlockTypes/ProductQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,23 +113,6 @@ public function update_query( $pre_render, $parsed_block ) {
}
}

/**
* 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 );

global $pagenow;
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
$post_id = isset( $_GET['postId'] ) ? sanitize_text_field( wp_unslash( $_GET['postId'] ) ) : null;
$is_archive_product_template = 'site-editor.php' === $pagenow && 'woocommerce/woocommerce//archive-product' === $post_id;
$this->asset_data_registry->add( 'is_archive_product_template', $is_archive_product_template, true );
}

/**
* Update the query for the product query block in Editor.
*
Expand Down
2 changes: 1 addition & 1 deletion src/Package.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public static function container( $reset = false ) {
NewPackage::class,
function ( $container ) {
// leave for automated version bumping.
$version = '9.5.0-dev';
$version = '9.5.0';
return new NewPackage(
$version,
dirname( __DIR__ ),
Expand Down
2 changes: 1 addition & 1 deletion woocommerce-gutenberg-products-block.php
Original file line number Diff line number Diff line change
Expand Up @@ -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: 9.5.0-dev
* Version: 9.5.0
* Author: Automattic
* Author URI: https://woocommerce.com
* Text Domain: woo-gutenberg-products-block
Expand Down