PluginUs.Net - Business Tools for WooCommerce and WordPress

[realize your idea - make your dreams come true]

Support Forum

You need to log-in to create request (topic) to the support

Issue with LiteSpeed Cache

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 please
If 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.
12

hi Pablo again!

I've solved it! =)

I've used Woocommerce geoip functions instead Woocs to assgign my currency params. I copy the code below in case it helps someone:

// Agergar parámetro currency en la página de Precios
//
function agregar_moneda_a_url() {
global $WOOCS;
$current_url ="http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
$parsed_url = parse_url($current_url);
if (isset($parsed_url['query']) && !empty($parsed_url['query'])) {
$params = [];
parse_str($parsed_url['query'], $params);
if (isset($params['currency'])) {
return; // El parámetro"currency" ya está presente en la URL, no se hace nada
}
}
if (is_page('precios')) {
$geoData   = WC_Geolocation::geolocate_ip();
  $country   = $geoData['country'];
switch ( $country ) {
  case"AR":
$moneda ="ARS";
break;
  default:
$moneda ="USD";
    }
$new_url = add_query_arg('currency', $moneda, $current_url);
wp_redirect($new_url);
exit;
}
}
add_action('template_redirect', 'agregar_moneda_a_url');
Thanks a lot! =)
Regards!

 

Hello

Great!

Welcome;)

12