How to remove SKU showing on product pages

Supafly

New Member
I have two website with exactly the same theme. One shows SKU numbers on product pages and the other does not and I can't find where is the setting to turn it off. Any help appreciated.
 

Direct Webstore

Well-Known Member
Mentioning the theme may help.

Or add this to your themes functions.php file (Child theme better)

function sv_remove_product_page_skus( $enabled ) {
if ( ! is_admin() && is_product() ) {
return false;
}

return $enabled;
}
add_filter( 'wc_product_sku_enabled', 'sv_remove_product_page_skus' );



Or add it to a "Snippets" plugin.

Or install a "Hide SKU" plugin.
 

Mar

Moderator
Mentioning the theme may help.

Or add this to your themes functions.php file (Child theme better)

function sv_remove_product_page_skus( $enabled ) {
if ( ! is_admin() && is_product() ) {
return false;
}


return $enabled;
}
add_filter( 'wc_product_sku_enabled', 'sv_remove_product_page_skus' );



Or add it to a "Snippets" plugin.

Or install a "Hide SKU" plugin.
I used this codes in the past. However, I discovered later that SKU are still showing in Quick View of products. Now I am using this CSS code:
span.sku_wrapper {
display: none !important;
}
This will be added to admin Additional CSS. Now I don't see the SKU anywhere except the product edit page.
 

sridhar

New Member
thanks man
Mentioning the theme may help.

Or add this to your themes functions.php file (Child theme better)

function sv_remove_product_page_skus( $enabled ) {
if ( ! is_admin() && is_product() ) {
return false;
}


return $enabled;
}
add_filter( 'wc_product_sku_enabled', 'sv_remove_product_page_skus' );



Or add it to a "Snippets" plugin.

Or install a "Hide SKU" plugin.
 
Top