This release includes better error reporting for incorrectly registered payment methods and some improvements to the
emitEventWithAbort event emitter. There is also a bug fix related to
phone field values being cleared unexpectedly with certain shopper behaviour. Read on for more details!
Better error reporting for incorrectly registered payment methods.
When a payment method registers using the payment methods extensibility interface, the feature plugin has some error checking to ensure that the dependencies the plugin lists for its script are actually available during the registration. Without this error check, it’s possible for incorrectly registered payment methods to prevent the loading of any checkout scripts due to the mechanism used internally for managing the loading order of various checkout scripts.
With this release, there are some improvements to the error message logged (PHP error logs and console log) when a payment method doesn’t have all its dependencies registered including:
- Clarifying this is specific to Cart and Checkout blocks loading process.
- Only loading the payment methods API interface when Cart and Checkout blocks feature is on (via the feature plugin).
This is more of a internals update that impacts various event emitters using this function (
onCheckoutAfterProcessingWithError). If you are a developer authoring a payment method that uses any of these events, your implementation should be unaffected by these changes. It’s mostly to prevent potential bugs where there are multiple payment methods in use by a store (that all implement observers for these events). You can read more about the change in this pr.
Fix for unexpected email and phone field value loss.
There was a bug that surfaced when shoppers filled out the email and phone field and then unchecked the “Use same address for billing” option. The email and phone values would be cleared.
This is fixed in this release so that any previously entered values are preserved when toggling this checkbox.
- Improve error message displayed when a payment method didn’t have all its dependencies registered. (4176)
- Improvements to
- Fix issue in which email and phone fields are cleared when using a separate billing address. (4162)