Fixed undefined error on WC_Geo_IP

This commit is contained in:
Claudio Sanches 2015-11-03 13:55:26 -02:00
parent c6ab828aa1
commit 439141bbe3
1 changed files with 1 additions and 1 deletions

View File

@ -1625,7 +1625,7 @@ class WC_Geo_IP {
}
} else {
$country_id = $this->geoip_country_id_by_addr( $addr );
if ( $country_id !== false ) {
if ( $country_id !== false && isset( $this->GEOIP_COUNTRY_CODES[ $country_id ] ) ) {
return $this->GEOIP_COUNTRY_CODES[ $country_id ];
}
}