Hi Gabriel,
Thank you for your replay and the link. I have placed the code in a plugin named Code Snippet, but the invoice is still send. I also placed the code in the custom CSS of my theme (Divi), the invoice is still send out.
Can you please give me a bit more direction on how to do this?