I can’t get meta_queries working correctly on get_users(). For the life of me can’t figure out what I’m doing wrong.
$args = array(
'meta_query' =>
array(
'relation' => 'AND',
array(
'key' => 'minbeds',
'value' => $rooms,
'compare' => "<=",
'type' => 'numeric'
),
array(
'key' => 'maxbeds',
'value' => $rooms,
'compare' => "=>",
'type' => 'numeric'
)
array(
'key' => 'minprice',
'value' => $price,
'compare' => "<=",
'type' => 'numeric'
),
array(
'key' => 'maxprice',
'value' => $price,
'compare' => "=>",
'type' => 'numeric'
)
)
);
$users = get_users( $args );
meta_query
parameter is an array of arrays,