Change SKU text label in woocommerce to Product Code

This topic has 11 replies, 3 voices, and was last updated 5 years, 5 months ago ago by Rose Tyler

  • Avatar: Tecnica PC
    Carmen
    Participant
    November 21, 2019 at 08:15

    Hi

    How Change SKU text label in woocommerce to Product Code?

    I add this code, but don’t work

    function translate_woocommerce($translation, $text, $domain) {
    if ($domain == ‘woocommerce’) {
    switch ($text) {
    case ‘SKU’:
    $translation = ‘OrderNr’;
    break;
    case ‘SKU:’:
    $translation = ‘OrderNr:’;
    break;
    }
    }
    return $translation;
    }

    add_filter(‘gettext’, ‘translate_woocommerce’, 10, 3);

    10 Answers
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    November 21, 2019 at 08:18

    Hello,

    You can change the text using translation files.
    Install Loco Translate plugin https://www.8theme.com/documentation/xstore/theme-translation/base-theme-translation/ , create English translation, change desired strings of XStore theme and disable the Loco translate.

    Regards

    Avatar: Tecnica PC
    Carmen
    Participant
    November 21, 2019 at 10:33

    Hi
    I installed and a see two languages english and portuguese.
    I want translate this to portuguese http://prntscr.com/pzzohp

    http://prntscr.com/pzzpkt

    it looks like the translation already exists but it doesn’t work

    Avatar: Olga Barlow
    Olga Barlow
    Participant
    November 21, 2019 at 11:24

    Hello,

    Maybe translation files were placed to wrong folder or it’s out of date. Provide us with temporary Dashboard access to your site to check why it does not work for you.

    Regards

    Avatar: Tecnica PC
    Carmen
    Participant
    November 21, 2019 at 11:26

    Ok

    check

    Please contact administrator
    for this information.
    Avatar: Olga Barlow
    Olga Barlow
    Participant
    November 21, 2019 at 11:34

    Hello,

    1) I don’t see any translation for the XStore theme http://prntscr.com/q00qgw
    2) The language of your site is English http://prntscr.com/q00t9h so any translation won’t work if main language is English.

    Regards

    Avatar: Olga Barlow
    Olga Barlow
    Participant
    November 21, 2019 at 11:45

    I have added Translation for the XStore theme http://prntscr.com/q00woa . Finish translation and switch site language (Settings > General) if you want to apply it.

    Regards

    Avatar: Tecnica PC
    Carmen
    Participant
    November 21, 2019 at 11:57

    Thank it Work

    Avatar: Olga Barlow
    Olga Barlow
    Participant
    November 21, 2019 at 12:05

    You are welcome.

    Regards

    Avatar: Tecnica PC
    Carmen
    Participant
    November 22, 2019 at 13:17

    Its Ok

    Thank

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    November 22, 2019 at 14:00

    This topic will be closed because the issue is solved. Please kindly open up new tickets for additional questions.

    Regards

  • Viewing 11 results - 1 through 11 (of 11 total)

The issue related to '‘Change SKU text label in woocommerce to Product Code’' has been successfully resolved, and the topic is now closed for further responses

Helpful Topics

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.