Hi! I got it! I changed this line of code and BRL stays as default.:
$client = WC_Geolocation::get_external_ip_address();
$result = array( ‘currency’ => ” );
$currencies = Claue_Addons_Currency::getCurrencies();
$default = Claue_Addons_Currency::woo_currency();
$ip_data = @json_decode(file_get_contents( ‘http://www.geoplugin.net/json.gp?ip=’ . $client ) );
if ( $ip_data && $ip_data->geoplugin_currencyCode != null ) {
$result[‘currency’] = $ip_data->geoplugin_currencyCode;
if ( isset( $currencies[$result[‘<strong style=”color: red;”>current‘]] ) ) {
$default = $result;
}
}
But there is a problem, even without doing this when I change currency the price does not change automatically, I have to choose another page / product to see the price in the chosen currency.
I changed ‘<strong style=”color: orange;”>currency‘ for ‘<strong style=”color: red;”>current‘ and it worked
Do you have any lines of code for this?
and one more thing, where do I put this changed code in the me child theme? in functions.php or do I copy the path of the original file?