Hi Ewout, thank you for the quick answer!
Your plugin it is ok. This is what I did:
I unchecked the “Add to” fields but kept “New order” on. That way I can be sure that no email will be sent with old “completed” orders. Luckily, I think finally no email was sent to customers (I have a customer profile and didn’t get any email, so that is a relief).
Later I found that I can remove the generated invoice (in prestashop I could not do it, so I though in Woocommerce was the same) and keep a Completed order with no invoice, or set manually a new invoice and date number. Great for that!
About the orders and invoices date: yeah, your plugin works correctly. The problem is that (I think) there is no clear difference between the icons of “Invoice created” and “Create new invoice” (same problem for Packing Slips icons). There is just a small green check in a corner, so I thought that those icons where all the same and all the invoices were already created. What I was doing when clicking on them was generating invoices at that time. Maybe a solution should be to set 50% transparency for non generated invoices icons, I don’t know. Of course, the plugin set the next invoice number when generating a new one, so it is up to me if I click on newer prior to older invoices. There is no problem with plugin but maybe the icons could be more clear.
Another thing that I don’t understand are the 3 points icon. It seems not doing anything. Please take a look at the image https://imgur.com/a/a23CEvg
Anyway, your plugin works great! Thank you very much!