Blog

How to Hide SKU on woocommerce product pages?

sku removed from Product page

Some Developers asked for How to Hide SKU from Product details page or Hide SKU Perfectly from WooCommerce Product pages.

SKUs are set in inventory product data when creating or edit Product.

By default, WooCommerce Display SKU on Single Product page with the product meta.
Product page sku disaplying

SKUs are a very important for stores that deal with a lot of products and inventory variations.

But if not need of SKU you can hide it by adding some code. because by default WooCommerce doesn’t have a setting to change it.
Many ways to Hide SKU on Website: We can Hide SKU only from Product page or Remove SKU Completely. if you remove SKU completely it will also be removed from product edit page

Remove SKUs Completely

If you don’t need to use SKUs at all in your shop, you can disable them completely by using this code snippet in your custom site plugin or theme’s functions. php: add filter (‘wc_product_sku_enabled’, ‘__return false).

The SKU will no longer be displaying on product page after removed.
sku removed from Product page

if you remove SKUs completely not only Product page it also be removed from back-end setting like as Product edit page.

sku removed Product edit page

Remove SKUs only on Product pages

If you want to keep SKUs for administration, and only disable or hide SKU Only on product pages. you can use this method. by this method SKU will be disable on only Product page front-end, and SKUs can be managed by wp-admin panel.

To Disable SKU only on Product page, you need to add below code :

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

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

removed sku only from Product page

above code not affect on admin skus manage section

Using the third-party plugin

You may delete SKUs from your site in seconds by purchasing the plugin Remove WooCommerce Features . You will not be required to create any code or pay a WordPress professional to perform the work for you. The entire procedure may be completed in three simple stages.

Step 1: Navigate to the WooCommerce area of your WordPress installation’s admin menu and select the Remove Features option.

removed sku from Product page backend setting asitis

Step 2: Find the SKU setting and tick the box so that it looks like this:

Tick this box

Step 3: SKUs will be removed from your site’s product pages by clicking the “Save Settings” button. The transformation occurs immediately.

So this is great solution if you want to manage SKUs as admin but hide them from the Product detail page.

About Author

WordPress Multi Lingual Plugin Support
Vijay Lathiya, the CEO and founder of Lathiya Solutions, is a passionate WordPress specialist dedicated to delivering innovative web solutions. With years of experience, he helps businesses build a strong online presence through custom websites that drive success.

Want to partner with the best software development company ?

Software Development
Scroll to Top