Force currency at a user level
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 pleaseIf 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.
Quote from alexbanks29 on May 25, 2021, 15:50Hello, we are forcing all users to checkout in the welcome currency (GBP) but still allow customers to browse in their local currency. We now need to allow a specific user to checkout in EUR and bypass the welcome currency. How can we achieve this ? I was looking at some of the code snippets on your support site but couldn’t find one relevant I don’t think. Thanks!
Hello, we are forcing all users to checkout in the welcome currency (GBP) but still allow customers to browse in their local currency. We now need to allow a specific user to checkout in EUR and bypass the welcome currency. How can we achieve this ? I was looking at some of the code snippets on your support site but couldn’t find one relevant I don’t think. Thanks!
Quote from Pablo Borysenco on May 26, 2021, 09:57Hello
how do you want to define this user
The custom code depends on it.
for example if you know the user ID:
add_filter('wp_head',function(){
if(is_checkout()){if (class_exists('WOOCS')) {
global $WOOCS;if(get_current_user_id() == 22 && ($WOOCS->current_currency == 'USD' || $WOOCS->current_currency == 'EUR') ){
return;
}
$WOOCS->set_currency('EUR');
}
}
});
Hello
how do you want to define this user
The custom code depends on it.
for example if you know the user ID:
add_filter('wp_head',function(){
if(is_checkout()){
if (class_exists('WOOCS')) {
global $WOOCS;
if(get_current_user_id() == 22 && ($WOOCS->current_currency == 'USD' || $WOOCS->current_currency == 'EUR') ){
return;
}
$WOOCS->set_currency('EUR');
}
}
});
Quote from alexbanks29 on May 26, 2021, 11:01Hello, thank you so much for this!
Do you know if this code will still bypass the checkout welcome currency thats being forced on all users ?
I have added to my basket and can see its in GBP when logged in as the set user using the user ID.
I expanded on the code you provided to include GBP, assuming this is correct ?
add_filter('wp_head',function(){
if(is_checkout()){if (class_exists('WOOCS')) {
global $WOOCS;if(get_current_user_id() == 66 && ($WOOCS->current_currency == 'GBP' || $WOOCS->current_currency == 'EUR' || $WOOCS->current_currency == 'USD') ){
return;
}
$WOOCS->set_currency('EUR');
}
}
});
Hello, thank you so much for this!
Do you know if this code will still bypass the checkout welcome currency thats being forced on all users ?
I have added to my basket and can see its in GBP when logged in as the set user using the user ID.
I expanded on the code you provided to include GBP, assuming this is correct ?
add_filter('wp_head',function(){
if(is_checkout()){
if (class_exists('WOOCS')) {
global $WOOCS;
if(get_current_user_id() == 66 && ($WOOCS->current_currency == 'GBP' || $WOOCS->current_currency == 'EUR' || $WOOCS->current_currency == 'USD') ){
return;
}
$WOOCS->set_currency('EUR');
}
}
});
Quote from alexbanks29 on May 26, 2021, 11:50Hello, I have tested the above and it still forces GBP at checkout and the order screen shows as GBP too.
Hello, I have tested the above and it still forces GBP at checkout and the order screen shows as GBP too.
Quote from Pablo Borysenco on May 27, 2021, 10:30Hello
we are forcing all users to checkout in the welcome currency (GBP) - What are you using for this behavior?
Hello
we are forcing all users to checkout in the welcome currency (GBP) - What are you using for this behavior?
Quote from alexbanks29 on May 27, 2021, 10:36Hello, your plugin does this by default ? The "Allow Multiple" is not enabled so the welcome currency is used at checkout, regardless of what currency they were browsing in ?
Hello, your plugin does this by default ? The"Allow Multiple" is not enabled so the welcome currency is used at checkout, regardless of what currency they were browsing in ?
Quote from Pablo Borysenco on May 27, 2021, 11:41Hello
Ok! Please enable "Allow Multiple"
And add this code:
add_filter('wp_head',function(){
if(is_checkout()){if (class_exists('WOOCS')) {
global $WOOCS;if(get_current_user_id() == 22 && ($WOOCS->current_currency == 'GBP' || $WOOCS->current_currency == 'EUR') ){
return;
}
$WOOCS->set_currency('GBP');
}
}
});
Hello
Ok! Please enable "Allow Multiple"
And add this code:
add_filter('wp_head',function(){
if(is_checkout()){
if (class_exists('WOOCS')) {
global $WOOCS;
if(get_current_user_id() == 22 && ($WOOCS->current_currency == 'GBP' || $WOOCS->current_currency == 'EUR') ){
return;
}
$WOOCS->set_currency('GBP');
}
}
});
Quote from alexbanks29 on May 27, 2021, 18:05Hello, If I enable "Allow Multiple" then all my customers will then be able to checkout in whatever currency they select ?
I only need ONE customer to be able to checkout in a set currency that we give.
Hello, If I enable"Allow Multiple" then all my customers will then be able to checkout in whatever currency they select ?
I only need ONE customer to be able to checkout in a set currency that we give.
Quote from Pablo Borysenco on May 28, 2021, 11:20Hello
Ok! Great! This code makes it switch the currency to GBP for all users, except for one
If you have more than two currencies:
add_filter('wp_head',function(){
if(is_checkout()){if (class_exists('WOOCS')) {
global $WOOCS;if(get_current_user_id() == 22){
return;
}
$WOOCS->set_currency('GBP');
}
}
});
Hello
Ok! Great! This code makes it switch the currency to GBP for all users, except for one
If you have more than two currencies:
add_filter('wp_head',function(){
if(is_checkout()){
if (class_exists('WOOCS')) {
global $WOOCS;
if(get_current_user_id() == 22){
return;
}
$WOOCS->set_currency('GBP');
}
}
});
Quote from alexbanks29 on May 28, 2021, 12:35Hello, I have tested this code and it does not work.
I have added it via the "Snippets" plugin and when logged in as this user the checkout is still forced to GBP.
If I try to change the currency via the switcher it just reverts to GBP.
Hello, I have tested this code and it does not work.
I have added it via the"Snippets" plugin and when logged in as this user the checkout is still forced to GBP.
If I try to change the currency via the switcher it just reverts to GBP.
Quote from Pablo Borysenco on May 31, 2021, 10:00Hello
So you did something wrong
this code only works on the checkout page
Drop me exact link to the issue and wp-admin access - https://c2n.me/43SC6rb.png ->https://c2n.me/42BAoj4.png
Hello
So you did something wrong
this code only works on the checkout page
Drop me exact link to the issue and wp-admin access - https://c2n.me/43SC6rb.png ->https://c2n.me/42BAoj4.png