PluginUs.Net - Business Tools for WooCommerce and WordPress

[realize your idea - make your dreams come true]

Support Forum

You need to log-in to create request (topic) to the support

Supporting AfterPay

The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday. If you have problems with registration ask help on contact us page please
If you not got email within 24~36 business hours, firstly check your spam box, and if no any email from the support there - back to the forum and read answer here. DO NOT ANSWER ON EMAILS [noreply@pluginus.net] FROM THE FORUM!! Emails are just for your info, all answers should be published only here.
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday.

Hi there,

WOOCS is amazing. Using it for years! Awesome. I am trying to install a new payment gateway, AfterPay and they seem to only show if I use the 'default' currency, however I would prefer the gateway show for several currencies, GBP, NZ and AU dollars and especially USD. Of course I will contact them as well, but I was wondering if you know a way I can 'trick' the gateway into thinking the selected currency is the shop default?

Cheers,

Phil

 

PRIVATE DATA!!!

Hello Phil

 if you know a way I can 'trick' the gateway - If the third-party payment system does not support multicurrency, we cannot change this. Because this plugin cannot affect banking transactions

Thanks Pablo.

I have figured out that if I switch my basic currency to USD I can use this gateway. But I've been searching around for a way to switch my basic currency without messing up my prices. Basically, I would like for the basic currency prices to be nice round numbers :).

For example, my basic currency is currently CAD and my CAD prices are all pretty, round numbers. When I switch the basic currency to USD none of the prices are nice round numbers anymore. I think that much is expected. But then, I would like to reimport my USD prices (presumably through the Woocommerce product import interface I guess) to be round numbers and then have my CAD prices reflect the exchange rate programmed in WOOCS. Is there a particular way to do this so that it works?

Cheers,

Phil

Hello Phil

When I switch the basic currency to USD none of the prices are nice round numbers anymore - read  this  please - https://currency-switcher.com/hook/woocs_raw_woocommerce_price/  AND  https://currency-switcher.com/hook/woocs_woocommerce_variation_prices/

AfterPay - what currencies does this payment system support?

 

Hi Pablo,

I think I got it working. I managed to switch my production system to USD basic and import round prices for those basic prices. I then applied a code snippet similar to what you referred me to to round my CAD prices which are now floating with the USDCAD exchange rate. I noticed that yours is slightly different. Please let me know if there is an issue with my implementation.

#if you find missing spaces, for some reason when I copied here they were stripped. The code is working in my PROD env now. You can check that website here.
# You will need to full screen your browser to see the currency switcher.
add_filter('woocs_raw_woocommerce_price', function($price) {
global $WOOCS; #is this required I noticed it's not in the snippet you pointed to
if ($WOOCS->current_currency == 'CAD' ) {
return ceil($price); # also, I'm not doing the extra math here. I think this is personal choice on how I want rounding implements, or did I miss something?
} else {
return $price;
}
});
add_filter('woocs_woocommerce_variation_prices', function($price) {
global $WOOCS;
if ($WOOCS->current_currency == 'CAD') {
return ceil($price);
} else {
return $price;
}
});

Hello

the code looks good. I guess this shouldn't be a problem.