WPSlash

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;
}

Leave a Comment

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

×

🔥 ONE DAY ONLY OFFER 🔥

Upgrade FoodMaster Today

Normally your license is limited to 1 Website.

Today only, get a LIFETIME Unlimited Websites License for just:
$499

✔ Unlimited Client Websites
✔ Unlimited Personal Projects
✔ Future Updates Included
✔ Save Hundreds on Additional Licenses

Offer Ends In: