Improve Stock Management on Cancelled Orders #3963
Unanswered
wmdhosting
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Currently, in Craft Commerce 5, stock is deducted immediately once an order is completed (regardless of payment status), and not restored if the order is later cancelled, deleted, or remains unpaid.
This can cause:
Stock to be held indefinitely for unpaid orders
Suggested Enhancement
Introduce an option to automatically restore stock when an order reaches a specified status, such as cancelled, expired, or refunded.
This could be configured via:
Order Status settings (toggle: "Restore stock on transition to this status")
Or globally in Commerce settings
Benefits
Cleaner inventory management
Safer handling of manual payment methods (e.g. cash, bank transfer)
Reduces need for custom modules or event listeners
Matches behavior of many other e-commerce systems
Example Use Case
A customer places an order with a manual gateway (Cash on Delivery). The stock is deducted immediately.
A few days later, the store admin cancels the order because the customer never paid.
Expected: Stock should automatically be restored.
Current behavior: Admin has to manually update the product stock.
Optional Enhancements
Support reverting stock on order deletion too
Beta Was this translation helpful? Give feedback.
All reactions