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

Release: 9.8.3 #8884

Merged
merged 7 commits into from
Mar 28, 2023
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
8 changes: 0 additions & 8 deletions assets/js/base/hooks/use-border-props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* External dependencies
*/
import { __experimentalUseBorderProps } from '@wordpress/block-editor';
import { isFeaturePluginBuild } from '@woocommerce/block-settings';
import { isObject } from '@woocommerce/types';
import { parseStyle } from '@woocommerce/base-utils';

Expand All @@ -20,13 +19,6 @@ type WithStyle = {
export const useBorderProps = (
attributes: unknown
): WithStyle & WithClass => {
if ( ! isFeaturePluginBuild() ) {
return {
className: '',
style: {},
};
}

const attributesObject = isObject( attributes ) ? attributes : {};
const style = parseStyle( attributesObject.style );

Expand Down
8 changes: 0 additions & 8 deletions assets/js/base/hooks/use-color-props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* External dependencies
*/
import { __experimentalUseColorProps } from '@wordpress/block-editor';
import { isFeaturePluginBuild } from '@woocommerce/block-settings';
import { isObject } from '@woocommerce/types';
import { parseStyle } from '@woocommerce/base-utils';

Expand All @@ -18,13 +17,6 @@ type WithStyle = {
// @todo The @wordpress/block-editor dependency should never be used on the frontend of the store due to excessive side and its dependency on @wordpress/components
// @see https://github.com/woocommerce/woocommerce-blocks/issues/8071
export const useColorProps = ( attributes: unknown ): WithStyle & WithClass => {
if ( ! isFeaturePluginBuild() ) {
return {
className: '',
style: {},
};
}

const attributesObject = isObject( attributes ) ? attributes : {};
const style = parseStyle( attributesObject.style );

Expand Down
7 changes: 5 additions & 2 deletions assets/js/data/payment/thunks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,13 @@ export const __internalEmitPaymentProcessingEvent: emitProcessingEventType = (
);
}

if ( shippingDataFromResponse ) {
if (
objectHasProp( shippingDataFromResponse, 'address' ) &&
shippingDataFromResponse.address
) {
// Set this here so that old extensions still using shippingData can set the shippingAddress.
shippingAddress =
shippingDataFromResponse as ShippingAddress;
shippingDataFromResponse.address as ShippingAddress;
deprecated(
'returning shippingData from an onPaymentProcessing observer in WooCommerce Blocks',
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const SaveSettings = () => {
onClick={ (
event: React.MouseEvent< HTMLButtonElement, MouseEvent >
) => {
event.preventDefault();
const target = event.target as HTMLButtonElement;
if ( target?.form?.reportValidity() ) {
save();
Expand Down
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": "9.8.2",
"version": "9.8.3",
"keywords": [
"gutenberg",
"woocommerce",
Expand Down
29 changes: 29 additions & 0 deletions docs/internal-developers/testing/releases/983.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Testing notes and ZIP for release 9.8.3

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

## WooCommerce Core

### Fix "Save changes" default behavior bug in the Firefox browser [#8754](https://github.com/woocommerce/woocommerce-blocks/pull/8754)

You should use the Firefox browser for this test.

1. Go to `WooCommerce/Shipping/Local pickup`
2. Click on the `Save changes` button. Ensure you are not redirected to another page, and the notice `Local Pickup settings have been saved.` is displayed
<img width="1018" alt="image" src="https://user-images.githubusercontent.com/14235870/225263783-6455a4c6-3200-4e93-8e92-74bdf2a83952.png">

3. Make some changes (e.g., enable/disable local pickup, add/edit a pickup location, etc.)
4. Click on the `Save changes` button. Ensure you have the same results in step 2
5. Refresh the page. Ensure your changes are being saved

### Fix border styles not visible in the editor in Featured Product and Featured Category blocks [#8838](https://github.com/woocommerce/woocommerce-blocks/pull/8838)

Note: this can't be tested directly in WC Blocks. You should only test it in the WC core build.

1. Add a Featured Item (Featured Category or Featured Product) block to a page or post.
2. Select the border controls and add a border style. Add a color and give it some width.
3. You should see the border you set dynamically display on the featured item.
4. Now click on the `Unlink` button on the border controls and try setting different values for color and width for each of the border sides (top,right,bottom,left).
5. Ensure this is working by visually seeing the changes to the featured item.
6. Save and make sure this is also displaying correctly on the frontend.
7. Test both `Featured Category` and `Featured Product` blocks.
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 @@ -130,6 +130,7 @@ Every release includes specific testing instructions for new features and bug fi
- [9.8.0](./980.md)
- [9.8.1](./981.md)
- [9.8.2](./982.md)
- [9.8.3](./983.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": "9.8.2",
"version": "9.8.3",
"description": "WooCommerce blocks for the Gutenberg editor.",
"homepage": "https://github.com/woocommerce/woocommerce-gutenberg-products-block/",
"keywords": [
Expand Down
10 changes: 9 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
Tested up to: 6.2
Requires PHP: 7.2
Stable tag: 9.8.2
Stable tag: 9.8.3
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.html

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

== Changelog ==

= 9.8.3 - 2023-03-28 =

#### Bug Fixes

- Fixed an issue where extensions were unable to programatically set the shipping address during payment processing. ([8878](https://github.com/woocommerce/woocommerce-blocks/pull/8878))
- Fix border styles not visible in the editor in Featured Product and Featured Category blocks. ([8838](https://github.com/woocommerce/woocommerce-blocks/pull/8838))
- Fix Local Pickup "Save changes" default behavior bug in the Firefox browser. ([8754](https://github.com/woocommerce/woocommerce-blocks/pull/8754))

= 9.8.2 - 2023-03-22 =

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