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

Commit

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

* Added readme.txt changelog entry

* Update HPOS compatibility snippet (#7395)

* 8.7.2 Testing notes

* Update testing notes

* Update testing notes

* Bumped version

* Refactor force billing: remove forcedBillingAddress from conditions for showBillingFields (#7393)

Co-authored-by: Niels Lange <[email protected]>

* Updated testing instructions and changelog to include #7393

* Updated testing zip

* Bumping version strings to new version.

* Empty commit for release pull request

* Fix wrong keys being sent in `canMakePayment` and customer data showing in the Checkout block in the editor (#7434)

* Construct args for canMakePayment with correct keys

* When the CheckoutEventsContext mounts, initialize payment store

* Destructure useSelect correctly

* Dispatch __internalInitializePaymentStore in selector tests

* Update selector name to __internalUpdateAvailablePaymentMethods

* Remove check for editor when registering checkout store

* Add check for when express payment methods have updated too

* Ensure billingAddress key exists in canMakePayment arg

* Use editor context to know if we're in editor

* Updated readme.txt

* Reverted stable tag change on readme.txt

* Testing instructions

* Cleaned out testing instructions

* Bumping version strings to new version.

* Empty commit for release pull request

* Testing instructions

* package-lock.json version bump

* Revert "Fix `useForcedLayout` to re-select inner blocks after we manually insert one (#6676)" (#7447)

This reverts commit 1564de2.

* Testing zip

* Bumping version strings to new version.

Co-authored-by: github-actions <[email protected]>
Co-authored-by: Paulo Arromba <[email protected]>
Co-authored-by: Alex Florisca <[email protected]>
Co-authored-by: Tarun Vijwani <[email protected]>
Co-authored-by: Niels Lange <[email protected]>
Co-authored-by: Thomas Roberts <[email protected]>
  • Loading branch information
7 people authored Oct 21, 2022
1 parent 78b800b commit b249f09
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 13 deletions.
8 changes: 2 additions & 6 deletions assets/js/blocks/cart-checkout-shared/use-forced-layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
useRef,
useCallback,
useMemo,
useState,
} from '@wordpress/element';
import { useSelect, useDispatch } from '@wordpress/data';
import {
Expand Down Expand Up @@ -42,8 +41,6 @@ export const useForcedLayout = ( {
} ): void => {
const currentRegisteredBlocks = useRef( registeredBlocks );
const currentDefaultTemplate = useRef( defaultTemplate );
const [ forcedBlocksInserted, setForcedBlocksInserted ] =
useState< number >( 0 );

const { insertBlock, replaceInnerBlocks } =
useDispatch( 'core/block-editor' );
Expand All @@ -58,18 +55,17 @@ export const useForcedLayout = ( {
),
};
},
[ clientId, currentRegisteredBlocks.current, forcedBlocksInserted ]
[ clientId, currentRegisteredBlocks.current ]
);

const appendBlock = useCallback(
( block, position ) => {
const newBlock = createBlock( block.name );
insertBlock( newBlock, position, clientId, false );
setForcedBlocksInserted( forcedBlocksInserted + 1 );
},
// We need to skip insertBlock here due to a cache issue in wordpress.com that causes an inifinite loop, see https://github.com/Automattic/wp-calypso/issues/66092 for an expanded doc.
// eslint-disable-next-line react-hooks/exhaustive-deps
[ clientId, forcedBlocksInserted ]
[ clientId ]
);

const lockedBlockTypes = useMemo(
Expand Down
13 changes: 13 additions & 0 deletions docs/internal-developers/testing/releases/874.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Testing notes and ZIP for release 8.7.4

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

## Feature plugin and package inclusion in WooCommerce

### Compatibility fix for Cart and Checkout inner blocks for WordPress 6.1. ([7447](https://github.com/woocommerce/woocommerce-blocks/pull/7447))

#### User Facing Testing

1. Install latest Gutenberg plugin or WordPress 6.1.
2. Install WooCommerce Gift Cards, or grab this plugin: [extension-for-testing.zip](https://github.com/woocommerce/woocommerce-blocks/files/9839394/extension-for-testing.1.zip)
3. Add a new page. Add the Checkout block. Ensure the `Contact information` section loads, and ensure you do not see any errors where blocks should appear, both on the editor and the published checkout page.
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 @@ -95,6 +95,7 @@ Every release includes specific testing instructions for new features and bug fi
- [8.7.1](./871.md)
- [8.7.2](./872.md)
- [8.7.3](./873.md)
- [8.7.4](./874.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": "8.7.3",
"version": "8.7.4",
"description": "WooCommerce blocks for the Gutenberg editor.",
"homepage": "https://github.com/woocommerce/woocommerce-gutenberg-products-block/",
"keywords": [
Expand Down
9 changes: 7 additions & 2 deletions 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.0
Tested up to: 6.0
Requires PHP: 7.0
Stable tag: 8.7.3
Stable tag: 8.7.4
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.html

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

== Changelog ==

= 8.7.4 - 2022-10-21 =

#### Bug fixes
- Compatibility fix for Cart and Checkout inner blocks for WordPress 6.1. ([7447](https://github.com/woocommerce/woocommerce-blocks/pull/7447))

= 8.7.3 - 2022-10-20 =

#### Bug fixes
- Fixed an issue where the argument passed to `canMakePayment` contained the incorrect keys. Also fixed the current user's customer data appearing in the editor when editing the Checkout block.
- Fixed an issue where the argument passed to `canMakePayment` contained the incorrect keys. Also fixed the current user's customer data appearing in the editor when editing the Checkout block. ([7434](https://github.com/woocommerce/woocommerce-blocks/pull/7434))

= 8.7.2 - 2022-10-13 =

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

0 comments on commit b249f09

Please sign in to comment.