Log in
Model

CustomerCanCancel

Magento\OrderCancellation\Model\CustomerCanCancel

What it does

This model determines whether a customer is allowed to cancel an order based on its current state.

Developers use this class to validate order cancellation requests before allowing customers to proceed with cancellation actions, ensuring orders in final states like complete, closed, canceled, or on-hold cannot be cancelled.

Public Methods

  • execute()