• Hi there, I reverted back to version 2.7 of this plugin on a few sites because the Maxmind Precision Web-API seems to have stopped working with version 2.8.

    I’m using version 2.8 with Maxmind GeoIP Lite City on a site and that’s working great. Any ideas? Thank you.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hm, interesting. I don’t see many changes on my part (except if your Licence key has a whitespace at the beginning or the end), so I have created a version of the 2.8.0-Plugin with the Maxmind libs that the 2.7.0 had … Can you try it out, please?

    https://github.com/yellowtree/wp-geoip-detect/archive/tryOldMaxmindLibs.zip

    Thread Starter kennycrippen

    (@kennycrippen)

    Thanks Benjamin, I’ll give it a shot!

    Thread Starter kennycrippen

    (@kennycrippen)

    Hi Benjamin, I just tried this out with no luck. Here’s the code I’m using in my template file:

    $allowed = array('US','GB','UK','DE');
    if(function_exists('geoip_detect2_get_info_from_current_ip')) {
    	$userInfo = geoip_detect2_get_info_from_current_ip();
    	if (!in_array($userInfo->country->isoCode, $allowed)) {
            // DO STUFF
            }
    }

    I am not able to reproduce, it is working with my credentials. Can you tell me the symptoms of “not working”, is there an error message? Is it working sometimes, sometimes not?

    • This reply was modified 8 years, 4 months ago by Benjamin Pick.
    Thread Starter kennycrippen

    (@kennycrippen)

    Sorry for the late reply Benjamin, I’m working on this in my down time at work and since 2.7 is working for us it’s not a super urgent issue. I’m not seeing any errors in the WP dashboard.

    I just did another test using version 2.8.2. Version 2.7 adds the correct country code CSS class to the body when I test with the Google Chrome Browsec add on with a location of Singapore. Version 2.8.2 leaves the CSS body class as geoip-country-US geoip-continent-NA when I run the same test.

    I also ran the Lookup test in the WP dashboard and that is returning the correct values when running 2.7 but not 2.8.2.

    Another difference between the two versions is that 2.7 returns my IP address as 50.196.24.70 (which is correct) but 2.8.2 returns my IP as 172.101.30.218 which is Augusta, Maine.

    Maybe the issue has to do with something in the geoip_detect2_get_info_from_current_ip() function?

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Maxmind Precision Web-API not working with 2.8’ is closed to new replies.