Hello,
ist there a way to query for products which are in stock in at least one inventory?
So for instance:
I have 2 products in my shop with three inventories each:
- Product A | Inventory 1: out of stock | Inventory 2: out of stock | Inventory 3: out of stock
- Product B | Inventory 1: out of stock | Inventory 2: in stock| Inventory 3: instock
Code example:
$meta = array(
'key' => '_atum_stock_status',
'value' => 'instock',
'compare' => '='
);
Would show me product B but not product A, whatever inventory is selected in the background.
$meta = array(
'key' => '_atum_stock_status',
'value' => 'outofstock',
'compare' => '='
);
Would show me product A but not product B, whatever inventory is selected in the background.
Or is there a function like $product->is_in_stock() which is independent of the current selected inventory?
Best regards,
Sebastian