I am working on an e-commerce site in Wordpress. I want the shipping in a way that when customer purchase for $100 shipping would be free otherwise I would charge $10 as shipping charge.
To have this flow working, I have setup two shipping zones one for Free shipping if the amount is equal to or more than $100 and another shipping zone is for normal charge of $10.
Now they are working properly.
My issue is when I add products upto of $100 or more it shows me both the options in shipping as radio buttons. Where a customer has to select free shipping.
I want it automatically shows free shipping when total amount is $100 or more than this.
Thanks in Advance.
Asked
Active
Viewed 41 times
0

LoicTheAztec
- 229,944
- 23
- 356
- 399

varsha
- 1,620
- 1
- 16
- 29
1 Answers
-2
Here is how we can achieve it.
add_filter('woocommerce_package_rates','test_overwrite_fedex',100,2);
function test_overwrite_fedex($rates,$package) {
foreach ($rates as $rate) {
// you can check for the cart amount if it is greater than the 100 then unset the package from rates and then return.
}
return $rates;
}

ayush singh
- 1
- 1