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

Commit 7b0ecf0

Browse files
github-actions[bot]github-actionsmikejolleysenadir
authored
Release: 5.0.0 (#4144)
* Empty commit for release pull request * Changelog * Testing instructions * cast correct value of setting * fix typo * add zip * /tsconfig.base export-ignore * update image * Bumping version strings to new version. Co-authored-by: github-actions <[email protected]> Co-authored-by: Mike Jolley <[email protected]> Co-authored-by: Nadir Seghir <[email protected]>
1 parent 387a296 commit 7b0ecf0

File tree

11 files changed

+104
-27
lines changed

11 files changed

+104
-27
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,5 @@
2828
/globals.d.ts export-ignore
2929
/tsconfig.json export-ignore
3030
/tsconfig.base.json export-ignore
31+
/tsconfig.base export-ignore
3132
/webpack.config.js export-ignore

docs/testing/releases/500.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
## Testing notes and ZIP for release 5.0.0
2+
3+
Zip file for testing: [woocommerce-gutenberg-products-block.zip](https://github.com/woocommerce/woocommerce-gutenberg-products-block/files/6392862/woocommerce-gutenberg-products-block.zip)
4+
5+
## Feature plugin only
6+
7+
### General smoke testing
8+
9+
The following are related to various changes impacting existing flows, so smoke testing is needed to verify there are no regressions:
10+
11+
- Confirm blocks are available in the editor, and confirm insertion works for the All Products Block, Cart and Checkout Blocks specifically.
12+
- Place orders via the Checkout block starting from the Cart Block & shortcode
13+
- During checkout, submit the form without filling out a required field. Confirm validation messages are displayed.
14+
- Fix the validation warnings and submit the order successfully.
15+
16+
### Remove work-around to load our stylesheets after wp-edit-post #4097
17+
18+
![Screenshot](https://user-images.githubusercontent.com/3616980/115833554-78ec8600-a414-11eb-8828-c52ec427fa79.png)
19+
20+
Open the Checkout block in the editor and verify the Country/Region selector has the same height as the City field next to it, rounded corners, etc.
21+
22+
### Prevent unwanted parts of address being displayed #4038
23+
24+
1. Add an item to the cart.
25+
2. Go to the shortcode cart - use the shipping calculator to enter a US address. (State: California, City: Beverly Hills, ZIP: 90210)
26+
3. Proceed to checkout and successfully complete. If you get errors, ensure the form is filled properly, and submit again (This is a known issue in #3975)
27+
4. Add another item to the cart and go back to the shortcode cart, change your address on the shipping calculator to a Polish one (or any other that doesn't use states). (City: Gdansk, Postcode: 80-000)
28+
5. Go to the cart Block and see there is no CA shown in the address in the shipping totals area.
29+
30+
### Rest API batching support #4075
31+
32+
1. Open up the browser console and go to the Network tab. Filter by XHR requests.
33+
2. Smoke test add to cart functionality from the all products block.
34+
3. After adding to cart, confirm the network tab shows a request to the /batch endpoint.
35+
4. Confirm that each time you add to cart, a new batch/ request is made.
36+
37+
Optionally, because this is difficult to achieve, if you tab to an add to cart button and hover over another add to cart button with your mouse, hit enter and then click the 2nd add to cart button (we want to trigger 2 add to cart events in quick succession). After a very short delay you should see ONE batch request, but both items should be added to the cart.
38+
39+
### Deprecate the woocommerce_shared_settings hook #4092
40+
41+
1. Running WooCommerce 5.2, visit the admin Dashboard.
42+
2. Open up the browser error console.
43+
3. A warning will be shown stating that the woocommerce_shared_settings hook is deprecated.
44+
4. Again running WooCommerce 5.2, go to the Checkout page (running the checkout block). The same notice will be shown in the console.
45+
46+
### Change checkoutAllowsGuest to the correct value. #4146
47+
48+
1. In WooCommerce Settings > Accounts and Privacy, prevent customers from placing orders without an account, Allow them to create an account during checkout:
49+
50+
![Settings](https://user-images.githubusercontent.com/6165348/116407897-22bf7e80-a82a-11eb-982f-03d09dcc0e1f.png)
51+
52+
2. Allow customers to create account during checkout by setting this option within the Checkout Block:
53+
54+
![Block](https://user-images.githubusercontent.com/6165348/116408030-4682c480-a82a-11eb-8bc4-b2b5c9bf3065.png)
55+
56+
3. On the frontend, as a logged-out guest, add an item to your cart and go to the Block Checkout.
57+
4. You shouldn't see a "Create an Account?" checkbox on Checkout.
58+
5. When placing an order, an account will be created for you.

docs/testing/releases/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,5 @@ Every release includes specific testing instructions for new features and bug fi
2828
- [4.7.0](./470.md)
2929
- [4.8.0](./480.md)
3030
- [4.9.0](./490.md)
31-
- [4.9.1](./491.md)
31+
- [4.9.1](./491.md)
32+
- [5.0.0](./500.md)

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": "5.0.0-dev",
5+
"version": "5.0.0",
66
"description": "WooCommerce blocks for the Gutenberg editor.",
77
"homepage": "https://github.com/woocommerce/woocommerce-gutenberg-products-block/",
88
"keywords": [

readme.txt

Lines changed: 18 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: 5.5
55
Tested up to: 5.7
66
Requires PHP: 7.0
7-
Stable tag: 5.0.0-dev
7+
Stable tag: 5.0.0
88
License: GPLv3
99
License URI: https://www.gnu.org/licenses/gpl-3.0.html
1010

@@ -85,6 +85,23 @@ Release and roadmap notes available on the [WooCommerce Developers Blog](https:/
8585

8686
== Changelog ==
8787

88+
= 5.0.0 - 2021-04-28 =
89+
90+
#### Enhancements
91+
92+
- Added support to the Store API for batching requests. This allows multiple POST requests to be made at once to reduce the number of separate requests being made to the API. ([4075](https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/4075))
93+
94+
#### Bug Fixes
95+
96+
- Prevent parts of old addresses being displayed in the shipping calculator when changing countries. ([4038](https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/4038))
97+
98+
#### Refactor
99+
100+
- Rename onCheckoutBeforeProcessing to onCheckoutValidationBeforeProcessing.
101+
- Switched to `rest_preload_api_request` for API hydration in cart and checkout blocks. ([4090](https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/4090))
102+
- Introduced AssetsController and BlockTypesController classes (which replace Assets.php and Library.php). ([4094](https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/4094))
103+
- Replaced usage of the `woocommerce_shared_settings` hook. This will be deprecated. ([4092](https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/4092))
104+
88105
= 4.9.1 - 2021-04-13 =
89106

90107
#### Bug Fixes

src/Assets.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
/**
88
* Assets class.
99
*
10-
* @deprecated $VID:$ This class will be removed in a future release. This has been replaced by AssetsController.
10+
* @deprecated 5.0.0 This class will be removed in a future release. This has been replaced by AssetsController.
1111
* @internal
1212
*/
1313
class Assets {
@@ -16,63 +16,63 @@ class Assets {
1616
* Initialize class features on init.
1717
*
1818
* @since 2.5.0
19-
* @deprecated $VID:$
19+
* @deprecated 5.0.0
2020
*/
2121
public static function init() {
22-
_deprecated_function( 'Assets::init', '$VID:$' );
22+
_deprecated_function( 'Assets::init', '5.0.0' );
2323
}
2424

2525
/**
2626
* Register block scripts & styles.
2727
*
2828
* @since 2.5.0
29-
* @deprecated $VID:$
29+
* @deprecated 5.0.0
3030
*/
3131
public static function register_assets() {
32-
_deprecated_function( 'Assets::register_assets', '$VID:$' );
32+
_deprecated_function( 'Assets::register_assets', '5.0.0' );
3333
}
3434

3535
/**
3636
* Register the vendors style file. We need to do it after the other files
3737
* because we need to check if `wp-edit-post` has been enqueued.
3838
*
39-
* @deprecated $VID:$
39+
* @deprecated 5.0.0
4040
*/
4141
public static function enqueue_scripts() {
42-
_deprecated_function( 'Assets::enqueue_scripts', '$VID:$' );
42+
_deprecated_function( 'Assets::enqueue_scripts', '5.0.0' );
4343
}
4444

4545
/**
4646
* Add body classes.
4747
*
48-
* @deprecated $VID:$
48+
* @deprecated 5.0.0
4949
* @param array $classes Array of CSS classnames.
5050
* @return array Modified array of CSS classnames.
5151
*/
5252
public static function add_theme_body_class( $classes = [] ) {
53-
_deprecated_function( 'Assets::add_theme_body_class', '$VID:$' );
53+
_deprecated_function( 'Assets::add_theme_body_class', '5.0.0' );
5454
return $classes;
5555
}
5656

5757
/**
5858
* Add theme class to admin body.
5959
*
60-
* @deprecated $VID:$
60+
* @deprecated 5.0.0
6161
* @param array $classes String with the CSS classnames.
6262
* @return array Modified string of CSS classnames.
6363
*/
6464
public static function add_theme_admin_body_class( $classes = '' ) {
65-
_deprecated_function( 'Assets::add_theme_admin_body_class', '$VID:$' );
65+
_deprecated_function( 'Assets::add_theme_admin_body_class', '5.0.0' );
6666
return $classes;
6767
}
6868

6969
/**
7070
* Adds a redirect field to the login form so blocks can redirect users after login.
7171
*
72-
* @deprecated $VID:$
72+
* @deprecated 5.0.0
7373
*/
7474
public static function redirect_to_field() {
75-
_deprecated_function( 'Assets::redirect_to_field', '$VID:$' );
75+
_deprecated_function( 'Assets::redirect_to_field', '5.0.0' );
7676
}
7777

7878
/**

src/AssetsController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
/**
99
* AssetsController class.
1010
*
11-
* @since $VID:$
11+
* @since 5.0.0
1212
* @internal
1313
*/
1414
final class AssetsController {

src/BlockTypesController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
/**
1111
* BlockTypesController class.
1212
*
13-
* @since $VID:$
13+
* @since 5.0.0
1414
* @internal
1515
*/
1616
final class BlockTypesController {

src/Library.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,35 +10,35 @@
1010
/**
1111
* Library class.
1212
*
13-
* @deprecated $VID:$ This class will be removed in a future release. This has been replaced by BlockTypesController.
13+
* @deprecated 5.0.0 This class will be removed in a future release. This has been replaced by BlockTypesController.
1414
* @internal
1515
*/
1616
class Library {
1717

1818
/**
1919
* Initialize block library features.
2020
*
21-
* @deprecated $VID:$
21+
* @deprecated 5.0.0
2222
*/
2323
public static function init() {
24-
_deprecated_function( 'Library::init', '$VID:$' );
24+
_deprecated_function( 'Library::init', '5.0.0' );
2525
}
2626

2727
/**
2828
* Register custom tables within $wpdb object.
2929
*
30-
* @deprecated $VID:$
30+
* @deprecated 5.0.0
3131
*/
3232
public static function define_tables() {
33-
_deprecated_function( 'Library::define_tables', '$VID:$' );
33+
_deprecated_function( 'Library::define_tables', '5.0.0' );
3434
}
3535

3636
/**
3737
* Register blocks, hooking up assets and render functions as needed.
3838
*
39-
* @deprecated $VID:$
39+
* @deprecated 5.0.0
4040
*/
4141
public static function register_blocks() {
42-
_deprecated_function( 'Library::register_blocks', '$VID:$' );
42+
_deprecated_function( 'Library::register_blocks', '5.0.0' );
4343
}
4444
}

src/Package.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public static function container( $reset = false ) {
106106
NewPackage::class,
107107
function ( $container ) {
108108
// leave for automated version bumping.
109-
$version = '5.0.0-dev';
109+
$version = '5.0.0';
110110
return new NewPackage(
111111
$version,
112112
dirname( __DIR__ ),

0 commit comments

Comments
 (0)