hello,
is there a function snippet where i can store or submit the ip adress,
but only the 6 first digits of the ip address for privacy reasons?
thanks
oli
hello,
is there a function snippet where i can store or submit the ip adress,
but only the 6 first digits of the ip address for privacy reasons?
thanks
oli
You can use the following filter to change the value stored in the entry ip property:
thank you very much, richard!!! this helped a lot.
for other user who might searched for the final solution:
// shows only the first 6 characters of the ip address
add_filter( 'gform_ip_address', 'ip_excerpt' );
function ip_excerpt( $ip ) {
$ip = substr($ip, 0, 6);
return $ip;
}