Created
December 18, 2015 13:22
-
-
Save dannyconnolly/da6f1a2d95dc826ccdcd to your computer and use it in GitHub Desktop.
Change SKU text label in woocommerce to Product Code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
Thanks to share!
hello!
where i have to add that code?
try in functions.php....but not work....
Thx
its worked...!
Yeahhhh! Thankss. Its worked...!!!!
thank you bro
@ARJ-HADES Your error could also be due to write and / or access rights. Can you generally write something in and save in it?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks Danny - how would I need to adjust this to make this change for one particular category only? Not a PHP programmer but good at cut & paste! ;)