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

Release: 8.7.1 #7371

Merged
merged 6 commits into from
Oct 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ export const canMakePaymentWithExtensions =

Object.entries( extensionsCallbacks ).forEach(
( [ namespace, callbacks ] ) => {
if (
! ( paymentMethodName in callbacks ) ||
typeof callbacks[ paymentMethodName ] !== 'function'
) {
return;
}
namespacedCallbacks[ namespace ] =
callbacks[ paymentMethodName ];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ describe( 'payment-method-config-helper', () => {
woopay: trueCallback,
// testpay: one callback errors, one returns true
testpay: throwsCallback,
// Used to check that only valid callbacks run in each namespace. It is not present in
// 'other-woocommerce-marketplace-extension'.
blocks_pay: trueCallback,
}
);
registerPaymentMethodExtensionCallbacks(
Expand Down Expand Up @@ -202,5 +205,14 @@ describe( 'payment-method-config-helper', () => {
expect( throwsCallback ).toHaveBeenCalledTimes( 1 );
expect( trueCallback ).toHaveBeenCalledTimes( 1 );
} );

it( 'Does not error when a callback for a payment method is in one namespace but not another', () => {
helpers.canMakePaymentWithExtensions(
() => true,
canMakePaymentExtensionsCallbacks,
'blocks_pay'
)( canMakePaymentArgument );
expect( console ).not.toHaveErrored();
} );
} );
} );
15 changes: 15 additions & 0 deletions docs/internal-developers/testing/releases/871.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Testing notes and ZIP for release 8.7.1

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

## Feature plugin and package inclusion in WooCommerce

### Fixed an issue where JavaScript errors would occur when more than one extension tried to filter specific payment methods in the Cart and Checkout blocks ([7377](https://github.com/woocommerce/woocommerce-blocks/pull/7377))

#### User Facing Testing

1. Install and activate [some-extension-name.zip](https://github.com/woocommerce/woocommerce-blocks/files/9764404/some-extension-name.zip) and [WooCommerce Conditional Shipping and Payments](https://woocommerce.com/products/conditional-shipping-and-payments/).
2. Activate the Cash on Delivery payment method.
3. Go to the Cart block and view the JS console. Ensure you don't see any errors such as `Error when executing callback for cheque in some-extension-name TypeError: namespacedCallbacks[namespace] is not a function`.
4. Go to the Checkout block and check that no similar errors appear.
5. Change your city to `Denver` and ensure the Cash on Delivery method is not available.
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 @@ -92,6 +92,7 @@ Every release includes specific testing instructions for new features and bug fi
- [8.5.1](./851.md)
- [8.6.0](./860.md)
- [8.7.0](./870.md)
- [8.7.1](./871.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": "8.7.0",
"version": "8.7.1",
"description": "WooCommerce blocks for the Gutenberg editor.",
"homepage": "https://github.com/woocommerce/woocommerce-gutenberg-products-block/",
"keywords": [
Expand Down
6 changes: 5 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.0
Tested up to: 6.0
Requires PHP: 7.0
Stable tag: 8.7.0
Stable tag: 8.7.1
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.html

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

== Changelog ==

= 8.7.1 - 2022-10-12 =

- Fixed an issue where JavaScript errors would occur when more than one extension tried to filter specific payment methods in the Cart and Checkout blocks. ([7377](https://github.com/woocommerce/woocommerce-blocks/pull/7377))

= 8.7.0 - 2022-10-10 =

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