Why do you use get_woocommerce_currency() at order-pay product checkout page
-
I am using your plugin to process payment on the fly, I hook before an order is created and set the order currency (BASED ON USER COUNTRY). The website woocommerce currency is set in USD, e.g if someone wants to order product worth $10, I will hook and auto convert it to equivalent in Naira (by setting the order CURRENCY, amount and ors), I discovered that in the product checkout page ( processed by includes/class-wc-gateway-paystack.php at LINE 662) you instead call get_woocommerce_currency_symbol() which in my case will return USD, and not the order currency which is NGN, thereby glitch in payment.
While resolving the issue for one of our clients, I replaced the line 662 with code snippets below and it worked perfectly
$order_currency = method_exists( $order, 'get_currency' ) ? $order->get_currency() : $order->get_order_currency(); $paystack_params['currency'] = $order_currency;
We really need this fixed, as our plugin serves hundred of users in Nigeria using Paystack-woo.
- The topic ‘Why do you use get_woocommerce_currency() at order-pay product checkout page’ is closed to new replies.