How to Change WooCommerce SKU text to another label

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

add_filter('gettext', 'codeithub_translate_woocommerce', 10, 3);
/**
 * Changing SKU Label
*/

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

You can add the above snippet in your functions.php file, SKU label will get changed to “Catalogue Number:”

Before:

Change SKU label in woocommerce

After:

SKU label text changed to another label

Leave a Reply

Your email address will not be published. Required fields are marked *