WC_Geo_IP::geoip_country_id_by_addr()publicWC 1.0

Country ID by addr.

Метод класса: WC_Geo_IP{}

Хуков нет.

Возвращает

int.

Использование

$WC_Geo_IP = new WC_Geo_IP();
$WC_Geo_IP->geoip_country_id_by_addr( $addr );
$addr(строка) (обязательный)
-

Код WC_Geo_IP::geoip_country_id_by_addr() WC 8.7.0

public function geoip_country_id_by_addr( $addr ) {
	$ipnum = ip2long( $addr );
	return $this->_geoip_seek_country( $ipnum ) - self::GEOIP_COUNTRY_BEGIN;
}