• The plugin calls function get_woocommerce_currency() to fetch what it should be the order currency. This is incorrect, and it only works in single-currency environments. In multi-currency configurations, function get_woocommerce_currency() returns the active currency, which may or may not match the one from the order.

    The fix is simple, and it involves calling $order->get_currency() instead. I prepared a proof of concept patch for this purpose, which you can find here: https://www.filedropper.com/coinpayments-payment-gateway-for-woocommerce-patched (I couldn’t find a Git repository to send a pull request).

    Note
    The patch was tested with WooCommerce 3.0 and later. If you need to keep compatibility with WooCommerce 2.6 and earlier, you will have to add a version check and call $order->get_order_currency() with the older WC versions.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Fix for multi-currency environments’ is closed to new replies.