How to change the WooCommerce SKU name to whatever you want.

sku iban

It is true that the SKU, is normally used as a reference number for inventory, etc, is not often used much, as it is often more useful for other uses, so in this article, we will quickly learn how to change the name of the SKU in WooCommerce.

For example, you might prefer to use this field to enter the ISBN of books, or the IBAN, and make it be seen and identified as such in the store.

So, in case the need ever arises, let’s see how to rename the WooCommerce SKU to your liking.

Table of Contents

Method 1

To do this you just have to add the following code to your customizations plugin or to the functions.php file of the active theme (preferably child theme).

//Change SKU text function translate_woocommerce($translation, $text, $domain) { if ($domain == 'woocommerce') { switch ($text) { case 'SKU': $translation = 'ISBN'; break; case 'SKU:': $translation = 'ISBN:'; break; } } return $translation; } add_filter('gettext', 'translate_woocommerce', 10, 3);
Code language: PHP (php)

Method 2

Another possibility would be to do it this way:

/* Change SKU text in WooCommerce */ add_filter('gettext', 'change_sku', 999, 3); function change_sku( $translated_text, $text, $domain ) { if( $text == 'SKU' || $text == 'SKU:' ) return 'IBAN'; return $translated_text; }
Code language: PHP (php)

Read this post in Spanish: Cómo cambiar el nombre del SKU de WooCommerce a lo que quieras

Click to rate this post!
[Total: 1 Average: 5]

Leave a Comment

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

Scroll to Top Skip to content