If the option “Hide other shipping methods when free shipping is available” is not displayed, you can achieve this behavior manually or by adding custom code.
Option 1: Use predefined rules
- Go to WooCommerce > Settings > Shipping and select your shipping zone.
- Configure:
- A Free Shipping method with a minimum order of 60 euros.
- A Flat Rate Shipping method with a base cost of 5 euros.
- While WooCommerce may not automatically hide the flat rate, customers will be able to choose free shipping when eligible.
Option 2: Use custom code
Add this code to your functions.php
file to automatically hide other shipping methods when free shipping is available:
Final Step
- Save your changes and refresh the checkout page to test
Leave A Comment