Model

CatalogInventory

Magento\CatalogInventory\Model\Product\CopyConstructor\CatalogInventory

What it does

This class handles copying inventory/stock data when a product is duplicated in Magento 2.

It ensures the new duplicate product inherits appropriate inventory configuration settings from the original product, including quantity increments and stock configuration flags.

Developers typically don't interact with this class directly - it's automatically invoked by Magento's product duplication process.

Public Methods

  • build()