Skip to main content

4.0.2 Release Notes

Version 4.0.2 is a patch release that resolves several bugs reported after the 4.0.0 release.


Download 4.0.2

Bug Fixes

BNPL Gateways Incorrectly Hidden When Messaging Is Disabled

Affirm, Afterpay, and Klarna used a payment_sections option to control where the messaging appeared. A conflict in CheckoutController.js caused these gateways to be hidden at checkout when the checkout section was not added, even though the payment method should still be available.

The fix introduces a dedicated message_sections option for controlling messaging placement. The update-4.0.2.php migration file converts existing payment_sections values to message_sections automatically on update. References in PaymentGatewayRegistry::get_bnpl_payment_gateways have been updated accordingly.

Stripe Inline Form Country Code Error When Billing Fields Are Disabled

If a merchant's checkout page had the billing country or billing postal code fields disabled, the Stripe inline card form would throw the error: You passed an empty string for billing_details[address][country]. This is an uncommon configuration since most checkouts include the billing country field, but it caused payment failures for those stores.

Now, if a site's checkout page billing country field is removed, this error will not occur. It is recommended to capture the customer's billing address details on the checkout page.

Google Pay Button Scroll Issue with CheckoutWC

When using the CheckoutWC plugin, the Google Pay (and Apple Pay) checkout buttons could display with an unexpected scrollbar due to a CSS conflict introduced by the selector renames in 4.0.0. The fix adds overflow: hidden to the .wc-stripe_applepay-checkout-button and .wc-stripe_googlepay-checkout-button elements within the #cfw-place-order container.

When a customer used the Link Express Checkout button and the payment required 3D Secure authentication, an error occurred: Express Checkout Element does not have any payment method data saved with it. This error did not interfere with payment but would show a notice. The root cause was that Link gateways exist in both the express checkout section and the payment method options section, resulting in two gateway instances with the same ID. This caused both CheckoutController::onPaymentRequiresAction and ExpressCheckoutController::onPaymentRequiresAction to fire for the same payment, with the wrong controller attempting to handle 3DS. The fix adds a check in onPaymentRequiresAction to bail early if the payment sheet is not open for that express payment option.

Terms and Conditions Error Not Showing with "Below Card Form" Notice Location

For the Credit Card gateway, when the notice location was set to "Below card form," the terms and conditions validation error message was not displaying on checkout. The bug was caused by a reference to .wc-stripe_cc-new-method-container, a CSS selector that no longer exists after the 4.0.0 refactor. The fix updates the selector to .wc-stripe_cc-container.