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

Commit d2ec81a

Browse files
github-actions[bot]github-actionswavvvesthealexandrelaradinhtungdu
authored
Release: 8.7.1 (#7371)
* Empty commit for release pull request * Updated changelog. * Minor lint fix. * 8.7.0 Testing instructions * Updated and tidy docs/internal-developers/testing/releases/README.md * Add filter-link-button mixin (#7357) * Set default style to link-button mixin It was identified that we currently have 3 different behaviors for links used in the application. In issue #1778, it was discussed a set of good practices that we should follow in order to obtain consistency between links. Currently, the link-button mixin is already used by the 'Clear all' button in the Active Filters block, so the idea was to increment it with a common pattern (font size small, font-weight normal, underlined by default and not underlined when on hover) that can be reused by other components (for example FilterResetButton). * Change link-button mixin to make it attend the expected default style for links * Replace text-button with link-button mixin in FilterResetButton component * Add new mixin for links in filter blocks * Revert change to link-button mixin to prevent it to affect link buttons on Checkout page * Add filter-link-button mixin that can be used in filter blocks * Remove link-button styles that were moved to filter-link-button mixin By default, link-button mixin styles should have only styles from the text-button mixin and also be underlined. The styles for link button in filter blocks should reside in filter-link-button mixin. * Cherry picked Add filter-link-button mixin #7357 and updated testing instructions * Re-added #7273 to changelog * Correct block name and description (#7354) * Correct block name and description * remove duplicated description for controls blocks * remove duplicated title and desc * Revert "remove duplicated description for controls blocks" This reverts commit ed5417e. * removed #7338 from testing instructions and changelog * Updated testing zip package. * Minor formatting fix on the release instructions * change any to or below the express payment method on cart (#7369) * Updated zip. * Add temporary workaround to fix inserting Cart block in WordPress.com (#7367) * remove problematic actions as deps * add inline docs * add todo comment * Cherry picked: Fix a problem that causes an infinite loop when inserting Cart block in wordpress.com (7367) * Updated testing zip. * Bumping version strings to new version. * Empty commit for release pull request Co-authored-by: github-actions <[email protected]> Co-authored-by: Paulo Arromba <[email protected]> Co-authored-by: Alexandre Lara <[email protected]> Co-authored-by: Tung Du <[email protected]> Co-authored-by: Alex Florisca <[email protected]> Co-authored-by: Seghir Nadir <[email protected]>
1 parent cd82f92 commit d2ec81a

File tree

8 files changed

+42
-4
lines changed

8 files changed

+42
-4
lines changed

assets/js/blocks-registry/payment-methods/payment-method-config-helper.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ export const canMakePaymentWithExtensions =
5050

5151
Object.entries( extensionsCallbacks ).forEach(
5252
( [ namespace, callbacks ] ) => {
53+
if (
54+
! ( paymentMethodName in callbacks ) ||
55+
typeof callbacks[ paymentMethodName ] !== 'function'
56+
) {
57+
return;
58+
}
5359
namespacedCallbacks[ namespace ] =
5460
callbacks[ paymentMethodName ];
5561
}

assets/js/blocks-registry/payment-methods/test/payment-method-config-helper.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@ describe( 'payment-method-config-helper', () => {
8888
woopay: trueCallback,
8989
// testpay: one callback errors, one returns true
9090
testpay: throwsCallback,
91+
// Used to check that only valid callbacks run in each namespace. It is not present in
92+
// 'other-woocommerce-marketplace-extension'.
93+
blocks_pay: trueCallback,
9194
}
9295
);
9396
registerPaymentMethodExtensionCallbacks(
@@ -202,5 +205,14 @@ describe( 'payment-method-config-helper', () => {
202205
expect( throwsCallback ).toHaveBeenCalledTimes( 1 );
203206
expect( trueCallback ).toHaveBeenCalledTimes( 1 );
204207
} );
208+
209+
it( 'Does not error when a callback for a payment method is in one namespace but not another', () => {
210+
helpers.canMakePaymentWithExtensions(
211+
() => true,
212+
canMakePaymentExtensionsCallbacks,
213+
'blocks_pay'
214+
)( canMakePaymentArgument );
215+
expect( console ).not.toHaveErrored();
216+
} );
205217
} );
206218
} );
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Testing notes and ZIP for release 8.7.1
2+
3+
Zip file for testing: [woocommerce-gutenberg-products-block.zip](https://github.com/woocommerce/woocommerce-blocks/files/9766268/woocommerce-gutenberg-products-block.zip)
4+
5+
## Feature plugin and package inclusion in WooCommerce
6+
7+
### 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+
9+
#### User Facing Testing
10+
11+
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/).
12+
2. Activate the Cash on Delivery payment method.
13+
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`.
14+
4. Go to the Checkout block and check that no similar errors appear.
15+
5. Change your city to `Denver` and ensure the Cash on Delivery method is not available.

docs/internal-developers/testing/releases/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ Every release includes specific testing instructions for new features and bug fi
9292
- [8.5.1](./851.md)
9393
- [8.6.0](./860.md)
9494
- [8.7.0](./870.md)
95+
- [8.7.1](./871.md)
9596

9697
<!-- FEEDBACK -->
9798

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@woocommerce/block-library",
33
"title": "WooCommerce Blocks",
44
"author": "Automattic",
5-
"version": "8.7.0",
5+
"version": "8.7.1",
66
"description": "WooCommerce blocks for the Gutenberg editor.",
77
"homepage": "https://github.com/woocommerce/woocommerce-gutenberg-products-block/",
88
"keywords": [

readme.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Tags: gutenberg, woocommerce, woo commerce, products, blocks, woocommerce blocks
44
Requires at least: 6.0
55
Tested up to: 6.0
66
Requires PHP: 7.0
7-
Stable tag: 8.7.0
7+
Stable tag: 8.7.1
88
License: GPLv3
99
License URI: https://www.gnu.org/licenses/gpl-3.0.html
1010

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

8181
== Changelog ==
8282

83+
= 8.7.1 - 2022-10-12 =
84+
85+
- 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))
86+
8387
= 8.7.0 - 2022-10-10 =
8488

8589
#### Enhancements

src/Package.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public static function container( $reset = false ) {
109109
NewPackage::class,
110110
function ( $container ) {
111111
// leave for automated version bumping.
112-
$version = '8.7.0';
112+
$version = '8.7.1';
113113
return new NewPackage(
114114
$version,
115115
dirname( __DIR__ ),

woocommerce-gutenberg-products-block.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: WooCommerce Blocks
44
* Plugin URI: https://github.com/woocommerce/woocommerce-gutenberg-products-block
55
* Description: WooCommerce blocks for the Gutenberg editor.
6-
* Version: 8.7.0
6+
* Version: 8.7.1
77
* Author: Automattic
88
* Author URI: https://woocommerce.com
99
* Text Domain: woo-gutenberg-products-block

0 commit comments

Comments
 (0)