Black Friday & Cyber Monday SUPER SALE ALL WEEK:
Grab 40% OFF on plugins
Days
Hours
Minutes
Seconds

How to Hide “Shipping to…” Address @ Cart Page in WooCommerce?

Looking to hide the “Shipping to…” text string that is displayed below the shipping rates in the WooCommerce Cart totals section. This code will let you do it easily.

add_filter( 'gettext', 'ts_translate_shippingto', 9999, 3 );
   
function ts_translate_shippingto( $translated, $untranslated, $domain ) {
   if ( ! is_admin() && 'woocommerce' === $domain ) {
      switch ( $translated ) {
         case 'Shipping to %s.':
            $translated = '';
            break;
      }
   }   
   return $translated;
}

Output

The output shows that the shipping information message “Shipping to %s.” is effectively hidden from the user during the checkout process.

How to Hide “Shipping to…” Address @ Cart Page in WooCommerce?

Before applying the code, the default WooCommerce shipping information would display the “Shipping to address” as follows.

How to Hide “Shipping to…” Address @ Cart Page in WooCommerce?

A lot more customization can be done inside cart totals such as renaming the text, styling the text or hiding certain parameters present here. Alternatively, you can also customize the shipping to text on the WooCommerce cart which will allow you to translate the text to easily understandable.

Browse more in: Code Snippets, WooCommerce How Tos, WooCommerce Tutorials

Share It:

Subscribe
Notify of
0 Comments
Newest
Oldest
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible.

Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

By using our site, you acknowledge that you have read and understood our Privacy Policy and Terms & Conditions.