You can change WooCommerce SKU text to another label using the gettext filter

add_filter('gettext', 'translate_woocommerce', 10, 3);
/**
 * Change SKU Label
 * @link https://gist.github.com/dannyconnolly/da6f1a2d95dc826ccdcd
 * @since 1.0.0
 */

function translate_woocommerce($translation, $text, $domain) {
   if ($domain == 'woocommerce') {
        switch ($text) {
            case 'SKU':
                $translation = 'Catalogue No:';
                break;
            case 'SKU:':
                $translation = 'Catalogue No:';
                break;
        }
   }
    return $translation;
}

So in the above snippet which goes in your functions.php file, any instance of ‘SKU’ or ‘SKU:” will get changed to “Catalogue No:”, change the translation text to suit.

1 Comment

  1. Damien Carbery on January 15, 2021 at 8:24 am

    As the gettext filter is called 100s of times for each page load, this code will have a small impact.

    I wrote about a way to use a partial PO/MO file to get the same result: https://www.damiencarbery.com/2018/12/change-hardcoded-woocommerce-strings/

Leave a Comment