Change SKU text label in woocommerce to Product Code

Add the following code to your theme functions.php file for changing SKU text label in woocommerce to Product Code.

function translate_woocommerce($translation, $text, $domain) {
if ($domain == ‘woocommerce’) {
switch ($text) {
case ‘SKU’:
$translation = ‘Product Code’;
break;
case ‘SKU:’:
$translation = ‘Product Code:’;
break;
}
}
return $translation;
}
add_filter(‘gettext’, ‘translate_woocommerce’, 10, 3);

We will be happy to hear your thoughts

Leave a reply

Nijeshikhi.com