Hide other shipping methods when FREE SHIPPING is available PLUGIN

I recently came across the situation where a client wanted the flat rate shipping method removed if the free shipping method was available in the WooCommerce shipping cart, something that I would have thought would be standard behaviour in WooCommerce. Apparently it isn’t.

No matter a quick Google search and I found just what I wanted   https://docs.woothemes.com/document/hide-other-shipping-methods-when-free-shipping-is-available/ . The problem for me was the fact that the client’s website was a purchased Child Theme and since you can’t have a child theme of a child theme, I would have to edit the functions.php file of the child theme to get this function to work. Of course this would make it difficult if an update to the child theme was ever released.

The solution? Make it into a plugin. This would mean that no editing of the child theme’s function.php file was necessary and I would have the added bonus of having a plugin to re use on other projects if need be. You can download the plugin here:


Keep in mind that you have to make sure you clear your WooCommerce cache (WooCommerce → System Status → Tools → WC Transients → Clear transients), as shipping methods are cached.


Interested to find out what we can do for you? Fill out our Project Enquiry Survey and we will get back to you with a custom solution tailored to fill your unique needs.
Project Enquiry Survey
If you want to purchase a block of time for us to work on your website, click on the "Purchase Service Time" button.
Purchase Service Time
If you want to book a video conference call using Google Meet, click the "Book a Meeting" button below.
Book a Meeting

Leave a Reply

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

Firth Web Works ©2024 All Rights Reserved | Privacy Policy
Top homephoneenvelopechevron-down linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram