sprouter-nate
9/23/2019 - 3:13 PM

Flywheel & GravityForms : Use HTTP_X_FORWARDED_FOR to capture User's IP address

add_filter( 'gform_ip_address', 'filter_gform_ip_address' );
 
function filter_gform_ip_address( $ip ) {
    // Return the IP address set by the proxy.
    // E.g. $_SERVER['HTTP_X_FORWARDED_FOR'] or $_SERVER['HTTP_CLIENT_IP']
    return $_SERVER['HTTP_X_FORWARDED_FOR'];
}

//https://docs.gravityforms.com/gform_ip_address/