Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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';
case 'SKU:':
$translation = 'Product Code:';
return $translation;
add_filter('gettext', 'translate_woocommerce', 10, 3);
Copy link

wizard247 commented May 11, 2017

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! ;)

Copy link

orlandoaleman commented Nov 1, 2017

Thanks to share!

Copy link

Emanuele20 commented Oct 25, 2018

where i have to add that code?
try in functions.php....but not work....

Copy link

elias1435 commented Feb 19, 2019

its worked...!

Copy link

dragonlord4747 commented Aug 3, 2020

Yeahhhh! Thankss. Its worked...!!!!

Copy link

Erraoudy commented Sep 23, 2020

thank you bro

Copy link

ARJ-HADES commented Oct 12, 2021

not working showing an
Screenshot 2021-10-12 151159

Copy link

jolution commented Dec 3, 2021

@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