Use empty check for search
This commit is contained in:
parent
1b03a80ecb
commit
654e7db840
|
@ -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 ) );
|
||||
|
|
Loading…
Reference in New Issue