Site icon Hip-Hop Website Design and Development

Echo the variety of customers utilizing WP_User_Query?

Okay, so proper now I can simply echo the variety of posts that has a particular meta_key and meta_value:

$question = new WP_Query( 
    array( 
        'meta_key' => 'usp-custom-1', 
        'meta_value' => get_permalink() 
    ) 
); 
echo $query->found_posts;

I am attempting to do one thing comparable aside from echoing the variety of customers that has a particular user_meta information.

I am attempting this:

$question = new WP_User_Query( 
    array(  
        'meta_key' => 'cash_out_status',  
        'meta_value' => 'pending' 
    ) 
); 
echo $query->found_users;

However the above would not show something.

I assume I am making a mistake someplace within the code.

Any assist can be drastically appreciated.

Thanks.