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