Two internal classes (
Library) have been deprecated in this release, with functionality being moved to
Since these were internal bootstrap classes we don’t anticipate any external usage, but noting that these classes will be removed in a future release of Blocks.
Checkout Event Changes
The Checkout event
onCheckoutBeforeProcessing has been renamed to
onCheckoutValidationBeforeProcessing to more clearly articulate its coupling to the validation happening when the Checkout form is submitted.
onCheckoutBeforeProcessing will be deprecated formally in the future.
Shared Settings Deprecation
Blocks offered a filter hook named
woocommerce_shared_settings which could be used to change, add, or remove settings that are passed from the server to the client. This is now considered deprecated—a warning will be logged to the browser error console if used.
We recommend instead using the Asset Data Registry directly, so for example:
use Automattic\WooCommerce\Blocks\Package; use Automattic\WooCommerce\Blocks\Assets\AssetDataRegistry; Package::container()->get( AssetDataRegistry::class )->add( $key, $value )
Doing this reduces the risk of conflicting or overwriting data, unlike the filter which allowed any setting to be modified leading to unintentional side effects.
- 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)
- Prevent parts of old addresses being displayed in the shipping calculator when changing countries. (4038)
- Rename onCheckoutBeforeProcessing to onCheckoutValidationBeforeProcessing.
- Switched to
rest_preload_api_requestfor API hydration in cart and checkout blocks. (4090)
- Introduced AssetsController and BlockTypesController classes (which replace Assets.php and Library.php). (4094)
- Replaced usage of the
woocommerce_shared_settingshook. This will be deprecated. (4092)