I’m integrating a multicurrency support for the ExpertHive theme and I would like to display the order total price depending on the currency by which the order has been made in the “Received Orders” section of the vendors.
e.g: a client paid the order with 29€, but in the Received Orders list it shows 29CHF because CHF is the main currency.
the file hivepress\order\edit\block\order-total.php uses the following code but it shows the total with the main currency not the currency by which the order has been paid:
<span><?php echo esc_html( $order->display_total() ); ?></span>
I tried the following code, it works but it’s not a good practice as it makes an SQL query on each order inside the loop:
$order = wc_get_order($order->get_id());
Any idea how to do this ?
Thanks a lot.