Function to check country
-
Hi,
Is there any function that we can use in theme to check user’s country?
This is what i’m using right now
$country = getenv('HTTP_GEOIP_COUNTRY_CODE');
if ( $country == "CA" ) {
//do something
}
Is there a better way to do it? using any function e.g.
if(geo_country(array('Canada'))){
//do something
}
Please let me know,
Thanks
Waqas
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Function to check country’ is closed to new replies.