- Integrate maxmind_geolocation in woocommerce
![](https://toihid.com/wp-content/uploads/2022/09/img-95-4-1-1024x358.png)
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
![](https://toihid.com/wp-content/uploads/2022/09/img-95-4-1024x629.png)
4. For checking, add this code into header.php
$pd = WC_Geolocation::geolocate_ip(); print_r($pd);