Change currency in WooCommerce orders without affecting the total

I'm making a big payment gateway for WooCommerce which has 4 sides: first one is client side which will send data, second side is main server which receives data and depending on some options it choose where to send it, third side is a WordPress site contains one gateway and main server to choose between them, fourth side is gateway site. This was briefly what we have now when I send data from side 2 to 3. I let it being autofilled and auto placed order so it goes automatically to side 4, but I cannot change currency in those sites (side 3) so when it go to side 4 it go with their old currencies but with total from side first, so I need a way to change currency in (side 3) on getting data from (side 2) I tried most common solutions like: add_action('woocommerce_checkout_order_processed', 'custom_set_order_currency', 10, 1); function custom_set_order_currency($order_id) { $order = wc_get_order($order_id); $order->set_currency('HRK'); $order->save(); } But none worked. Also I can say I tried all filters. I have checked one gateway source code and I found that it takes currency to send using 'currency' => get_woocommerce_currency()

Comment (0)

You’ll be in good company