We don't specify a currency when we send an order creation API request, assuming it will be created with the site's default currency. In the order creation UI, we always show all amounts in the site's default currency.
However, when the user has a different default currency set for their account, that is used by the API when the order is created.
This will lead to the order being created, but then the currency shown appears to change when the merchant views the order details, compared to what they saw in order creation.
Additionally, the order won't be eligible for In-Person Payments, as the currency won't match the site's currency.
Since we don't give the user a chance to select the currency, and assume the site's default, we should override the API's default by specifying the site's default currency in the request.
Repro
Use a test store with WooPayments installed and active, configured to use the built-in multi-currency functionality. Enable at least 2 currencies.
Set your user's account to have a different default currency than the site's default, by going to {siteurl}/my-account/edit-account/ in a browser, logging in as your user, and selecting a different option.
Launch the app
Switch to your test store
Add an order with items – observe that the site default currency is shown in this UI
Tap Create
Observe that in the order details, your user's currency is shown (amounts are the same.)
Description
We don't specify a currency when we send an order creation API request, assuming it will be created with the site's default currency. In the order creation UI, we always show all amounts in the site's default currency.
However, when the user has a different default currency set for their account, that is used by the API when the order is created.
This will lead to the order being created, but then the currency shown appears to change when the merchant views the order details, compared to what they saw in order creation.
Additionally, the order won't be eligible for In-Person Payments, as the currency won't match the site's currency.
Since we don't give the user a chance to select the currency, and assume the site's default, we should override the API's default by specifying the site's default currency in the request.
Repro
Use a test store with WooPayments installed and active, configured to use the built-in multi-currency functionality. Enable at least 2 currencies.
Set your user's account to have a different default currency than the site's default, by going to
{siteurl}/my-account/edit-account/
in a browser, logging in as your user, and selecting a different option.Create
Screenshots
https://github.com/user-attachments/assets/de82c64f-bacf-4053-a43e-8138df2f5143
Relates to #12865