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

CAN SHIPPING ADDRESS OVERRIDE GEOLOCATION / IP ADDRESS?

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.

Hi there.

I mistakingly send an email to your contact form first, apologies for that.

I need the customers shipping address to override the IP address / Geolocation. Is this possible?

Kind regards

Alex

 

 

Hello Alex

To  override  Geo you  can  use  this  hook -  woocommerce_geolocate_ip

And  read  this please - https://currency-switcher.com/possible-delivery-country-change-currency/

use  $data['billing_country']

Hello

I am struggling with this a bit.

When in check out, I want the billing address to override the IP/geo, and if "deliver to a different address" the shipping address to override the billing address.

But if the"deliver to a different address" has been filled in but is unchecked, it still sets the currency.

If unchecked it needs to revert back to Billing address currency.

Does this make sense?

 

I am a complete beginner, this is my first site so please could you give me exact code instructions to copy and paste..?

 

Currently, as per your instructions I have used this code in the child theme's function.php

 

add_action('woocommerce_checkout_update_order_review', function($data) {
global $WOOCS;

if (is_string($data)) {
parse_str($data, $data);
}
//***
$_currency = $WOOCS->get_currency_by_country($data['billing_country']);
if (!empty($_currency)) {
$WOOCS->set_currency($_currency);
}
}, 9999);

 

Thank you for your help!

Alex

 

Sorry

my code is currently ($data['shipping_country'])

 

Hello

Unfortunately we do not have a ready-made solution for you. In this case, you should hire a developer