Extend order status
In previous Commerce Connect versions, OrderStatus and OrderShipmentStatus were enums, so they could not be extended. A breaking change in Optimizely Commerce Connect 13 converted OrderStatus and OrderShipmentStatus from enums to classes. As a result, you can no longer apply bitwise operations to instances of OrderStatus and OrderShipmentStatus.
To register 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 blog post: New feature in Commerce Connect 13: Extendable OrderStatus and OrderShipmentStatus
Updated 2 months ago