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

Commit

Permalink
Release: 11.4.5 (#11672)
Browse files Browse the repository at this point in the history
* Empty commit for release pull request

* Enhancement/New blockified Order Confirmation on new installs with block-based themes (#11615)

* Use new blockified Order Confirmation on blocks themes

* Handle translations on the new blockified Order Confirmation

* Update readme.txt

* npm run change-versions

* Filter By Rating: fix overlapping stars (#11644)

* Fix Playwright E2E tests - SideEffects (#11638)

* Removed span text and test

* Testing notes

* Empty commit for release pull request

* Fix Single Product Classic Template block not showing on the front-end (#11455)

In WordPress 6.4, it appears that the global `have_posts` is `false` in
the context of the full site editing single product template. This
breaks the Classic Template block.

In this commit, we are creating a custom query using the available id
instead of relying on the global query.

This might be a temporary workaround as we are waiting to see
if that's an issue that core is willing to fix, as it might affect
backwards-compatibility for other vendors.

(cherry picked from commit d9e8809)

* Empty commit for release pull request

* Update readme.txt

* Bump versions to 11.4.5

* Add Testing Notes

---------

Co-authored-by: github-actions <[email protected]>
Co-authored-by: Paulo Arromba <[email protected]>
Co-authored-by: Luigi Teschio <[email protected]>
Co-authored-by: Lucio Giannotta <[email protected]>
  • Loading branch information
5 people authored Nov 8, 2023
1 parent 3f33c75 commit 8ba32c4
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 9 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "WooCommerce blocks for the Gutenberg editor.",
"homepage": "https://woocommerce.com/",
"type": "wordpress-plugin",
"version": "11.4.4",
"version": "11.4.5",
"keywords": [
"gutenberg",
"woocommerce",
Expand Down
16 changes: 16 additions & 0 deletions docs/internal-developers/testing/releases/1145.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Testing notes and ZIP for release 11.4.5

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

## WooCommerce Core

### Bug Fixes

#### Fix Single Product Classic Template block not showing on the front-end. [11455](https://github.com/woocommerce/woocommerce-blocks/pull/11455)

1. Enable WordPress 6.4.
2. Enable a block theme.
3. Go to Site Editor → Single Product template.
4. Remove the blockified template and add the “Classic Template” block.
5. Save and check the front-end.
6. Check that the template is correctly rendered on the front-end.
1 change: 1 addition & 0 deletions docs/internal-developers/testing/releases/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ Every release includes specific testing instructions for new features and bug fi
- [11.4.2](./1142.md)
- [11.4.3](./1143.md)
- [11.4.4](./1144.md)
- [11.4.5](./1145.md)

<!-- FEEDBACK -->

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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": "11.4.4",
"version": "11.4.5",
"description": "WooCommerce blocks for the Gutenberg editor.",
"homepage": "https://github.com/woocommerce/woocommerce-gutenberg-products-block/",
"keywords": [
Expand Down
8 changes: 7 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.3.2
Tested up to: 6.3.2
Requires PHP: 7.4
Stable tag: 11.4.4
Stable tag: 11.4.5
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.html

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

== Changelog ==

= 11.4.5 - 2023-11-07 =

#### Bug Fixes

- WordPress 6.4: fixed a bug which would break sites using the Classic Template block for the Single Product template. https://github.com/woocommerce/woocommerce-blocks/pull/11455

= 11.4.4 - 2023-11-06 =

#### Enhancements
Expand Down
11 changes: 9 additions & 2 deletions src/BlockTypes/ClassicTemplate.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,16 @@ protected function render_single_product() {
*/
do_action( 'woocommerce_before_main_content' );

while ( have_posts() ) :
$product_query = new \WP_Query(
array(
'post_type' => 'product',
'p' => get_the_ID(),
)
);

while ( $product_query->have_posts() ) :

the_post();
$product_query->the_post();
wc_get_template_part( 'content', 'single-product' );

endwhile;
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 = '11.4.4';
$version = '11.4.5';
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: 11.4.4
* Version: 11.4.5
* Author: Automattic
* Author URI: https://woocommerce.com
* Text Domain: woo-gutenberg-products-block
Expand Down

0 comments on commit 8ba32c4

Please sign in to comment.