Is there any plugin available for automatic detect customer current Geo location in Magento2.3.2 ?
1 Answer
you can install https://www.mageplaza.com/magento-2-geoip/ extension, also you have to add MaxMind GeoIP2 PHP API https://packagist.org/packages/geoip2/geoip2
Then use below code to get customer country in index.php
$obj = $bootstrap->getObjectManager();
$helper = $obj->get('Mageplaza\GeoIP\Helper\Address');
$country_code = $helper->getGeoIpData();