WooCommerce Blocks 3.0 release notes

Today we released WooCommerce Blocks 3.0.0! It’s available for download from GitHub and WordPress.org.

Support for BACS and COD

Two of the major highlights of this release are introducing support for the Bank Transfer and Cash on Delivery payment methods to the checkout block. This work fulfills a key part of our plan to support all payment methods offered by WooCommerce core. From the feedback we’ve received so far on the blocks, it is clear that many of you use those payment methods too!

The Cash on Delivery payment method integration includes full support for what shipping methods it is available for as well as whether it is accepted for virtual orders.

Screen Recording 2020-07-20 at 02.21.55 PM.gif

Changes to payment method extension API

If you are a payment method extension developer integrating with the checkout block, please note that we have made a change to the interface. The canMakePayment property is used by integrating payment methods to indicate to checkout whether they can be displayed in the UI or not. This is useful for payment methods that might be restricted by browser, geographical area or some other requirement.

Prior to 3.0, the callback provided on this property by the payment method would only ever get invoked once during a checkout session. However, with 3.0 this could now get invoked multiple times during the checkout session. This is so payment methods have the opportunity to update whether they can show in the ui/ux or not depending on changes in the checkout itself (shipping rates selected, totals etc).

This is a considered a non-breaking change, however, if you do any expensive payment method initialization during this callback, you may want to ensure you only do that initialization once and cache the results. You can see an example of this is done for the Stripe payment request integration here.


Here’s a changelog of the changes in this release:

  • build: Updated the automattic/jetpack-autoloader package to the 2.0 branch. #2847
  • enhancement: Add support for the Bank Transfer (BACS) payment method in the Checkout block. #2821
  • enhancement: Several improvements to make Credit Card input fields display more consistent across different themes and viewport sizes. #2869
  • enhancement: Cart and Checkout blocks show a notification for products on backorder. #2833
  • enhancement: Chip styles of the Filter Products by Attribute and Active Filters have been updated to give a more consistent experience. #2765
  • enhancement: Add protection for rogue filters on order queries when executing cleanup draft orders logic. #2874
  • enhancement: Extend payment gateway extension API so gateways (payment methods) can dynamically disable (hide), based on checkout or order data (such as cart items or shipping method). For example, Cash on Delivery can limit availability to specific shipping methods only. #2840 [DN]
  • enhancement: Support Cash on Delivery core payment gateway in the Checkout block. #2831 #2831
  • performance: Don’t load shortcode Cart and Checkout scripts when using the blocks. #2842
  • performance: Scripts only relevant to the frontend side of blocks are no longer loaded in the editor. #2788
  • performance: Lazy Loading Atomic Components #2777
  • performance: Fix unnecessary checks happening for wc_reserved_stock table in site dashboard #2895
  • refactor: Remove dashicon classes #2848

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.