Order Update API Returns Total in USD Instead of INR #10282
Labels
focus: multi-currency
priority: high
The issue/PR is high priority—it affects lots of customers substantially, but not critically.
type: bug
The issue is a confirmed bug.
Describe the bug
In this scenario, the store's default currency is USD, but the order was originally created in INR.
When updating the same order via the WooCommerce REST API
(PUT /wp-json/wc/v3/orders/{order_id}/)
, the response incorrectly returns the total in USD instead of INR, despite passing "currency": "INR" in the request. This issue seems specific to INR, as the API appears to handle other currencies (e.g., EUR) correctly.To Reproduce
Example API Request
PUT Request to Update an Order
Expected Behavior
The API should return a response where:
Example Expected Response:
Actual Response (Bug)
The API response returns the total in USD, even though the currency field is set to INR.
Example Buggy Response:
Additional Observations
If an order is created with "currency": "EUR" in a store where the default currency is USD, the API correctly maintains EUR as the order's currency when updating the order via the PUT request. The totals remain in EUR without being converted back to the store’s default currency (USD).
Environment Details
WooCommerce Version: 9.7.0-dev
WooPayments Version: 8.8.0
Multi-Currency Plugin Used (if any): WooPayments built-in Multi-Currency
The text was updated successfully, but these errors were encountered: