I have a WooCommerce store and I do not want to display SKUs on any product page. Looking at their code, I found this filter:
function wc_product_sku_enabled() {
return apply_filters( 'wc_product_sku_enabled', true );
}
and I tried to override it with this line of code, which I posted in a custom plugin:
apply_filters( 'wc_product_sku_enabled', false );
I also tried putting apply_filter in the action function for woocommerce_product_meta_start, which fires right before that, but still displays the SKU on the product page. Any ideas?
source
share