You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, OrderService.cancelOrderById() and OrderService.cancelOrderByOrderLines() check if (order.state === 'AddingItems' || order.state === 'ArrangingPayment') to determine whether the Order can be cancelled or not:
Due to this, OrderService.cancelOrder() cannot be used with a customised order process, such as when the order is set to active: false and stock allocated in ArrangingPayment state already.
Suggestion: Use order.active instead of comparing order.state to hardcorded states.
The text was updated successfully, but these errors were encountered:
Currently,
OrderService.cancelOrderById()
andOrderService.cancelOrderByOrderLines()
checkif (order.state === 'AddingItems' || order.state === 'ArrangingPayment')
to determine whether the Order can be cancelled or not:Due to this,
OrderService.cancelOrder()
cannot be used with a customised order process, such as when the order is set toactive: false
and stock allocated inArrangingPayment
state already.Suggestion: Use
order.active
instead of comparingorder.state
to hardcorded states.The text was updated successfully, but these errors were encountered: