• Resolved david6

    (@david6)


    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 / jp

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Currency change with language TranslatePress’ is closed to new replies.