Fix #31393 to use country from headers only if geolocating current user

This commit is contained in:
Tom Castle 2021-12-08 12:53:20 +00:00
parent c5fccaf088
commit 23fe784e5a
1 changed files with 2 additions and 3 deletions

View File

@ -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.
* *