WooCommerce Analytics in your store currency
WooCommerce Analytics (the reports under Analytics in your WordPress admin) adds up order totals as they are stored, and it does not know that orders can be in different currencies. Without help, a 10.000 KWD order in a USD store would be counted as 10 dollars, even though it was worth about 32 dollars. WC Currency Switch fixes this by converting each order’s Analytics figures into your store currency, so revenue, products and coupon reports all add up in one currency.
Your store currency is the currency set in WooCommerce. Some plugin labels call it the “base currency”.
How it works#
WooCommerce keeps its own copy of each order’s figures for Analytics. Every time WooCommerce writes or rewrites that copy, the plugin divides the amounts by the exchange rate saved on the order. This covers:
- Order figures: total sales, tax, shipping and net sales.
- Product figures: net and gross revenue, coupon, tax and shipping amounts per product.
- Coupon figures: the discount amount.
New orders are converted automatically. Orders in your store currency are left alone.
The rate used is the one saved on the order at checkout, shown in the Currency Info box on the order. Refunds use the rate of the order they belong to. If an order has no saved rate (for example it was placed before the plugin was installed), or its saved rate is exactly 1, today’s rate is used instead.
Analytics screens are always shown in your store currency, whatever currency your own browser cookie is set to.
Run the sync tool#
Orders that already existed when the conversion started running still hold their original amounts in Analytics. Run the sync tool once to fix them, and again any time you correct an order’s rate.
- Go to WooCommerce > Status > Tools.
- Find WCCS: Sync analytics to base currency.
- Click Run sync.
The tool rebuilds the Analytics figures of every order and refund placed in another currency, including currencies you have since disabled. It uses WooCommerce’s own rebuild, then the conversion described above, and then clears the Analytics report cache so the new numbers show.
When it finishes, it tells you what happened:
- “Synced 12 orders to base currency in WooCommerce Analytics.” (with your number of orders)
- “No orders in other currencies found. Nothing to sync.”
- “WooCommerce Analytics is not available on this site.”
The tool is safe to run more than once. Each run rebuilds the figures from the order, so running it twice gives the same result as running it once.
Examples#
One KWD order in a USD store. The order total is 10.000 KWD, including 1.000 KWD shipping. The saved rate is 1 USD = 0.30870 KWD.
- Total sales: 10.000 / 0.30870 = 32.39 USD
- Shipping: 1.000 / 0.30870 = 3.24 USD
A partial refund. You refund 2.500 KWD of that order. The refund uses the order’s rate of 0.30870:
- Refund: 2.500 / 0.30870 = 8.10 USD
- What the order now adds up to: (10.000 – 2.500) / 0.30870 = 24.30 USD
Fixing an old order. An order from before the plugin was set up shows 10 dollars in Analytics. You run the sync tool. The order has no saved rate, so today’s rate is used, and the order now shows its value in USD.
Good to know#
- The conversion only changes WooCommerce’s Analytics figures. The orders themselves, and what the shopper paid, stay in the order’s currency.
- To correct a single order, change its rate in Currency Info, save the order, then run the sync tool.
- A full refund is converted with the same rate as its order, so it cancels the order’s revenue exactly.
Related docs#
- The currency and exchange rate saved on each order
- Order emails and refunds in another currency
- Analytics shows amounts in the wrong currency