Log in
Model

InvoiceOrder

Magento\Sales\Model\InvoiceOrder

What it does

This class handles the creation of invoices for orders in Magento 2.

Developers use this class when they need to programmatically generate an invoice for an order, with options to capture payment, add comments, send notifications, and specify which items to invoice.

It validates the invoice, processes payment, updates order state, and optionally sends customer notifications.

Public Methods

  • execute()