Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save gagimilicevic/7406ceb0101cb0a55ca120ead05c3c78 to your computer and use it in GitHub Desktop.
Save gagimilicevic/7406ceb0101cb0a55ca120ead05c3c78 to your computer and use it in GitHub Desktop.
Change 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);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment