WooCommerce Blocks 3.9 Release Notes

A new version of WooCommerce Blocks has been released! Version 3.9.0 is now available for download from GitHub and WordPress.org.

This release includes a number of fixes for the Cart and Checkout blocks. Thanks again to all of you who are using the new blocks and reporting things you’d like improved! We’re actively working on addressing issues and also integrating more extensions.

There are three changes in particular to highlight:

Fix broken Express Payment method in Cart

We discovered a bug with the functionality of the express payment methods in the Cart (Chrome/Google Pay, Apple Pay). Note – this did not affect their usage in the Checkout.

With the bug, a shopper could initiate the express payment process from the Cart, but completing it would result in an error in the express payment method modal. No payment would be collected, and no order would be created.

With this fix, express payment methods used from the Cart now work as expected.

Cart and checkout now respect the global “Hide shipping costs until an address is entered” setting

In the cart and checkout blocks there were some discrepancies that could exist because the block level setting for hiding shipping costs until an address is entered was disconnected from the global setting.

Unfortunately, due to the way the global setting is coupled to a large amount of logic in WooCommerce core we had to remove the local block level setting and switch to always using the global setting.

This fixes a number of bugs related to calculating totals and what was displayed to the shopper for shipping costs.

It is our intent to move the settings to be more in context with what they affect, but in this case, there’s some changes needed more holistically in WooCommerce core before we can do so.

Change to payment methods registration interface

There has been change to the payment method interface for registering payment methods for use in the checkout block.

Previously these APIs received a callback creator function, for example:

const bankTransferPaymentMethod = {
	name: PAYMENT_METHOD_NAME,
	label: <Label />,
	content: <Content />,
	edit: <Content />,
	icons: null,
	canMakePayment: () => true,
	ariaLabel: label,
};
// Old interface
registerPaymentMethod( 
    ( Config ) => new Config( bankTransferPaymentMethod )
);

The new interface simply receives the options object:

// New interface
registerPaymentMethod( bankTransferPaymentMethod );

This is a backward compatible change (registerPaymentMethod will still accept and work with both types of arguments) but you will see a deprecated warning for implementation with the old argument type. If you’ve integrated payment methods with the blocks, please do switch to the new interface when you’re able, we don’t anticipate doing a hard deprecation for a while yet (and will give plenty of heads up if/when we do).

Changelog

Enhancements

  • Expose discount_type in Store API coupon endpoints. (3399)
  • Exclude checkout-draft orders from WC Admin reports and My Account > Orders. (3379)

Bugfixes

  • Hide spinner on cart block’s “Proceed to Checkout” link when page unloads. (3436)
  • Fixed express payment methods processing not completing when Stripe payment method active. (3432)
  • Refresh PaymentRequest after cancelling payment to prevent addresses remaining populated on repeat attempts. (3430)
  • Ensure “Add a note to your order” section is styled correctly when disabled. (3427)
  • Prevent checkout step heading text overlapping actual heading on small viewports. (3425)
  • Improve Stripe payment request API payment method availability. (3424)
  • Stop hidden products from being linked in cart and checkout blocks. (3415)
  • Show Express Payment Method Error Notices after Payment Failure. (3410)
  • Fix cart block isLarge console error in the editor when running WordPress 5.6 beta. (3408)
  • Fix: Orders not being placed when paying with an Express payment method from the Cart block. (3403)
  • Fix incorrect usage of static method in Stripe payment method integration. (3400)
  • Cart and checkout should respect the global “Hide shipping costs until an address is entered” setting. (3383)
  • Sync shipping address with billing address when shipping address fields are disabled. This fixes a bug where taxes would not reflect changes in billing address when they are set to be calculated from billing address (3358)

Refactor

Support a plain js configuration argument to payment method registration APIs. (3404)


Keep yourself in the loop!

Sign up for the WooCommerce developer newsletter:
Hidden
Hidden
Hidden


Leave a Reply

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