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

Release: 9.6.6 #8778

Merged
merged 49 commits into from
Mar 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
aaff89b
Empty commit for release pull request
invalid-email-address Feb 17, 2023
72cd6d2
Add changelog to readme.txt
tarhi-saad Feb 17, 2023
d2c331d
Unset default customer state if it doesn't match country (#8460)
senadir Feb 17, 2023
274d1f5
Update readme.txt
tarhi-saad Feb 17, 2023
5619755
Add testing notes
tarhi-saad Feb 17, 2023
820d272
Update testing notes
tarhi-saad Feb 17, 2023
bb1196d
Fix Customer account sidebar link incorrect margin in WP 6.2 (#8437)
Aljullu Feb 16, 2023
0d06eab
Prevent cart from breaking when item_data contains an array (#8440)
opr Feb 16, 2023
7e53f1b
Add minimum height to Mini Cart Contents block in the Style Book (#8458)
Aljullu Feb 17, 2023
77191a1
Update testing notes zip file
tarhi-saad Feb 17, 2023
451206b
Update testing notes
tarhi-saad Feb 17, 2023
4e25673
Update testing notes file
tarhi-saad Feb 17, 2023
0167d46
Bumping version strings to new version.
tarhi-saad Feb 17, 2023
7da51a2
Empty commit for release pull request
invalid-email-address Feb 22, 2023
a4971ed
Empty commit for release pull request
invalid-email-address Feb 22, 2023
04c3005
disable compatibilty layer (#8507)
gigitux Feb 22, 2023
9bdd536
update changelog and testing instructions
gigitux Feb 22, 2023
65663da
add zip link
gigitux Feb 22, 2023
06ab470
Bumping version strings to new version.
gigitux Feb 22, 2023
c3ec330
Merge branch 'release/9.6.0' of https://github.com/woocommerce/woocom…
gigitux Feb 22, 2023
17dde6e
Empty commit for release pull request
invalid-email-address Feb 27, 2023
1f86c53
Empty commit for release pull request
invalid-email-address Feb 27, 2023
d8fdf5a
Merge branch 'release/9.6.2' into release/9.6.3
tarhi-saad Feb 27, 2023
25cdf15
Add changelog in readme.txt
tarhi-saad Feb 27, 2023
847a3b5
Add testing notes
tarhi-saad Feb 27, 2023
9e5d479
Remove change from testing notes
tarhi-saad Feb 27, 2023
82a115e
Check for null session before going forward (#8537)
senadir Feb 24, 2023
0e6db97
Fix Payment Options settings crash in the editor (#8535)
tarhi-saad Feb 24, 2023
2fae767
Ensure express payment buttons are visible next to each other (#8548)
nielslange Feb 27, 2023
a5a6092
Update ZIP file
tarhi-saad Feb 27, 2023
9619c92
Bumping version strings to new version.
tarhi-saad Feb 27, 2023
659ec05
Empty commit for release pull request
invalid-email-address Mar 3, 2023
e5dcc91
Empty commit for release pull request
invalid-email-address Mar 3, 2023
f9bac1a
Update readme.txt
nielslange Mar 3, 2023
09376f3
Show three Express Payments buttons in-line (#8601)
nielslange Mar 3, 2023
ab75621
Add testing notes
nielslange Mar 3, 2023
c3a2735
Bumping version strings to new version.
nielslange Mar 3, 2023
2c8c780
Empty commit for release pull request
invalid-email-address Mar 3, 2023
3fedeb3
Empty commit for release pull request
invalid-email-address Mar 6, 2023
4e9d51e
Add changelog in readme.txt
tarhi-saad Mar 6, 2023
348c3de
Undo dirty prop removal on error (#8633)
mikejolley Mar 6, 2023
cb14bc9
Add testing notes
tarhi-saad Mar 6, 2023
0012083
fix 404 error (#8445)
gigitux Feb 16, 2023
fb35897
Empty commit for release pull request
invalid-email-address Mar 17, 2023
5438fbe
add testing instruction
gigitux Mar 17, 2023
c5f89b5
Merge branch 'release/9.6.6' of https://github.com/woocommerce/woocom…
gigitux Mar 17, 2023
ea6c7c5
Merge branch 'release/9.6.0' of https://github.com/woocommerce/woocom…
gigitux Mar 17, 2023
98d2b0b
update zip link
gigitux Mar 17, 2023
820e48a
fix version
gigitux Mar 17, 2023
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 @@ -7,9 +7,10 @@ $border-radius: 5px;

.wc-block-components-express-payment__event-buttons {
list-style: none;
display: flex;
flex-direction: row;
flex-wrap: wrap;
display: grid;
grid-template-columns: repeat(auto-fit, minmax(calc(33% - 10px), 1fr));
grid-gap: 10px;
box-sizing: border-box;
width: 100%;
padding: 0;
margin: 0;
Expand All @@ -18,13 +19,20 @@ $border-radius: 5px;

> li {
margin: 0;
width: 100%;

> img {
width: 100%;
height: 48px;
}
}
}

@include breakpoint("<782px") {
.wc-block-components-express-payment__event-buttons {
grid-template-columns: 1fr;
}
}
}

.wc-block-components-express-payment--checkout {
Expand Down Expand Up @@ -85,27 +93,6 @@ $border-radius: 5px;
margin-bottom: em($gap);
}
}

.wc-block-components-express-payment__event-buttons {
> li {
display: inline-block;
width: 50%;
}

> li:nth-child(even) {
padding-left: $gap-smaller;
}

> li:nth-child(odd) {
padding-right: $gap-smaller;
}

> li:only-child {
display: block;
width: 100%;
padding: 0;
}
}
}

.wc-block-components-express-payment--cart {
Expand Down
26 changes: 22 additions & 4 deletions assets/js/data/cart/push-changes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ const dirtyProps = <
const updateCustomerData = debounce( (): void => {
const { billingAddress, shippingAddress } = customerData;
const validationStore = select( VALIDATION_STORE_KEY );
const customerDataToUpdate = {} as Partial< BillingAddressShippingAddress >;

// Before we push anything, we need to ensure that the data we're pushing (dirty fields) are valid, otherwise we will
// abort and wait for the validation issues to be resolved.
Expand All @@ -150,6 +149,8 @@ const updateCustomerData = debounce( (): void => {
}

// Find valid data from the list of dirtyProps and prepare to push to the server.
const customerDataToUpdate = {} as Partial< BillingAddressShippingAddress >;

if ( dirtyProps.billingAddress.length ) {
customerDataToUpdate.billing_address = pick(
billingAddress,
Expand All @@ -166,14 +167,31 @@ const updateCustomerData = debounce( (): void => {
dirtyProps.shippingAddress = [];
}

// If there is customer data to update, push it to the server.
if ( Object.keys( customerDataToUpdate ).length ) {
dispatch( STORE_KEY )
.updateCustomerData( customerDataToUpdate )
.then( () => {
removeAllNotices();
} )
.then( removeAllNotices )
.catch( ( response ) => {
processErrorResponse( response );

// Data did not persist due to an error. Make the props dirty again so they get pushed to the server.
if ( customerDataToUpdate.billing_address ) {
dirtyProps.billingAddress = [
...dirtyProps.billingAddress,
...( Object.keys(
customerDataToUpdate.billing_address
) as BaseAddressKey[] ),
];
}
if ( customerDataToUpdate.shipping_address ) {
dirtyProps.shippingAddress = [
...dirtyProps.shippingAddress,
...( Object.keys(
customerDataToUpdate.shipping_address
) as BaseAddressKey[] ),
];
}
} );
}
}, 1000 );
Expand Down
4 changes: 2 additions & 2 deletions assets/js/editor-components/external-link-card/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { __ } from '@wordpress/i18n';
import { Icon, external } from '@wordpress/icons';
import { VisuallyHidden } from '@wordpress/components';
import { sanitizeHTML } from '@woocommerce/utils';
import { alert } from '@woocommerce/icons';
import { Alert } from '@woocommerce/icons';

/**
* Internal dependencies
Expand Down Expand Up @@ -50,7 +50,7 @@ const ExternalLinkCard = ( {
) }
{ warning ? (
<span className="wc-block-editor-components-external-link-card__warning">
<Icon icon={ alert } />
<Icon icon={ <Alert status="error" /> } />
<span>{ warning }</span>
</span>
) : null }
Expand Down
22 changes: 22 additions & 0 deletions docs/internal-developers/testing/releases/963.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Testing notes and ZIP for release 9.6.3

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


## WooCommerce Core

### Fix the Checkout Blocks "Payment Options" settings crash in the editor. ([8535](https://github.com/woocommerce/woocommerce-blocks/pull/8535))

1. Install and enable an incompatible payment gateway plugin with the `Cart` & `Checkout` Blocks. (e.g., [IDPay Payment Gateway for Woocommerce](https://wordpress.org/plugins/woo-idpay-gateway/))
2. Create a new page and add the `Checkout` Block
3. Select the Checkout Block or any of its Inner Blocks (except for the `Payment Options` Inner Block). Ensure our incompatible payment gateway (e.g., IDPay) is listed under the incompatible gateways notice:

<img width="500" alt="image" src="https://user-images.githubusercontent.com/14235870/221174704-1d12e2bc-6c6c-4089-a2d2-a7bedc7f55c3.png">

4. Select the `Payment Options` Inner Block. Ensure its settings are correctly displayed, the incompatible gateways notice is showing and our incompatible payment Gateway is highlighted under `Settings -> Block -> Methods`

<img width="500" alt="image" src="https://user-images.githubusercontent.com/14235870/221178227-e4e12f08-dd88-4aac-824c-3990bde13a89.png">

| Before | After |
| ------ | ----- |
| <img width="1874" alt="image" src="https://user-images.githubusercontent.com/14235870/221171831-6245b687-a377-4730-92ab-8710360ee060.png"> | <img width="1208" alt="image" src="https://user-images.githubusercontent.com/14235870/221178227-e4e12f08-dd88-4aac-824c-3990bde13a89.png"> |
3 changes: 3 additions & 0 deletions docs/internal-developers/testing/releases/964.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Testing notes and ZIP for release 9.6.4

No User Facing Testing required with this patch release.
13 changes: 13 additions & 0 deletions docs/internal-developers/testing/releases/965.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Testing notes and ZIP for release 9.6.5

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


## WooCommerce Core

### Checkout: Fix state validation after changing shipping country. ([8633](https://github.com/woocommerce/woocommerce-blocks/pull/8633)

1. With a default valid US shipping address set, add an item to the cart and proceed to checkout.
2. Change the shipping address country to India. You will see an error about the incorrect postcode.
3. Select an India state from the dropdown. You will see an error about the incorrect postcode.
4. Enter a valid postcode `411014`. All errors should go away.
11 changes: 11 additions & 0 deletions docs/internal-developers/testing/releases/966.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Testing notes and ZIP for release 9.6.6

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


## WooCommerce Core

### Product Image Gallery: fix 404 error. ([8445](https://github.com/woocommerce/woocommerce-blocks/pull/8445))

1. Add a new post or page.
2. Check the console and see that any 404 error is visible.
5 changes: 4 additions & 1 deletion docs/internal-developers/testing/releases/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,10 @@ Every release includes specific testing instructions for new features and bug fi
- [9.6.0](./960.md)
- [9.6.1](./961.md)
- [9.6.2](./962.md)

- [9.6.3](./963.md)
- [9.6.4](./964.md)
- [9.6.5](./965.md)
- [9.6.6](./965.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": "9.6.2",
"version": "9.6.5",
"description": "WooCommerce blocks for the Gutenberg editor.",
"homepage": "https://github.com/woocommerce/woocommerce-gutenberg-products-block/",
"keywords": [
Expand Down
28 changes: 27 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.1.1
Tested up to: 6.1.1
Requires PHP: 7.2
Stable tag: 9.6.2
Stable tag: 9.6.5
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.html

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

== Changelog ==

= 9.6.6 - 2023-03-17 =

#### Bug Fixes

- Product Image Gallery: fix 404 error. ([8445](https://github.com/woocommerce/woocommerce-blocks/pull/8445))

= 9.6.5 - 2023-03-06 =

#### Bug Fixes

- Checkout: Fix state validation after changing shipping country. ([8633](https://github.com/woocommerce/woocommerce-blocks/pull/8633)

= 9.6.4 - 2023-03-03 =

#### Bug Fixes

- Fix: Show up to three Express Payments buttons next to each other. ([8601](https://github.com/woocommerce/woocommerce-blocks/pull/8601))

= 9.6.3 - 2023-02-27 =

#### Bug Fixes

- Fix: Ensure that Express Payment buttons are visible next to each other. ([8548](https://github.com/woocommerce/woocommerce-blocks/pull/8548))
- Check if session is set before returning updated customer address. ([8537](https://github.com/woocommerce/woocommerce-blocks/pull/8537))
- Fix the Checkout Blocks "Payment Options" settings crash in the editor. ([8535](https://github.com/woocommerce/woocommerce-blocks/pull/8535))

= 9.6.2 - 2023-02-22 =

#### Bug Fixes
Expand Down
10 changes: 7 additions & 3 deletions src/BlockTypes/ProductImageGallery.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
<?php
namespace Automattic\WooCommerce\Blocks\BlockTypes;

use Automattic\WooCommerce\Blocks\Utils\StyleAttributesUtils;


/**
* ProductImageGallery class.
*/
Expand All @@ -15,6 +12,13 @@ class ProductImageGallery extends AbstractBlock {
*/
protected $block_name = 'product-image-gallery';

/**
* It isn't necessary register block assets because it is a server side block.
*/
protected function register_block_type_assets() {
return null;
}

/**
* Register the context
*
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 = '9.6.2';
$version = '9.6.5';
return new NewPackage(
$version,
dirname( __DIR__ ),
Expand Down
4 changes: 4 additions & 0 deletions src/Shipping/ShippingController.php
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,10 @@ public function flush_cache( $settings ) {
* @return array
*/
public function filter_taxable_address( $address ) {

if ( null === WC()->session ) {
return $address;
}
// We only need to select from the first package, since pickup_location only supports a single package.
$chosen_method = current( WC()->session->get( 'chosen_shipping_methods', array() ) ) ?? '';
$chosen_method_id = explode( ':', $chosen_method )[0];
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: 9.6.2
* Version: 9.6.5
* Author: Automattic
* Author URI: https://woocommerce.com
* Text Domain: woo-gutenberg-products-block
Expand Down