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
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x