This code for WooCommerce sends a custom email when new orders are placed between specific times and dates. Used for delivery details or anything else, you can easily configure the days of week and times you want the email to apply too.
If the order is placed outside the times or on days outside the days set between Sunday to Sunday, no email is sent.
Installation
Copy and past the PHP code ( without the opening PHP Tag ) to the end of your child themes functions.php file or custom code snippets/functionality plugin.
Date & Time Settings
Set the week days and time of day on line 23.
- Use 13:00 and 20:00 so the email only applies to orders placed between 1 pm and 8pm.
- The day of the week goes from 1 to 7, Monday to Sunday.
- Use 1 and 5 if you only want the emails to be sent when orders are place between Monday and Friday.
You must be logged in to post a comment.