Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check 'order.active' instead of hardcoded Order states #1104

Closed
heiko-r opened this issue Sep 21, 2021 · 0 comments
Closed

Check 'order.active' instead of hardcoded Order states #1104

heiko-r opened this issue Sep 21, 2021 · 0 comments

Comments

@heiko-r
Copy link
Contributor

heiko-r commented Sep 21, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant