Hi. The plugin sets the user location correctly, but I get the following error:
NOTICE: wp-content/plugins/geoip-detect/geoip-detect-lib.php:162 - Undefined index: mostSpecificSubdivision
require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/timely-timber/page.php'), Timber::get_context, apply_filters('timber_context'), call_user_func_array, StarterSite->add_to_context, geoip_detect2_get_info_from_current_ip, geoip_detect2_get_info_from_ip, _geoip_detect2_record_enrich_data, apply_filters('geoip_detect2_record_data'), call_user_func_array, _geoip_detect2_try_to_fix_timezone
// Check if the GEOIP plugin has generated a country code and use that, or fall back to the US
if (!geoip_detect2_get_info_from_current_ip()->isEmpty) {
$info = geoip_detect2_get_info_from_current_ip();
$context['geoworking'] = 'yes';
// Get the users country from the GEOIP plugin
$context['usercountry'] = $info->country->isoCode;
} else {
$context['geoworking'] = 'no';
$context['usercountry'] = 'US';
};
As a temporary fix I have removed the reference to mostSpecificSubdivision from line 161 of geoip-detect-lib.php
$data['location'] = _geoip_detect_get_time_zone($data['country']['iso_code'], @$data['mostSpecificSubdivision']['isoCode']);
But it would be great to know where I'm going wrong. Thanks, Alan