Area: Optimizely Commerce
Applies to versions: 13 and higher

Extending order status

Recommended reading 

In previous Commerce versions, OrderStatus and OrderShipmentStatus were enums, so could not be extended. In Commerce 13, a breaking change converted OrderStatus and OrderShipmentStatus from enums to classes. As a result, you can no longer apply bitwise operations to instances of OrderStatus and OrderShipmentStatus.

Registering a new OrderStatus

OrderStatus.RegisterStatus(new OrderStatus(128, "WaitingForFeedback"));

To get all registered OrderStatuses, including built-in ones, use this code.

var statuses = OrderStatus.RegisteredStatuses;

Related topics

Do you find this information helpful? Please log in to provide feedback.

Last updated: Mar 29, 2019

Recommended reading