StatusResolver
Magento\Sales\Model\Order\StatusResolver
What it does
This class determines the appropriate status for an order based on its state and payment method configuration.
Developers use it when they need to resolve which specific status should be assigned to an order, prioritizing the payment method's configured status if valid for the given state, otherwise falling back to the state's default status.
It's particularly useful during order creation or state transitions to ensure consistent status assignment.
Public Methods
- getOrderStatusByState()