Hi Oscargare
Thank you so much. Works perfectly now!
I’ll give your plugin 5 stars.
Hi oscargare
I wish to show DKK when danish is selected as language and EUR for english (all other countries than Denmark). I tried adding the code
function qtranx_setCountry(){
$lang = qtranxf_getLanguage();
if ( $lang == 'en'){
WC()->customer->set_country('US');
} else{
WC()->customer->set_country('DA');
}
}
add_action( 'woocommerce_init', 'qtranx_setCountry' );
However, nothing happens on http://helgstranddenmark.com/da/shop/ when changing language and wp-admin shows the following error:
“Fatal Error: Call to a member function set country() on a non-object in /home/helgstr1/public_html/wp-content/themes/gt3-wp-frame/functions.php on line 933”
I also tried putting “da” first, but that didn’t work either.
Can you help?
So simple and worked like a charm.
Thank you so much JovanaV!
-
This reply was modified 9 years, 4 months ago by cheering22.