Log in
Model

StateResolver

Magento\Sales\Model\Order\StateResolver

What it does

This class determines the appropriate state for an order based on its current conditions and workflow stage.

Developers use it to automatically calculate whether an order should be in states like 'complete', 'closed', 'processing', or 'new' based on factors like invoicing, shipping, refunds, and creditmemo availability.

It's primarily used during order operations to ensure orders transition to correct states.

Public Methods

  • getStateForOrder()