Log in
Interface

OrderStateResolverInterface

Magento\Sales\Model\Order\OrderStateResolverInterface

What it does

This interface defines a contract for determining the appropriate state of an order in Magento 2 based on the order's current conditions and optional arguments.

Developers use this when they need to programmatically resolve what state an order should be in (e.g., processing, complete, closed) during various order lifecycle events like invoicing, shipping, or credit memo creation.

It's particularly useful when customizing order state transitions or creating extensions that modify order workflows.

Public Methods

  • getStateForOrder()