4

I was using StockStateInterface to get stock qty, it was working fine in development and staging server but was not working in production server.

Then I used StockRegistryInterface to get the result and it worked on the production server.

Why it happened so?

I used this:

\Magento\CatalogInventory\Api\StockStateInterface $stockState, 
\Magento\CatalogInventory\Api\StockRegistryInterface $stockRegistry,

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.