Log in
Factory

ShipmentFactory

Magento\Sales\Model\Order\ShipmentFactory

What it does

This factory class creates Shipment objects for Magento orders.

Developers use it to programmatically generate shipments with specific items and tracking information, handling complex scenarios like bundle products, virtual items, and partial shipments.

It's the primary way to create shipments in custom code when fulfilling orders.

Public Methods

  • create()