Check if search param could be considered empty

This commit is contained in:
Oscar Sanchez S 2021-11-24 23:53:18 -06:00 committed by barryhughes
parent 89a44ab8c1
commit 806a25633c
1 changed files with 1 additions and 1 deletions

View File

@ -244,7 +244,7 @@ class WC_REST_Customers_V1_Controller extends WC_REST_Controller {
$prepared_args['orderby'] = $orderby_possibles[ $request['orderby'] ];
$prepared_args['search'] = $request['search'];
if ( '' !== $prepared_args['search'] ) {
if ( ! empty( $prepared_args['search'] ) ) {
$prepared_args['search'] = '*' . $prepared_args['search'] . '*';
}