From 439141bbe30a9d4344b14bd9223e7018f7b435a3 Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Tue, 3 Nov 2015 13:55:26 -0200 Subject: [PATCH] Fixed undefined error on WC_Geo_IP --- includes/class-wc-geo-ip.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/class-wc-geo-ip.php b/includes/class-wc-geo-ip.php index ea83351c751..455604fa7c0 100644 --- a/includes/class-wc-geo-ip.php +++ b/includes/class-wc-geo-ip.php @@ -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 ]; } }