Website Building » WooCommerce » How Do I Hide Other Shipping Options in WooCommerce?

How Do I Hide Other Shipping Options in WooCommerce?

Last updated on January 11, 2023 @ 12:56 pm

There are a few different ways that you can hide other shipping options in WooCommerce. One way is to simply uncheck the “show” box for each of the shipping options that you don’t want to display on the front-end of your site. Another way is to add a bit of code to your functions.php file.

To hide shipping options in WooCommerce by unchecking the “show” box, go to WooCommerce > Settings > Shipping. Then, click on the shipping zone that you want to edit.

PRO TIP: If you are using WooCommerce to sell products online, you may want to consider hiding other shipping options from your customers. This can be done by going to your WooCommerce settings and selecting the “Hide Other Shipping Options” checkbox.

However, please be aware that this will only hide other shipping options from your customers’ view. It will not actually remove those shipping options from your WooCommerce settings. If you want to completely remove other shipping options, you will need to do so manually.

Next, find the shipping method that you want to hide and uncheck the “show” box next to it. Repeat this process for each shipping method that you want to hide.

function my_custom_hide_shipping_when_free_is_available( $available_methods ) {
   if ( isset( $available_methods['free_shipping'] ) ) {
        unset( $available_methods['flat_rate'] );
   }
   return $available_methods;
}
add_filter( 'woocommerce_package_rates', 
'my_custom_hide_shipping_when_free_is_available', 100 );

This code will hide all flat rate shipping methods when free shipping is available. You can adjust this code to suit your needs by changing “flat_rate” to the ID of the shipping method that you want to hide.

Madison Geldart

Madison Geldart

Cloud infrastructure engineer and tech mess solver.