Set Free Delivery Fee on Order above a specific amount on for WooFood

Using the below action you can set free delivery above $25. You can copy and paste the following code to your functions.php child theme and adjust it to your needs .

add_action('woofood_delivery_fee_filter', 'wpslash_change_delivery_fee_based_on_order_value', 10, 1);

function wpslash_change_delivery_fee_based_on_order_value($default_delivery_fee)
{
global $woocommerce;
	$subtotal = WC()->cart->subtotal;
	
	if($subtotal > 25)
	{
		return 0;

	}
	return $default_delivery_fee;
}