1. Integrate maxmind_geolocation in woocommerce

2. Add this code to function.php of active theme folder

add_filter("woocs_geobone_ip",function(){
    return true;
});

if ( isset( $_SERVER['REMOTE_ADDR'] ) && ! empty( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) {
    $_SERVER['HTTP_X_FORWARDED_FOR'] = $_SERVER['REMOTE_ADDR'];
}

3. Disable option ‘Enable caching for logged-in WordPress users‘: from wp rocket

4. For checking, add this code into header.php

$pd = WC_Geolocation::geolocate_ip(); print_r($pd);

By toihid