Log in
Factory

InvoiceDocumentFactory

Magento\Sales\Model\Order\InvoiceDocumentFactory

What it does

This factory class creates invoice documents for Magento 2 orders.

Developers use it when they need to programmatically generate invoices with specific items, quantities, and optional comments.

It's primarily used by the order management system and invoice-related API operations to prepare invoice objects before they are saved or processed.

Public Methods

  • create()