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.