Viewing 6 replies - 1 through 6 (of 6 total)
  • If you want to turn them off, you can use this code in functions.php of your child theme:

    add_filter( 'wc_product_sku_enabled', 'disable_skus' );
      function disable_skus() {
        return false;
      }

    If you want them turned off only when they are empty that would be more demanding.

    Thread Starter RinorMaz

    (@rinormaz)

    Hi Lorro,

    Thanks for the help. I am a bit confused now since the SKU field does not show on some products, but it shows on on 1-2 products on the page even though all of the products have an empty SKU field. How come it is so?

    The SKU is just like an product ID right?

    Sorry I don’t know why it should show on some products and not others. That code should turn it off altogether.

    The product ID is determined automatically by WC. Its actually a post ID because a product is a type of post. The webmaster has no control over the value.

    The SKU is set on each product page, Product Data section, General tab. You can use the field for your organization’s stock reference id if you want.

    Thread Starter RinorMaz

    (@rinormaz)

    Oh ok but where can I observe this product ID, in which scenario will this show up?

    So the SKU is more for me to organize my products and keep track on their stock? How can I do this in the wp-admin?

    Thank you so much for your help mister you are awsome.

    To find a product ID, you can hover over the product in the list of products. As you hover, it’ll say something like:
    ID: 2349 | Edit | Quick edit | Trash | View
    or if you edit the product, the id will be in the url like post=2349.

    From what you say I think the SKU is what you want. Its useful for linking to other sales channels you may have or to external spreadsheets for example. You can set a product’s SKU at:
    Admin page > Products > (my-product) > Product Data section > General tab

    Thread Starter RinorMaz

    (@rinormaz)

    Thanks you are awsome.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How to NOT display SKU’ is closed to new replies.