Use empty check for search

This commit is contained in:
Mike Jolley 2018-02-14 18:08:43 +00:00
parent 1b03a80ecb
commit 654e7db840
1 changed files with 1 additions and 1 deletions

View File

@ -457,7 +457,7 @@ class WC_Admin_List_Table_Products extends WC_Admin_List_Table {
}
// Search using CRUD.
if ( isset( $query_vars['s'] ) ) {
if ( ! empty( $query_vars['s'] ) ) {
$data_store = WC_Data_Store::load( 'product' );
$ids = $data_store->search_products( wc_clean( $query_vars['s'] ), '', true, true );
$query_vars['post__in'] = array_merge( $ids, array( 0 ) );