Fix #31393 to use country from headers only if geolocating current user
This commit is contained in:
parent
c5fccaf088
commit
23fe784e5a
|
@ -149,11 +149,10 @@ class WC_Geolocation {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( empty( $ip_address ) ) {
|
if ( empty( $ip_address ) ) {
|
||||||
$ip_address = self::get_ip_address();
|
$ip_address = self::get_ip_address();
|
||||||
|
$country_code = self::get_country_code_from_headers();
|
||||||
}
|
}
|
||||||
|
|
||||||
$country_code = self::get_country_code_from_headers();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get geolocation filter.
|
* Get geolocation filter.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue