Model
InvoiceOrder
Magento\Sales\Model\InvoiceOrder
What it does
This class handles the creation of invoices for Magento 2 orders.
Developers use this when they need to programmatically invoice an order through code, such as in custom payment integrations, automated invoicing workflows, or admin actions.
It manages the complete invoice creation process including payment capture, order state updates, validation, and optional customer notifications.
Public Methods
- execute()