I want to use below code in Magento 2 constructor.
$stockItem = $objectManager->create('Magento\CatalogInventory\Model\Stock\Item');
Can any one tell me the right way of calling above
create class into constructor as a dependency class?
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.Sign up to join this community