<p>Definitely deliberate.  Inventory reduction when an order is placed is a "convenience" thing.</p>

<p>There are a million reasons why an order might be deleted and only a handful of them would have anything to do with inventory.</p>

<p>But as <a href="https://craftcms.stackexchange.com/questions/18475/craft-commerce-stock-not-updated-when-order-deleted#comment25148_18475">André points</a> out... you could write a simple plugin to have whatever behavior you wanted around this.</p>

CC BY-SA 3.0
2017-01-12T08:26:25.807Z
Ok, thanks for the clarification. But, surely, when an order is deleted that stock generally goes back into circulation? Then again, I can think of a few examples where it wouldn't.
Clive Portman
CC BY-SA 3.0
2017-01-11T23:29:55.477Z
2017-01-11T23:29:55.477Z
Brad Bell
<p>Is this deliberate, or a bug? Delete an order and the products within the order don't have their stock updated again.</p>

<p>I'm only running Craft Commerce 1.2.1327 but I don't see any mention of it in the update notes to the current version so I'm not sure updating is the answer. I'm also cautious about updating at the moment in case it breaks my third-party payment gateway plugin.</p>

CC BY-SA 3.0
2017-01-11T16:44:38.500Z
AFAIK, Commerce has never updated stock levels when orders are deleted.
André Elvan
CC BY-SA 3.0
2017-01-11T16:49:26.350Z
But it should do, right?
Clive Portman
CC BY-SA 3.0
2017-01-11T19:40:18.903Z
Noo, I don't think so. Or, you could debate that in real life you'd most often increase the stock level if you delete an order, and therefore it should. But I think it's intentional from P&T's end that it doesn't. But, I might be wrong, hence just adding a comment. I'll let someone who knows for sure provide the answer.
André Elvan
CC BY-SA 3.0
2017-01-11T19:41:00.130Z
Would be a pretty simple plugin to write though.. :)
André Elvan
<plugin-craftcommerce>
Craft Commerce stock not updated when order deleted
# Craft Commerce stock not updated when order deleted

(Asked by: username_0 on 2017-01-11)

Is this deliberate, or a bug? Delete an order and the products within the order don't have their stock updated again.

I'm only running Craft Commerce 1.2.1327 but I don't see any mention of it in the update notes to the current version so I'm not sure updating is the answer. I'm also cautious about updating at the moment in case it breaks my third-party payment gateway plugin.

**Tags:** plugin-craftcommerce
> **Comments:**
> **username_1**: AFAIK, Commerce has never updated stock levels when orders are deleted.  
> **username_0**: But it should do, right?  
> **username_1**: Noo, I don't think so. Or, you could debate that in real life you'd most often increase the stock level if you delete an order, and therefore it should. But I think it's intentional from P&T's end that it doesn't. But, I might be wrong, hence just adding a comment. I'll let someone who knows for sure provide the answer.  
> **username_1**: Would be a pretty simple plugin to write though.. :)  

---

## 1 answers

### Answer by username_2 on 2017-01-11. Score: 0 | Accepted answer

Definitely deliberate. Inventory reduction when an order is placed is a "convenience" thing.

There are a million reasons why an order might be deleted and only a handful of them would have anything to do with inventory.

But as [André points](https://craftcms.stackexchange.com/questions/18475/craft-commerce-stock-not-updated-when-order-deleted#comment25148_18475) out... you could write a simple plugin to have whatever behavior you wanted around this.

> **Comments:**
> **username_0**: Ok, thanks for the clarification. But, surely, when an order is deleted that stock generally goes back into circulation? Then again, I can think of a few examples where it wouldn't.  

---

