-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix user's shipping & billing address interaction with order #11660
base: main
Are you sure you want to change the base?
Conversation
…empty, and preferences can be {} so check for blank?
…r and also potentially a deleted address
Changes preview: |
This is tackling simliar problems to my PR here: #11606, maybe we want to merge this into one PR? |
@stefnnn yes we could. Although your PR was not merged after 2 months. I am afraid the maintainers are sleeping? |
Copied from @mrbrdo, see spree#11660
@damianlegawiec ping, this is kinda important. Been using these fixes in production for a while now, no issues at all. |
…, fix this It would be more proper to put this into an Order after_save hook, but the same can be said for calling the update_or_create_address method, so I will leave that to a future refactor
The Order should use_billing == true if ship_address is missing, is empty, or is the same as bill_address
262970a
to
0fa0dbe
Compare
Updated to correctly determine use_billing? (fixes issue if ship is same as bill and gets updated in checkout form) |
@damianlegawiec what do you think? |
@damianlegawiec well?? |
There are several issues regarding this, see the individual commits.
This also makes legacy frontend work correctly:
This was quite broken with even a security issue with the unscoped Spree::Address query. I suggest to merge asap due to this.