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

TranslatePress + Fox + LiteSpeed

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.

Hello mate, I tried to doing my research on previous post about this but couldn't find the solution. When using the code I get an fatal error on the website.

Can you please help me with make it working, when the website switch from language, the selected currency via GEOIP should be activated.

Hello

GEOIP this only works for the user's first visit

Hello Pablo. Thank you very much for your time and support.

Understood.

Is it possible to make the following option worked?

Selecting country UK > switch to GBP

Selecting US > switch to USD

Selecting EU country > switch to EU and set by default

etc.

I think it's possible. In this case, you need code customization.

From my side, I can tell you how to switch the currency in PHP - https://currency-switcher.com/function/woocs-set_currency

The other code will depend on your country selector.

 

Hello Pablo, this seems to work.

How can I set for US > USD, UK > GPB?

Hello

ok! how do you get this data"UK""US"?

An  example:

$country_code = // your function to  get   country code

$global $WOOCS;

switch($country_code){

case"UK" :

$WOOCS->set_currency('GBP');

break;

case"US" :

$WOOCS->set_currency('USD');

break;

}

Hello Pablo, thank you for the code.

Why I enter this code in functions.php we get a fatal error. The translation plugin that we are using is done via TranslatePress.

The default website language is set on English, country Spain.

This part I don't understand:

"$country_code = // your function to get country code"

What should I enter here?

Hello

If you don't have any programming experience - You should hire a developer to customize your code.

What should I enter here?  - I gave all the code from my side. How you will determine this data (country code) I do not know - https://share.pluginus.net/image/i20240808110227.png