I'd like to schedule emails dynamically, based on a custom date field in pre-existing WooCommerce products.
I was already using the WC Follow-Up Emails plugin, but it was wreaking havoc on my page load times, so I figured it'd be fairly easy to come up with a more lightweight version.
In essence, I just need a trigger to check a field in a table any time a new row is added to the table which then schedules an email for X-days before or after that date (which I should be able to configure either in the db or in the WP admin panel). That's it!
If this is something you'd like to do, I welcome any questions you may have, and I'll be reaching out to any finalists before awarding the project (which helps weed out any auto-bidders who just don't respond, and also helps to make sure everyone's on the same page before finalizing the project).
I look forward to working with you!
P.S. I should clarify that the emails are supposed to be sent to email addresses associated with the new row that's inserted (not to one static email address), so an additional query would be needed in order to retrieve that.
Also, as an example, whenever there is a new row inserted into the 'reservations' table, there will also be a wp_rg_lead_id field, and then when your code queries the wp_rg_lead table with that ID number, it will provide a reservation date and email address.
And then I would need to be able to configured ahead of time (either in the code, in the db, or in an admin panel) how many days before and after the reservation date particular emails are sent. There would probably be one or two reminder emails scheduled before the reservation date and one thank-you email schedule after each reservation.
Oh, it's also worth mentioning that I will need to send emails with different text depending on an ID number in the row, so it wouldn't be just one email for all.