Log in
Model

ShippingAssignment

Magento\Sales\Model\Order\ShippingAssignment

What it does

This class represents a shipping assignment in Magento 2, which groups order items together with their associated shipping information and stock source.

Developers use this when processing multi-source inventory shipments or when they need to manage which items are being shipped together from which warehouse location.

It's particularly important for split shipments and multi-warehouse scenarios where different order items ship from different locations.

Public Methods

  • getShipping()
  • getItems()
  • getStockId()
  • setShipping()
  • setItems()
  • setStockId()
  • getExtensionAttributes()
  • setExtensionAttributes()