WPSlash

Delivery Time based on Product Preparation Time

Monday June 22, 2020

Here is a code snippet to copy to your functions.php inside your child theme if you want the average delivery time based on products preparation time you will specify + Average Deliver/Pickup time you specify under Settings on WooFood.

Note: Copy the second snippet only if you want to calculate only the longest preparation time of a meal instead of the sum of all product preparation times

add_filter("woofood_delivery_time_based_on_preparation_time", "wpslash_hook_change_to_preparation_time_filter");
function wpslash_hook_change_to_preparation_time_filter($default)
{
	return true;
}
add_filter("woofood_delivery_time_longest_prepation_time", "wpslash_hook_change_to_longest_preparation_filter");
function wpslash_hook_change_to_longest_preparation_filter($default)
{
	return true;
}

The above filters will work only if you are using our food delivery plugin .

Leave a Comment

Your email address will not be published. Required fields are marked *

Related Articles

WooFood

How to Disable Coupons for Delivery Orders in WooCommerce

If you’re running a WooCommerce-powered restaurant or food delivery service, you might want to restrict certain coupon codes for delivery orders while keeping them valid for pickup orders. This ensures better control over discounts, prevents misuse, and improves your store’s pricing strategy. Why Restrict Coupons for Delivery Orders? Offering coupons is a great way to attract customers, but in food […]
June 20, 2023
WooFood

How to Automatically Re-Enable Disabled Products in WooFood Once a Day

If you’re running a WooCommerce-powered restaurant ordering system using WooFood, you might have products that automatically get disabled due to stock limits or availability settings. To ensure a smooth customer experience, you can automate the re-enabling process using a scheduled WordPress cron job. This method allows you to reset all product availability once a day, ensuring your menu stays active without manual intervention. Why […]
March 8, 2023
WooFood

How to Add Live Product Search to WooFood in WooCommerce

Enhancing the user experience of your WooCommerce-powered restaurant ordering system is crucial, and adding a live product search feature can significantly improve navigation. This feature allows customers to quickly find food items in your WooFood-powered menu without manually browsing through categories. In this article, we’ll show you how to integrate a live product search above the accordion menu in WooFood using a simple jQuery script and PHP snippet. […]
December 29, 2022