How to Remove WooCommerce Product SKU and Price

How to hide woocommerce sku and price
Share this:

Sometimes you need to hide extra information such as product SKU and price for your WooCommerce store.

Today, i would like to share how you actually can achieve above situation. Let’s get started by giving you 2 examples:

1. You would like to hide product SKU
2. You would like to hide product price

First, you need to open your functions.php file at your current theme folder (wp-content/themes/[THEME]/functions.php)
You can download functions.php file from FTP, edit then upload again, OR you can go to WordPress Admin -> Appearance -> Editor, and click functions.php to edit then save.

Put below code to bottom of the file:

Tips #1 : Hide Product SKU at All Product Page

if(is_product())
{
  add_filter( 'wc_product_sku_enabled', '__return_false' );
}

Tips #2 : Hide Product Price at All Product Page

remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 10 );
remove_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 10 );

Done, save your file and see the updated change.

You can try my new pluginWooCommerce Product Catalog that can turn WooCommerce into product catalog with a few clicks.

10 Comments

  1. Great! But I was looking for information on how to show the SKU in a single page. Right now my SKU is not showing up. Could you tell me how to do that?

  2. Hi Sunish, does this happen to all tupes of product whether it is simple product or variable? Do you try to change to default theme and sku will show or not. Need to find out this is theme related or product related first.

  3. hi, how i can hide price in single product page? Or change price (on top) to default price variation when i choose size or colors. thanks

  4. Hi,

    I have been looking to show the SKU too! I have added it to a simple product and variable product and it still will not display! I am not the best with coding and tried to add the following but this didnt work!:

    if(is_product())
    {
    add_filter( ‘wc_product_sku_enabled’, ‘__return_true’ );
    }

    I have been googling for hours now and this is driving me nuts!

  5. Hi terrytsang,

    Thanks for your reply… do you mean the default wordpress theme? Or the Woocommerce default theme?

    If the Woocommerce then I can’t find that anywhere!

  6. defo a theme issue as I had the Shopifiq theme on a dummy website and just changed it over to the wordpress default theme and up it popped!

    Now to figure out what the hell is going on…is it in my theme and hiding some how with some css edits i have made I wonder!

  7. Thats what I have been looking for, in the css and functions.php etc etc, but I just cant seem to find .sku anywhere!

  8. Hi Terry,

    How would you remove the price from emails? All my emails still show the price of $0.00. I tried removing the “price” table tags inside the woocommerce email templates, but it does not work.

    I currently have a copy of all php email templates in my child theme. I’ve successfully added other items such as sku to the email, but I just can’t seem to remove the price field. it’s driving me crazy!

Leave a Comment.