I'm importing products and I want to get product by its sku. This is the code:
$product = $this->productFactory->create(); $record = $product->loadByAttribute('sku', '1234');
It works but only with products that have quantity > 0 and product is enabled. How can I find product even if quantity == 0 or status is disabled?