-
Notifications
You must be signed in to change notification settings - Fork 216
Allow observers to set billingAddress by returning billingData
#8163
Conversation
|
The release ZIP for this PR is accessible via: Script Dependencies ReportThere is no changed script dependency between this branch and trunk. This comment was automatically generated by the TypeScript Errors Report
assets/js/data/payment/thunks.ts
|
|
Size Change: +162 B (0%) Total Size: 1.08 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch, we also need to do this in the errorResponse condition as well. We could maybe optimise it so we destructure the data from response.meta outside the if...else statement
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noice one, looks good 👍
d21286f to
bf84fba
Compare
|
@alexflorisca I added tests, and also changed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice one, tested with the shippingAddress and all good. Thanks for writing the tests and the type-guards as well, stellar work ⭐
30e6085 to
2311f2c
Compare
This is required since we didn't correctly deprecate billingData when we changed the name to billingAddress
It was in registry, but should be in dispatch as the action is on the same store as the thunk. Registry is used for actions on other stores.
2311f2c to
ea50fb0
Compare
|
I think the E2E fails are unrelated to these changes. I will merge this. |
This is required since we didn't correctly deprecate
billingDatawhen we changed the name tobillingAddress, so some extensions could still be returningbillingDatato theonPaymentProcessingobserver.Testing
Automated Tests
Internal Developer Testing
billingDatato:shippingDatatoo - this can be a copy ofbillingData.Preserve log.billingData.billingDatatobillingAddressshippingAddress- this can be a copy ofbillingAddress.WooCommerce Visibility
Changelog