[Order editing] Non-default currency order edit notice #14345
+134
−25
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes: #14304
Description
This PR disables order editing for orders with a different currency compared to the site's default.
This is a workaround. If we allowed this, items on these orders would be shown in the wrong currency. See peaMlT-XF-p2 for context.
Multi-currency is not supported in the app at present, but when we add support properly, this workaround should be removed and the edit screen fixed.
Steps to reproduce
Repeat for an order in your store's default currency – observe that you can edit it as normal.
Testing information
I added some unit tests for this, but the reliance on whether the order is synced or not was tricky. I effectively exposed that property to be mockable in tests, which is a little strange but it would have made for very brittle tests to actually allow the
syncEverything
function to work via lots of mocking.I tested on an iPhone running iOS 18.1, and an iPad running iOS 17.7
Tracks event registered.
Note that I also see issues when creating an order – the order creation flow shows my site's default currency (GBP), but the order is then created in USD. I'm not really sure why that is, and it seems more drastic to disable order creation than order editing... so I've treated it as out of scope for this ticket, but will find out why and create another issue if needed.
Screenshots
edit-order-notice.mp4
RELEASE-NOTES.txt
if necessary.Reviewer (or Author, in the case of optional code reviews):
Please make sure these conditions are met before approving the PR, or request changes if the PR needs improvement: