Currency change with language TranslatePress
-
Hello All,
I am using TranslatePress on this website https://wakahasegawa.com, with WOOCS plugin and PHP script in functions.php for automatic change of currency with language change, English->GB, Japanese-> JP.
Same issue as – https://wordpress.org/support/topic/currency-change-with-language-translatepress/
I used what was in that thread but still can’t get it to work?
`$lang=get_locale();
if(class_exists(‘WOOCS’)){
switch($lang){
case ‘en_GB’:
$WOOCS->current_currency=’GBP’;
$WOOCS->storage->set_val(‘woocs_current_currency’, ‘GBP’);
break;
case ‘jp’:
$WOOCS->current_currency=’YEN’;
$WOOCS->storage->set_val(‘woocs_current_currency’, ‘YEN’);
break;
default:
$WOOCS->current_currency=’GBP’;
$WOOCS->storage->set_val(‘woocs_current_currency’, ‘GBP’);
break;
}
}In TranslatePress
Default: English (UK)
en_GB / eng
Japanese
ja / jpThe page I need help with: [log in to see the link]
- The topic ‘Currency change with language TranslatePress’ is closed to new replies.