Log in
Model

Order

Magento\Sales\Model\Convert\Order

What it does

This converter class transforms Magento 2 order objects and order items into related sales documents (invoices, shipments, and credit memos) and their respective items.

Developers use this class when programmatically creating sales documents from orders, such as during automated fulfillment processes or custom admin workflows.

It handles the initial object creation and field mapping between orders and their derivative documents.

Public Methods

  • toInvoice()
  • itemToInvoiceItem()
  • toShipment()
  • itemToShipmentItem()
  • toCreditmemo()
  • itemToCreditmemoItem()