How can i call Product Qty instead Salable Qty in

            if($product->getTypeId() == 'simple') {
                $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
                $StockState = $objectManager->create('Magento\InventorySalesAdminUi\Model\GetSalableQuantityDataBySku');
                $qty = $StockState->execute($product->getSku());
                $product->setData('salable_qty', $qty[0]['qty']);

i have deactivate Salable Qty in the trying to decrease product qty when the order is placed and not when it is shipped


Try just


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.