• Resolved danikas

    (@danikas)


    Hello, how can I change these default texts? I’ve been looking on the internet and I cannot seem to find the solution… Thanks.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @danikas

    You can use filter for that. Add below function in your active theme’s function.php
    Please change text as per your requirements

    add_filter( 'gettext', 'ahirwp_translate_woocommerce_strings', 999, 3 );
      
    function ahirwp_translate_woocommerce_strings( $translated, $untranslated, $domain ) {
     
       if ( ! is_admin() && 'woocommerce' === $domain ) {
     
          switch ( $translated ) {
     
             case 'Sale!':
     
                $translated = 'On Offer';
                break;
     
             case 'Product Description':
     
                $translated = 'Product Specifications';
                break;
     
             // ETC
           
          }
     
       }   
      
       return $translated;
     
    }

    Thanks
    Ahir Hemant

    • This reply was modified 3 years, 3 months ago by Ahir Hemant.

    Hi @danikas,

    You can also use a translation plugin to change the default text “strings” in WooCommerce. That way you can make changes from within the admin if you’d rather not write code for it.

    https://justabill.blog/change-a-wordpress-string-without-a-plugin/

    Let us know if you have any questions

    Hi @danikas

    We’ve not heard back from you in a while, so I’m marking this thread as resolved. If you have further questions, please feel free to open a new topic.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to change default woocommerce text’ is closed to new replies.