get_users is expecting unserialized meta_value
In your original code, you’re not passing an operator to meta_compare. Note that get_users() does not define a default operator. Try using ‘=’: $args = array( ‘meta_key’ => ‘custom-usermeta’, ‘meta_value’ => $cat_id, ‘meta_compare’ => ‘=’ ); $users = get_users( $args ); As a diagnostic, you might make sure that the problem isn’t the saving/querying by … Read more