Request to Handle IRR Currency in Plugin Code
-
Hello,
As you can see here:
https://support.google.com/analytics/answer/9796179
Google Analytics does not support Iranian Rial, so I have to change the plugin codes with every single update you provide for this plugin to fix this problem.I kindly request that you add an “if” condition specifically for the Iranian Rial currency, so that your plugin sends “USD” instead of “IRR” to Google Analytics (which is not supported by Google Analytics).
The file that needs to be changed is: woocommerce-google-analytics-integration/includes/class-wc-abstract-google-analytics-js.php
On line 197, instead of:
'currency_code' => get_woocommerce_currency(),
please change it to:'currency_code' => (get_woocommerce_currency() === 'IRR' || get_woocommerce_currency() === 'IRT') ? 'USD' : get_woocommerce_currency(),
On line 285, instead of:
'currency_code' ? ? ? => $order->get_currency(),
please change it to:'currency_code' => ($order->get_currency() === 'IRR' || $order->get_currency() === 'IRT') ? 'USD' : $order->get_currency(),
Thanks.
- You must be logged in to reply to this topic.