When we set the search_columns to user_url in the WP_User_Query. The search result returns all the user whose website value is set.
Steps to Reproduce
- Create 3 users.
- Set the Website field of one user to
https://elasticpress.io and for other 2 users set field to https://example.com
- Run the below snippet
add_action( 'init', function() : void {
$user_query = new \WP_User_Query(
[
'ep_integrate' => true,
'search' => 'https://elasticpress.io',
'search_columns' => [ 'user_url' ],
]
);
var_dump( $user_query->results );
} );
Expected behavior
It should only returns the user who's website field is https://elasticpress.io