How to hide other shipping method when usps shipping is available

By Prem Tiwari in WordPress Snippets. Updated on


In today’s tutorial, I am going to share how to hide other shipping methods when USPS shipping is available for Alaska & Hawaii State in your WooCommerce store.

How to hide other shipping methods when USPS shipping is available

Copy the below code and add at the end of the themes/your-active-theme-folder/functions.php file. The below code will hide the other shipping method from cart/checkout page if USPS shipping method is available for Alaska and Hawaii USA states.

After adding the above code in your functions.php file, you will see the changes like below screenshot on the cart page.

How to hide other shipping method when usps shipping is available

Do you like & share this article with your friends, and don’t forget to follow us on Facebook and Twitter to learn cool WordPress tutorials.

Sharing is caring!


Prem Tiwari

An engineer by profession and a passionate blogger by heart. Founder of FreeWebMentor.com (A Programming blog for beginners), Tech Speaker at various forums. A part from this he is an open source enthusiast, WordPress Lover, Blogger, SEO, and Growth Strategic.

You might also like:

Tags: , , , , ,

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.