Mika MAtikainen

Apr 15, 2020 · 4 min read

How to Display IP Address of Users During Registration in UsersWP?

function wpsc_uwp_show_ip_column( $column ) {
$column['user_ip'] = __('IP Address', 'userswp');
	return $column;
}
add_filter( 'manage_users_columns', 'wpsc_uwp_show_ip_column' );

function wpsc_uwp_show_ip_column_value( $val, $column_name, $user_id ) {
	switch ($column_name) {
		case 'user_ip' :
		return uwp_get_usermeta($user_id, 'user_ip', 'N/A');
		default:
	}
	return $val;
}

add_filter( 'manage_users_custom_column', 'wpsc_uwp_show_ip_column_value', 10, 3 );
 

Subscribe To Our Newsletter

Join our mailing list to receive the latest news and updates from our team.

You have Successfully Subscribed!

Share This