This post was last updated on the 24th of November, 2023. The code is compatible with the current versions of WooCommerce, WooCommerce Bookings and PHP 8.
WooCommerce Bookings is a premium plugin by Woo that allow you to sell time. As you could imagine, people sometimes book for your services, but forgot about it. WooCommerce Bookings includes a reminder email notification though that is sent out one day before the booking date.
If you want to change the due date, to three days before the booking date in example, you can do it with a filter.
Before you make any code changes, have a backup of your site. This will help you restore things in case of unforeseen errors. I recommend using Jetpack Backup for real-time backups and one-click restores.
Open the file functions.php located in wp-content/themes/your-child-theme-name/ and add this code at the end of the file:
From now on, the booking reminder will be sent to your customers three days before the booking date. You can change that to something else if you want, or set up some more complex scenarios.
Leave a Reply