If-So utilizes an IP-to-location database to determine the user’s location. You can use the geo data detected by If-So for any purpose by implementing the following code:
require_once(IFSO_PLUGIN_BASE_DIR. 'services/geolocation-service/geolocation-service.class.php');
$geo_data = \IfSo\Services\GeolocationService\GeolocationService::get_instance()->get_user_location();
Keep in mind that IP-to-location services (any service, not just ours) are not always 100% accurate. Learn more about IP-to-location services and how they work.
Want to capture the user’s location using JavaScript? Click here