Back to Blog

WooCommerce Snippet: 2 simple ways to remove the Product SKU from WooCommerce Product Page

See how to easily remove the product SKU from the WooCommerce product page.


WooCustomizer: Remove the product SKU

The WooCommerce product SKU is very often wanted removed from the product single page as the product SKU is usually only used by admin or shop managers for tracking the inventory of the products.

So it might not make much sense to display it on the front-end for your shop customers.

Remove the Product SKU using PHP

To easily remove the product SKU from the product page in WooCommerce, you can simply add the following code to the functions.php file of your child theme, or to a site customizations plugin.

// Remove the Product SKU from Product Single Page
add_filter( 'wc_product_sku_enabled', 'woocustomizer_remove_product_sku' );

function woocustomizer_remove_product_sku( $sku ) {
     // Remove only if NOT admin and is product single page
     if ( ! is_admin() && is_product() ) {
         return false;
     }
     return $sku;
 }

Remove the Product SKU using CSS

As an extra backup, you can also add the following custom CSS to your theme to ensure the WooCommerce product SKU is removed from the product page.

.single-product span.sku_wrapper {
    display: none !important;
}

Our WooCustomizer plugin offers these code snippets all built into the WordPress Customizer to easily remove the product SKU from the WooCommerce product page.