I ran into a problem, when completely removing the store in db. Of course there was no longer an orderID.
The solution that works for me was to remove all customer related field names from this part of code:
$WA_fieldNamesStr = "language_id|OrderReferenceID|OrderShipping|OrderTax|OrderTotal|OrderDate";
The field names I deleted just stay empty in the data base. Not the best solution, but it works for me.
Additional info: the wizard did not work for me, because it did not recognize the checkout button. And the email is triggered on the success page. So I couldn't use it to redirect to the success page.
Thank you for your help though. I am glad it is working now.