commit
4954c17e89
|
@ -1572,10 +1572,15 @@ class WC_AJAX {
|
|||
$data_store = WC_Data_Store::load( 'product' );
|
||||
$ids = $data_store->search_products( $term, '', (bool) $include_variations, false, $limit, $include_ids, $exclude_ids );
|
||||
|
||||
$product_objects = array_filter( array_map( 'wc_get_product', $ids ), 'wc_products_array_filter_readable' );
|
||||
$products = array();
|
||||
$products = array();
|
||||
|
||||
foreach ( $ids as $id ) {
|
||||
$product_object = wc_get_product( $id );
|
||||
|
||||
if ( ! wc_products_array_filter_readable( $product_object ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
foreach ( $product_objects as $product_object ) {
|
||||
$formatted_name = $product_object->get_formatted_name();
|
||||
$managing_stock = $product_object->managing_stock();
|
||||
|
||||
|
|
Loading…
Reference in New Issue