Remove SKU from WooCommerce front end

If you need to have SKUs on products in WooCommerce, but don’t want to show them on the front end, you can’t just untick an option in the WooCommerce settings: you can either have and show SKUs or not have them at all. So here’s a quick snippet that lets you have them, but remove them from the front end.

NB: PHP 5.3+ only…

/**
* remove WooCommerce SKU from front end
*/
add_action('woocommerce_before_single_product_summary', function() {
    add_filter('wc_product_sku_enabled', '__return_false');
});

Job is done really quickly and with no customised WooCommerce templates to support as new versions roll out.

Facebooktwittergoogle_plusredditlinkedinmailFacebooktwittergoogle_plusredditlinkedinmail
  • DirtyDave

    Hello, this looks like the code I need. Would I place it in a functions.php file?

    • DirtyDave

      Yep, that did. Never mind.

  • Loïc S

    Hello,
    how to hide SKU only for master product of variable products ?
    Cheers?

  • Carlo Bentivegna

    how can hide tabs “Inventory, shiping, linked, etc”
    and how to change SKU word to Ref:
    im coming crazy :(
    thanks!

  • maxxim1412

    Thank you for the solution! Works like a charm!