Some businesses like online landscape supplies, food catering shops where they do not do delivery on certain days like holidays. But they do want to include those holidays in delivery preparation time as they are still open on those days for regular work, but just not delivering.
Such clients face an issue from the Order Delivery Date Pro for WooCommerce plugin where the holidays on which they do not deliver the products are excluded from the delivery preparation time set using the “Minimum Delivery Time(in hours)” option.
So for example, if a user visits the website on a holiday say 19th May and the Minimum Delivery time(in hours) is set to 24 hours. In such cases, the first available day for the delivery will be 21st May and not 20th May. That happens as the Minimum Delivery Time gets counted from the first enabled day, which is 20th May and not 19th May.
Similarly, for clients having businesses where they do take orders on holidays, but they do not deliver on those days, hence they set them as holidays for the calendar. If such businesses still want to deliver the order on the first available day when there is a holiday between the current date and the selected delivery date, for them the holiday dates should be considered in the delivery preparation time.
This issue can now be overcome by using a hook orddd_to_calculate_minimum_hours_for_holidays from the plugin. This hook allows considering holidays in the delivery preparation time which is set using the Minimum Delivery Time (in hours) option.
Adding the below part of code in functions.php file of the active theme or any other file as per your needs will start considering the holidays in delivery preparation time:
add_filter('orddd_to_calculate_minimum_hours_for_holidays', 'orddd_calculate_minimum_hours_for_holidays'); function orddd_calculate_minimum_hours_for_holidays( $to_calculate ) { return 'yes'; }
Thus, by using the above hook, we have only considered 19th May as unavailable for delivery, but it’s still a working day for your back office & hence the first available date for delivery is taken as 20th May instead of 21st May.
There are many more hooks and filters available for the Order Delivery Date Pro for WooCommerce plugin that allow you to customize the plugin.
If you can’t find a hook or filter you are looking for, please suggest us & we will be happy to add those.
Hi Yoni, I can understand that the current plugin does meet your requirements. However, we have planned to add a feature of ‘Shipping Days’ options from the plugin which will allow admin to enable shipping/working days. And once the option is enabled the Minimum Delivery time (in hours), Same Day and Next Day delivery features will work on the shipping days selected and not the Delivery Days which are enabled under Date Settings link. For example, your shipping/working days are for all the weekdays from Monday and Sunday but your Delivery days are only from Monday to Friday. Then you… Read more »
Hi, Currently, the holidays or the disabled weekdays are not counted in the Minimum Delivery Time(in hours) setting. It works only on the working days. So, for example, if the Minimum Delivery Time is set to 48 hours and the enabled weekdays for delivery is Monday to Friday, then if someone comes on Friday the first available day on the calendar will be Tuesday and not Monday. The 48 hours is counted only on the working weekdays .i.e Friday and Monday. This is the default behaviour of the plugin and this hook is to overcome this behaviour for the customers… Read more »
Hi, I missed your response when you posted it. But it looks to me like the answer is no, there’s not a straightforward way to do this. I imagine it’s gotta be possible somehow by enqueuing some JavaScript, though I’m relatively inexperienced at frontend WordPress development. I guess it might be doable through adding some settings tabs too, but I’ll have to eventually look at your code to see how easily I can pull it off. I suppose I should call this a feature request, then. It seems to me that if you’re already making a partial distinction between the… Read more »
What if I have the opposite issue? In my foodservice business, people can place special orders for pickup. Our business is open 7 days a week, but our production staff is only in on weekdays. So if something takes 48 hours and a customer orders on Wednesday night, they can choose Sunday pickup. But if they order on Friday morning they can’t, because our production staff doesn’t have the time. Do any of your hooks allow me to adjust availability based on production holidays instead of delivery holidays? (I am the business owner but also capable of doing some of… Read more »