Merge pull request #31394 from tc33/fix/31393-geolocating-country-codes

Fix #31393 to use country from headers only if geolocating current user
This commit is contained in:
Barry Hughes 2021-12-15 09:52:55 -08:00 committed by GitHub
commit b3a54801a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -149,11 +149,10 @@ class WC_Geolocation {
}
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.
*