Support » Plugin: WooCommerce » Change label “Payment method:” Across Woocommerce

  • Resolved eclipseprime1

    (@eclipseprime1)


    Im trying to change the phrase “Payment method:” in Woocommerce across the entire plugin. Has anyone ever been able to find out how this can be done.

    I need it to say “Terms / Payment”

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Luminus Alabi a11n

    (@luminus)

    Automattic Happiness Engineer

    Hi @eclipseprime1,

    You can use the Loco Translate plugin to handle this. ven though you’re not translating to a different language, it also works for changing text in the same language to something else.

    You can check it out here – https://wordpress.org/plugins/loco-translate/

    Thread Starter eclipseprime1

    (@eclipseprime1)

    Thanks for the suggestion. I tried it several times it is not working not matter what I do. Not sure why its not working.

    What if you just put the following in your child theme’s functions.php:

    
    add_filter('gettext', 'change_text_strings', 20, 3);
     function change_text_strings($translated_text, $text, $domain) {
      switch($translated_text) {
       case 'Payment method:':
        $translated_text = __('Terms / Payment', 'woocommerce');
       break;
      }
      return $translated_text;
     }
    
    Thread Starter eclipseprime1

    (@eclipseprime1)

    Thanks, I will try this out. Appreciate the help. I will let you know.

    Plugin Support Hannah S. a11n

    (@fernashes)

    Automattic Happiness Engineer

    Hey there @eclipseprime1 – did that work out for you?

    Plugin Support Rynald0s.a11n

    (@rynald0s)

    Automattic Happiness Engineer

    Howdy!

    We haven’t heard back from you in a while, so I’m going to go ahead and mark this thread as resolved. If you have any other questions please start a new thread.

    Cheers!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Change label “Payment method:” Across Woocommerce’ is closed to new replies.