function yoursite_manage_users_columns( $columns ) {
// $columns is a key/value array of column slugs and names
$columns[ 'custom_field' ] = 'Subscription';
return $columns;
}
add_filter( 'manage_users_columns', 'yoursite_manage_users_columns', 10, 1 );
function yoursite_manage_users_custom_column( $output, $column_key, $user_id ) {
switch ( $column_key ) {
case 'custom_field':
$value = get_user_meta( $user_id, 'custom_field', true );
return $value;
break;
default: break;
}
// if no column slug found, return default output value
return $output;
}
add_action( 'manage_users_custom_column', 'yoursite_manage_users_custom_column', 10, 3 );