Release: 8.9.1 (https://github.com/woocommerce/woocommerce-blocks/pull/7670)
* Empty commit for release pull request * Display correct block template when filtering by attribute (https://github.com/woocommerce/woocommerce-blocks/pull/7640) * Fix error when trying to access the queried object when it's null (https://github.com/woocommerce/woocommerce-blocks/pull/7664) * Fix error when trying to access the queried object when it's null. * Check if the `slug` exists * Use the taxonomy name instead of the slug, otherwise it returns false * Update readme changelog * Add testing notes * Improve testing notes format * Bumping version strings to new version. Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com> Co-authored-by: Alba Rincón <albarin@users.noreply.github.com> Co-authored-by: Alba Rincón <alba.rincon@automattic.com>
This commit is contained in:
parent
cc3c7635eb
commit
8270730298
|
@ -0,0 +1,25 @@
|
||||||
|
# Testing notes and ZIP for release 8.9.1
|
||||||
|
|
||||||
|
Zip file for testing: [woocommerce-gutenberg-products-block.zip](https://github.com/woocommerce/woocommerce-blocks/files/10001089/woocommerce-gutenberg-products-block.zip)
|
||||||
|
|
||||||
|
## Feature plugin and package inclusion in WooCommerce
|
||||||
|
|
||||||
|
### Display correct block template when filtering by attribute. ([7640](https://github.com/woocommerce/woocommerce-blocks/pull/7640))
|
||||||
|
|
||||||
|
#### Test that #7604 has been fixed
|
||||||
|
|
||||||
|
1. Make sure you have a block theme active (like Twenty Twenty-Three).
|
||||||
|
2. Add the “Filter by Attribute” block to the “Products by Category” template (in Appearance > Site Editor).
|
||||||
|
3. Go to the front-end for a category (ie: /product-category/clothing/).
|
||||||
|
4. Select a filter.
|
||||||
|
5. Verify the query params are added to the URL and the URL stays correct.
|
||||||
|
6. Verify the loaded template is also correct (instead of rendering the “Product Catalog” template).
|
||||||
|
|
||||||
|
#### Test that there are no regressions with #6776
|
||||||
|
|
||||||
|
1. Make sure you have a block theme active (like Twenty Twenty-Three).
|
||||||
|
2. Navigate to Products > Attributes and edit an existing one or create a new one.
|
||||||
|
3. Click the Enable Archives option and save, go back.
|
||||||
|
4. Click Configure terms next to your attribute.
|
||||||
|
5. Hover over one of the terms and click the View link of one of the attributes.
|
||||||
|
6. Verify that the page is rendered with a header, a footer, and using a product grid.
|
|
@ -102,6 +102,7 @@ Every release includes specific testing instructions for new features and bug fi
|
||||||
- [8.8.1](./881.md)
|
- [8.8.1](./881.md)
|
||||||
- [8.8.2](./882.md)
|
- [8.8.2](./882.md)
|
||||||
- [8.9.0](./890.md)
|
- [8.9.0](./890.md)
|
||||||
|
- [8.9.1](./891.md)
|
||||||
|
|
||||||
<!-- FEEDBACK -->
|
<!-- FEEDBACK -->
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
"name": "@woocommerce/block-library",
|
"name": "@woocommerce/block-library",
|
||||||
"title": "WooCommerce Blocks",
|
"title": "WooCommerce Blocks",
|
||||||
"author": "Automattic",
|
"author": "Automattic",
|
||||||
"version": "8.9.0",
|
"version": "8.9.1",
|
||||||
"description": "WooCommerce blocks for the Gutenberg editor.",
|
"description": "WooCommerce blocks for the Gutenberg editor.",
|
||||||
"homepage": "https://github.com/woocommerce/woocommerce-gutenberg-products-block/",
|
"homepage": "https://github.com/woocommerce/woocommerce-gutenberg-products-block/",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
|
|
@ -4,7 +4,7 @@ Tags: gutenberg, woocommerce, woo commerce, products, blocks, woocommerce blocks
|
||||||
Requires at least: 6.1
|
Requires at least: 6.1
|
||||||
Tested up to: 6.1
|
Tested up to: 6.1
|
||||||
Requires PHP: 7.0
|
Requires PHP: 7.0
|
||||||
Stable tag: 8.9.0
|
Stable tag: 8.9.1
|
||||||
License: GPLv3
|
License: GPLv3
|
||||||
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
|
||||||
|
@ -79,6 +79,12 @@ Release and roadmap notes available on the [WooCommerce Developers Blog](https:/
|
||||||
|
|
||||||
== Changelog ==
|
== Changelog ==
|
||||||
|
|
||||||
|
= 8.9.1 - 2022-11-14 =
|
||||||
|
|
||||||
|
#### Bug fixes
|
||||||
|
|
||||||
|
- Display correct block template when filtering by attribute. ([7640](https://github.com/woocommerce/woocommerce-blocks/pull/7640))
|
||||||
|
|
||||||
= 8.9.0 - 2022-11-07 =
|
= 8.9.0 - 2022-11-07 =
|
||||||
|
|
||||||
#### Enhancements
|
#### Enhancements
|
||||||
|
|
|
@ -426,17 +426,24 @@ class BlockTemplatesController {
|
||||||
$this->block_template_is_available( 'taxonomy-product_tag' )
|
$this->block_template_is_available( 'taxonomy-product_tag' )
|
||||||
) {
|
) {
|
||||||
add_filter( 'woocommerce_has_block_template', '__return_true', 10, 0 );
|
add_filter( 'woocommerce_has_block_template', '__return_true', 10, 0 );
|
||||||
} elseif ( taxonomy_is_product_attribute( get_query_var( 'taxonomy' ) ) &&
|
|
||||||
! BlockTemplateUtils::theme_has_template( 'archive-product' ) &&
|
|
||||||
$this->block_template_is_available( 'archive-product' )
|
|
||||||
) {
|
|
||||||
add_filter( 'woocommerce_has_block_template', '__return_true', 10, 0 );
|
|
||||||
} elseif (
|
} elseif (
|
||||||
( is_post_type_archive( 'product' ) || is_page( wc_get_page_id( 'shop' ) ) ) &&
|
( is_post_type_archive( 'product' ) || is_page( wc_get_page_id( 'shop' ) ) ) &&
|
||||||
! BlockTemplateUtils::theme_has_template( 'archive-product' ) &&
|
! BlockTemplateUtils::theme_has_template( 'archive-product' ) &&
|
||||||
$this->block_template_is_available( 'archive-product' )
|
$this->block_template_is_available( 'archive-product' )
|
||||||
) {
|
) {
|
||||||
add_filter( 'woocommerce_has_block_template', '__return_true', 10, 0 );
|
add_filter( 'woocommerce_has_block_template', '__return_true', 10, 0 );
|
||||||
|
} else {
|
||||||
|
$queried_object = get_queried_object();
|
||||||
|
if ( is_null( $queried_object ) ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( isset( $queried_object->taxonomy ) && taxonomy_is_product_attribute( $queried_object->taxonomy ) &&
|
||||||
|
! BlockTemplateUtils::theme_has_template( 'archive-product' ) &&
|
||||||
|
$this->block_template_is_available( 'archive-product' )
|
||||||
|
) {
|
||||||
|
add_filter( 'woocommerce_has_block_template', '__return_true', 10, 0 );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -109,7 +109,7 @@ class Package {
|
||||||
NewPackage::class,
|
NewPackage::class,
|
||||||
function ( $container ) {
|
function ( $container ) {
|
||||||
// leave for automated version bumping.
|
// leave for automated version bumping.
|
||||||
$version = '8.9.0';
|
$version = '8.9.1';
|
||||||
return new NewPackage(
|
return new NewPackage(
|
||||||
$version,
|
$version,
|
||||||
dirname( __DIR__ ),
|
dirname( __DIR__ ),
|
||||||
|
|
|
@ -30,7 +30,8 @@ class ProductAttributeTemplate {
|
||||||
* @param array $templates Templates that match the product attributes taxonomy.
|
* @param array $templates Templates that match the product attributes taxonomy.
|
||||||
*/
|
*/
|
||||||
public function update_taxonomy_template_hierarchy( $templates ) {
|
public function update_taxonomy_template_hierarchy( $templates ) {
|
||||||
if ( taxonomy_is_product_attribute( get_query_var( 'taxonomy' ) ) && wc_current_theme_is_fse_theme() ) {
|
$queried_object = get_queried_object();
|
||||||
|
if ( taxonomy_is_product_attribute( $queried_object->taxonomy ) && wc_current_theme_is_fse_theme() ) {
|
||||||
array_unshift( $templates, self::SLUG );
|
array_unshift( $templates, self::SLUG );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* Plugin Name: WooCommerce Blocks
|
* Plugin Name: WooCommerce Blocks
|
||||||
* Plugin URI: https://github.com/woocommerce/woocommerce-gutenberg-products-block
|
* Plugin URI: https://github.com/woocommerce/woocommerce-gutenberg-products-block
|
||||||
* Description: WooCommerce blocks for the Gutenberg editor.
|
* Description: WooCommerce blocks for the Gutenberg editor.
|
||||||
* Version: 8.9.0
|
* Version: 8.9.1
|
||||||
* Author: Automattic
|
* Author: Automattic
|
||||||
* Author URI: https://woocommerce.com
|
* Author URI: https://woocommerce.com
|
||||||
* Text Domain: woo-gutenberg-products-block
|
* Text Domain: woo-gutenberg-products-block
|
||||||
|
|
Loading…
Reference in New Issue