1) Product A has one variant and has 2 pcs in stock. Product settings are to unpublish the variant (so the article) when stock os 0 2) A customer made two orders, by mistake, so variant stock is 0, the Published flag is set to false and, in turn, the article Publish flag is set to false 3) I deleted the fake order, so Item A now is again in stock (1 pc) 4) Stock qty has been updated to 1 BUT neither variant Publish flag nor Article Publish flag have been restored to True. I believe this step has been forgotten while revising this feature.
That's not a bug. It's by design. You have to manually publish it again. Imagine the following scenario: 1. Some customer purchased a product A (order #1). The stock is not enough and the Published flag is set to false. 2. Now a store owner decides to do not sell the product anymore for some reasons. 3. Several days ago the order #1 is cancelled and according to your logic the product should be published again. But the store owner doesn't want it to happen.
P.S. I think this behavior should be managed by a new setting. The work item is here
Ok, that's another possibility. The idea of an extra flag is a good choiche, but I'd add an extra global setting concerning the default status. In this way administrators can decide to have always active if they wish.
I personally think that there is a much bigger % or cases where the store owner still want to sell that item VS the case where he decided to stop selling it just because somebody did return it.
It's still one item that needs to be sold ..anyway. Store owners even when they decide to discontinue an item, they still want to get rid of the last ones they have on stock.
I definitely vote for a global setting that tells what to do on Delete.