Log in
Model

ReplaceSalesChannelsDataForStock

Magento\InventorySales\Model\ResourceModel\ReplaceSalesChannelsDataForStock

What it does

This class replaces all sales channel assignments for a given stock in the inventory system.

Developers use it when they need to update which sales channels (websites, store views) are linked to a specific inventory stock, removing old assignments and adding new ones in a single operation.

It's commonly used during stock configuration updates or programmatic sales channel management.

Public Methods

  • execute()