I have a system that is custom PHP which allows administrators to send vendors an email if someone bought one of their products. However, I would like to include a checkbox for an Anonymous buyer and have a checked box send a different email than from that have not checked the box.
This is based on Woocommerce ordering. There is a custom table in the database where orders are stored and the emails are sent from there via swiftmailer. The issue is that all emails are sent in bulk regardless of whether they are anonymous or not. The only solution is to manually remove that order from the custom table before sending out the emails.
Ideally , I would have two emailCompaniesSend files which are loaded whether the checkbox has been checked or not. If the box is not checked, it would load emailCompaniesSend1.php and if it IS, it would send emailCompaniesSend2.php with the name and addresses scraped from the HTML email template. Therefore the buyer appears as anonymous to the vendor.