Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1210630
    Russell
    Participant

    Hello,
    In woo commerce when you add an item to your cart, then view your cart, it has a spot there where it displays “shipping” costs. I’d like to change that text from “shipping” to “delivery”. How would I go about doing this. Any help is greatly appreciated.

    Thanks,
    Russell

    #1211024
    Darshana
    Moderator

    Hi there,

    Thanks for writing in! Because this requires a template change, I’d advise that you setup a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.

    Then you can add the following code into your child theme’s functions.php file.

    
    // WC View Cart -> Change Shipping Text to Delivery
    
    add_filter('gettext', 'translate_reply');
    add_filter('ngettext', 'translate_reply');
    
    function translate_reply($translated) {
      $translated = str_ireplace('Shipping', 'Delivery', $translated);
      return $translated;
    }
    

    Hope that helps.

  • <script> jQuery(function($){ $("#no-reply-1210630 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>