• Hi,

    I’m currently trying to set up the Vipps MobilePay for WooCommerce plugin on my store, but I’m running into an issue at the initial setup stage.

    My store is using WooPayments with the Multi-Currency feature, and the base currency is set to USD. However, I plan to allow customers (especially in Norway) to view and pay in NOK through the multi-currency setup.

    At the moment, the Vipps plugin blocks setup entirely with the message that USD is not supported (only NOK/SEK).

    My question is:

    Is it possible to use Vipps in a WooCommerce store where the base currency is USD, but customers can switch to NOK and pay in NOK at checkout?

    Or does the plugin strictly require that the store’s base currency is set to NOK in order to function at all?

    I would ideally like to:

    • Keep USD as the base currency for reporting/business reasons
    • Use WooPayments for international payments
    • Offer Vipps specifically for Norwegian customers paying in NOK

    Is this supported in any way, or is changing the base currency to NOK the only viable solution?

    Thanks in advance for your help.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Iver Odin Kvello

    (@iverok)

    If your base currency isn’t NOK (or SEK or DKK or EUR), you will get the warning in the settings, but you should still be able to turn the payment option on. It will only be shown if the gateways is_available-method is true however.

    The “is_available” method of the module checks the result of the “get_woocommerce_currency()” function, so if your multi-currency solution modifies the result of this via filters (the 'woocommerce_currency' filter), the Vipps alternative should be available on the checkout screen if NOK has been chosen.

    There is also a filter, $ok = apply_filters('woo_vipps_is_available', $ok, $this); which runs after the currency check. It is mostly intended to turn Vipps *off* when not supportable though – the currency of the Order will also use get_woocommerce_currency, and this will have to be NOK or the order will fail.

    If your multi-currency plugin does not modify this function, you will need to both implement the woo_vipps_is_available filter and to modify the orders’ currency and total values before the order is sent to Vipps. You should be able to do this with the action do_action('woo_vipps_before_process_payment',$order_id);, but before doing that I would look into how the multicurrency plugin actually does things.

    Thread Starter cbwebmaster

    (@cbwebmaster)

    Would you consider this worth doing? Or is it a sloppy work around? I am not a developer but I may be able to achieve this with Vibe Coding and Claude. Would you recomend it?

    Plugin Author Iver Odin Kvello

    (@iverok)

    I’m not familiar with how the Woo Payments plugin works with regard to multi-currency; but you should be able to find out by checking the value of get_woocommerce_currency() while browsing the site with NOK as your customers’ currency. If this then returns NOK, I would expect Vipps to work by just turning it on (and selecting NOK of course). You could just log this or output it in a hidden DIV or something like it. Claude or codex should be able to do that easily.

    We can help with debugging if that doesn’t work – it should be no more than a few lines of code, such as

    add_action('wp_footer', function () {
    echo "\n<!-- current-currency is " . get_woocommerce_currency() . " -->\n";
    error_log("Current currency is " . get_woocommerce_currency());
    });

    — to both log the currency and to print it in a comment in the footer. NB you would need to turn of caching for this to work.

    It is not a sloppy workaround per se – if get_woocommerce_currency() returns NOK and the prices have been calculated correctly with norwegian prices, the base currency of the store shouldn’t matter. Only the currency as it is in the moment of purchase.

    If Woo Payments only implements switching currencies for its own payment gateway, there may be issues; but it seems like an unlikely way to implement it.

    Thread Starter cbwebmaster

    (@cbwebmaster)

    Hello,

    I seem to have had success in implementing this. Please see https://circusbazaar.com/

    I did not need to implement any code or anthing. I think this works so long as the site is set to NOK.

    May you please have a look and let me know if everything seems ok.

    This is a good case study for you!

    Regards

    CB

    Plugin Author Iver Odin Kvello

    (@iverok)

    Good to hear!

    Yes, I suspected it *should* work in this context, since the “is_available” method isn’t actually called before Checkout is loaded – and at that point the currency ought to be NOK if so chosen. I’d probably do a couple of test purchases just to be sure, but it looks good on the surface.

Viewing 5 replies - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.