The latest version of WooCommerce Blocks, version 11.7.0, is now available for download on WordPress.org and GitHub.
Keep in mind that this is the last major release of WooCommerce Blocks as in the future it will be part of the WooCommerce Monorepo. You can read more about it and how it might impact you in the developer advisory: “WooCommerce Blocks Merging into the WooCommerce Monorepo“.
Notable Changes
Mini-Cart block automatically injected to header patterns and template-parts
Thanks to Block Hooks API, the Mini-Cart block is now automatically injected into the WooCommerce header patterns and template-parts by default. It appears next to the navigation and adjusts to the header layout but you can move it around or remove it if you like.
Please check a short video presenting where to look for header patterns with a Mini-Cart block.
For now, Mini-Cart is automatically injected only in the Twenty Twenty-Four theme but we can expand the list of themes this supports in future iterations.
Rename the Product Collection “Shrink columns to fit” option to “Responsive” and enable it by default
Recently, we added a “Shrink columns to fit” option in the Product Collection block. This makes your product grid responsive. The option has now been renamed to “Responsive” which we found to better explain its purpose.
You can still find it in Product Collection’s inspector controls, next to the “Columns” setting:
Another important change is this option is now enabled by default for newly added Product Collection blocks!
Hook woocommerce_single_product_summary
action to core/post-excerpt
block
Use woocommerce_single_product_summary
action to extend your Single Product template. The hook is attached to the Post Excerpt block so the content you’d like to display on Single Product template will appear above the Product Summary which is a variation of Post Excerpt block.
To make it work, add an action like:
add_action('woocommerce_single_product_summary', function() { echo 'woocommerce_single_product_summary'; });
and the content will appear on the Single Product pages like this:
Changelog
Enhancements
- The Block Hooks API is implemented to auto-inject the Mini-Cart block in header patterns and template parts when the “Twenty Twenty-Four” theme is active. The Mini-Cart block also now defaults to not show the total for the items in the cart when inserted into content. (11745)
- Decrease modal width. (12003)
- [Store Customization] Update the default content in patterns. (11997)
- [Store Customization] Update the “Footer with 3 Menus” pattern to remove the last 2 menus. (11980)
- Limit number of visible incompatible extensions in sidebar notice. (11972)
- Improve readability of order note. (11944)
- Reorganise Columns controls and fix undefined problem in Product Collection settings. (11937)
- Switch to NoticeBanner component inside Store Notices Block placeholder. (11920)
- Preserve shrinkColumns value when switching the layout type of Product Collection. (11905)
- Tweak the product prompt. (11903)
- Add DELETE
private/ai/pattern
endpoint. (11890) - Update notice for default cart and checkout. (11861)
- Enable shrink columns option in Product Collection by default. (11821)
- Move
Combobox
to components package. (11353) - Interactivity API: Implement the new
store()
API. (11071)
Bug Fixes
- [CYS] Fix regression and ensure AI-generated content is assigned to products after the third attempt. (12016)
- [Product Collection] Fix: HTML Entity Decoding in Taxonomy Controls. (11982)
- Product Gallery: Add a Product Image fallback. (11978)
- Reviews by Product: Fix reviews count not appearing in product selector. (11976)
- Hook
woocommerce_single_product_summary
action tocore/post-excerpt
block. (11953) - fix: Store notices always shows as an error type #11768. (11932)
- [Product Collection] Fix: HTML entity decoding for product names in Hand-Picked Products. (11927)
- Validate coupon usage against customer id AND emails. (11860)
- Pass order ID to woocommerce_before_thankyou hook. (11852)
- Translate the prefixes passed to post-terms in product-meta. (11811)
- Prevent fatal errors when using Cart Tokens and creating new accounts on checkout. (11785)
- Product Gallery Thumbnails: Add support for cropping. (11718)
- Fix: Product Collection show products with correct stock statuses. (11708)
- Product Gallery Thumbnails: Fix overflow issues and improve responsiveness. (11665)
Leave a Reply