• 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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hey there, @shayanfp! Thanks for contacting us.

    Since the currency is not supported by Google Analytics, I’m not sure if it is possible to do that.
    Having said that, we do appreciate your suggestions and are always looking for ways to improve our products and services, and input from users like you is invaluable.

    We have a website where you can submit feature requests and upvote the ones other people submitted and you like. You can check that out here.

    While we are not able to help with custom code, you might want to the WooCommerce Facebook group or the #developers channel of the WooCommerce Community Slack. We’re lucky to have a great community of open-source developers for WooCommerce, and many of our developers hang out there too, so they might be able to help you with that.

    Please let us know if there’s anything else we can do to help or if you have further questions.

    Have a wonderful day!

    Hi ?? We haven’t heard back from you in a while, so I’m going to mark this as resolved – we’ll be here if and/or when you are ready to continue.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.