-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Store Orders: Add order status checks to editable sections #19707
Conversation
…ready been paid for
…ed, or there was a problem/refund)
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.
This is testing out well for me 🎉
Still strikes me as odd that we can print labels for unpaid orders, but that's a separate issue #19079 |
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.
Tests well. Noted one weird trick that auditors hate. :P
…c#19707) * Store Orders: Prevent editing of products/fees on orders that have already been paid for * Add ProtectFormGuard to prevent users leaving while edits are pending * Only allow editing of addresses before the order is “finished” (shipped, or there was a problem/refund)
This PR wraps up all the features for editing orders 🎉 See #15681
Currently all orders are fully editable, no matter the order status. Obviously you don't want to be able to add products to an already-shipped order, so this PR adds in the status checks for editing the line items and billing/shipping addresses. It also adds the form guard to prevent the user from accidentally leaving a page with pending edits.
So you can edit products on any order that hasn't been paid, and edit addressed on any order that hasn't been shipped yet. A full table of functionality + status can be found at this comment: #15681 (comment)
Note: Editing the shipping fee is in another PR #19641, so I haven't left any testing instructions here – but it will also only be possible before the order is paid for.
To test