• Resolved loic45

    (@loic45)


    Hello,

    I’m taking the liberty of contacting you today, as I’ve been experiencing a problem for several weeks on a customer’s site (https://www.maison-alcee.com/).
    This site uses several extensions, including WooCommerce Multilingual & Multicurrency with WPML and NitroPack. The aim is to display, for example, the price of the Persée Azur (https://www.maison-alcee.com/produit/persee/#azur) at €7,500 before tax for users in France, and at $8,900 before tax for users in the United States.

    The problem is as follows:
    When my VPN is deactivated and I’m in France, the price is displayed correctly in euros.
    However, when I activate the VPN to simulate a connection from the USA, the amount is sometimes displayed correctly ($8,900 excluding taxes), but most of the time it remains displayed in euros (€7,500 excluding taxes).

    I found a solution here: https://wpml.org/forums/topic/nitropack-and-multi-currency/
    So I added the following code to the functions.php file of my WordPress theme:

    function wcml_set_custom_currency_cookie( $currency = false ) {
    if ( is_admin() && !( defined('DOING_AJAX') && DOING_AJAX ) )
    return;
    if ( !empty( $currency ) ) {
    setcookie('wcml_custom_currency_cookie', $currency, time() + 60*60*24*7, '/');
    return;
    }
    if ( empty( $_COOKIE['wcml_custom_currency_cookie'] ) && function_exists( 'get_woocommerce_currency' ) ) {
    setcookie('wcml_custom_currency_cookie', get_woocommerce_currency(), time() + 60*60*24*7, '/');
    }
    }
    add_action('wcml_switch_currency', 'wcml_set_custom_currency_cookie');
    add_action('init', 'wcml_set_custom_currency_cookie');

    I’ve also added wcml_custom_currency_cookie (https://ibb.co/vV9Zvkk) to the NitroPack settings (Cache Settings > Cache).
    Unfortunately, the problem persists.

    For the record, I’m using a VPN for my tests.

    Would you have any suggestions or avenues to explore to solve this problem?

    Thanks in advance,
    Lo?c V.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support phristanov

    (@phristanov)

    Hey @loic45 ,

    Thanks for reporting this as well.

    There is a chance that the geolocation is not working properly with NitroPack. Also, please check if the Geolocation (with page caching support) option is enabled in the WooCommerce settings.

    We will be able to help further with this but we will need temporary WP-Admin and FTP access. Since this is private information, I would suggest as per your previous request contacting our Support team at?[email protected]?or via the chat widget within our App Dashboard.

    Best,
    Plamen, Head of Support at NitroPack

    Thread Starter loic45

    (@loic45)

    Hello phristanov,

    Thank you for your feedback.
    Indeed, geolocation (with cache page support) was not active.
    I’ve made the change, but the problem persists.
    So I’ve just sent an e-mail to Nitropack support ([email protected]).

    Best regards,
    Lo?c V.

    Plugin Support phristanov

    (@phristanov)

    Hey @loic45 ,

    Thanks so much! Our team will be there to help!

    Best,
    Plamen, Head of Support at NitroPack

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Incorrect currency pricing on WooCommerce with NitroPack: support needed’ is closed to new replies.