Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
GeoIP Debugger
<?php
/*
* Plugin Name: WP Engine GeoIP Debugger
* Version: 0.5
* Description: Debugging tool for WP Engine GeoIP
* Author: WP Engine
* Author URI: http://wpengine.com
*
* This will help confirm if GeoIP is returning the correct information. Check the error log after loading the front page of the site.
*/
function geoip_append_debug( $content ) {
$geoipdebugging = WPEngine\GeoIp::instance();
error_log(print_r($geoipdebugging, true));
return $content;
}
add_filter( 'the_content', 'geoip_append_debug' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment