WooCommerce Blocks 10.0.0 Release Notes

The latest version of WooCommerce Blocks, version 10.0.0, is now available for download on WordPress.org and GitHub.

Notable Changes

Updated Shopper Notices

In this release, we introduce new components and styling for buyer notices, featuring Snackbar lists and Notice banners with shared components. These new styles give a uniform look and feel across all WooCommerce Blocks.

In addition to this, if your store uses either the Cart Block or Checkout Block on the main cart and checkout pages, these styles will also transfer to all other WooCommerce notices, e.g. the ones in the “My Account” area. These new styles should take precedence over any existing theme styles due to the new markup and CSS being applied.

The basic HTML structure of the new notices is as follows:

<div class="wc-block-components-notice-banner is-error">
     <svg />
     <div class="wc-block-components-notice-banner__content">MESSAGE</div>
</div>

There are different styles based on the notice status which include errorsuccessinfodefaultwarning.

If you’re not using the Cart or Checkout Blocks (if you’re still using the shortcode based cart and checkout for example), existing notices rendered by WooCommerce will not be affected.

Here’s a preview of how each type of notice looks:

An image displaying a preview of the new styling of the buyer notices.

Themes that use customised notices will not have their styles respected after this update. The new notices use new CSS class-names and markup, so any existing styles will not apply. We’ve avoided using legacy class names to avoid conflicts and to ensure that there is consistent styling across all notice types. 

Themes can target the new selectors after this release, in which case the main CSS selector is .wc-block-components-notice-banner.

Documentation is available:

Cart and Checkout blocks are now wide-aligned by default when added to a page

We made a change to the Cart and Checkout blocks, so that they have a wide alignment by default. This helps to ensure the blocks display correctly when using some block themes. Previously, they would be narrow, and appear in a single column even on wide devices. To revert to how they were, select the main Cart or Checkout block, select the “align” button, and choose “None”.

image showing how to change the alignment on the Checkout block.

New additionalCartCheckoutInnerBlockTypes filter

In this release we added a new filter, additionalCartCheckoutInnerBlockTypes which allows additional block types to be added to the Cart and Checkout inner blocks areas. We included an example of how to use it in the available filters documentation.

An example of how this can be used, is if you have created a custom block, and want merchants to have the option to insert it in the Cart/Checkout block, using this filter would let them choose it.

You may also supply core block names to this filter. For example, if you want to allow merchants to include the core/table block below the address form, this is possible too!

registerCheckoutFilters( 'my-custom-plugin', {
	additionalCartCheckoutInnerBlockTypes: ( value, extensions, { block } ) => {
        value.push( 'core/table' );
		return value;
	},
} );

Styling options for product blocks

Product SKU, Product Price, and Product Image now support more styling options in terms of color, dimension, and typography and have support for Global Styles.

New blocks

  • Product Reviews block: Displays the reviews for a given product. It can be inserted inside the Single Product template.
Image showing the Product Reviews Block

Changelog

Enhancements

  • Filter by Price: Simplify the interface by removing the decimals. (8975)
  • Moved editor-only placeholders to the block inspector to improve the appearance of the checkout block in the post editor. (8957)
  • Enhance Product SKU block styling capabilities with additional support for color, typography & spacing. (8913)
  • Enhance Product Price block styling capabilities with additional support for background color, line height, font family, letter spacing, and padding. (8906)
  • Enable users to migrate to the blockified Single Product template. (8902)
  • Set Cart and Checkout blocks to have the wide alignment by default when first added to a page. (8899)
  • Add padding support for Product Image block. (8895)
  • Added the “Products Review” block. (8857)
  • New styles for error, info, and success notices across notices created by blocks. Additionally, existing notices in core receive new styles when Cart and Checkout Blocks are in use. (8659)
  • Add additionalCartCheckoutInnerBlockTypes checkout filter to allow additional block types to be inserted into the Cart and Checkout blocks in the editor. (8650)
  • Product Rating: Normalize the height of rating icons and the add review link. (8399)
  • Show the collection address in the shipping section of the Checkout sidebar when using a Local Pickup method. (8305)

Bug Fixes

  • Prevent the shipping/billing address forms from breaking when entering postcodes for specific countries. (8987)
  • Product Archive Compatibility Layer: Fix duplicated content. (8915)
  • Product Archive compatibility layer: Fix the woocommerce_after_shop_loop_item_title hook positioning. (8911)
  • Fix image placeholder for the Product Image Gallery block that was not fitting inside its wrapper component. (8901)
  • Add Cart and Checkout blocks to the Style Book. (8888)
  • Fix duplicated “Shipping Method” Block on the front-end. (8861)
  • Replace the Notice component with the Skeleton component for the Add to Cart Form block. (8842)

Keep yourself in the loop!

Sign up for the WooCommerce developer newsletter:
This field is hidden when viewing the form
This field is hidden when viewing the form
This field is hidden when viewing the form


One response to “WooCommerce Blocks 10.0.0 Release Notes”

  1. Rafał Jóśko - Woobox agencja SEO & SEM Avatar
    Rafał Jóśko – Woobox agencja SEO & SEM

    Super 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *