Model
CancelOrder
Magento\OrderCancellation\Model\CancelOrder
What it does
This class handles the complete order cancellation process in Magento 2, including processing refunds for both online and offline payments, updating order status, and sending cancellation notification emails.
Developers would use this when implementing custom order cancellation workflows that need to properly handle payment refunds and maintain order history with cancellation reasons.
Public Methods
- execute()
- updateOrderComments()