Stock does not reduce on cloned orders
-
When an order is cloned, it appears to also copy the original order’s status of having already reduced stock. Here are some simple steps to reproduce the issue:
1. Create a backend order (“Add Order” from WooCommerce admin interface).
2. Add a product that has been configured to manage stock.
3. Change order status to complete and save the order.Observe: WooCommerce has left a note in the “Order Notes” that confirms that the stock for the item has been reduced.
4. Duplicate the order
5. Change order status to complete and save the order.Observe: There is no note in the “Order Notes” about reducing stock. Further investigation into the product itself confirms that the stock has not been reduced for this duplicate order.
I have not tested thoroughly, but maybe the meta “_order_stock_reduced” (in wp_postmeta) should be excluded from the duplication. You should also probably exclude “_recorded_sales” and “_recorded_coupon_usage_counts”.
I am grateful for this plugin, and I thank you for looking into this.
- The topic ‘Stock does not reduce on cloned orders’ is closed to new replies.