Remove wocommerce SKU on product page

SKU are set with the general product data while creating or editing a product. By default, SKUs are shown on the product page with the product meta. If they’re not set, the SKU will just display as SKU: n/a

If you don’t need to use SKUs at all in your shop, you can disable them completely by using this code in your your theme’s functions.php file of your active child theme (or theme) file. This option completely removes SKU from product page and admin as well.

add_filter( 'wc_product_sku_enabled', '__return_false' );

Remove WooCommerce SKU Only on Product Pages

Use following code disable SKU completely on product pages, but leave them for use in the admin. So use this following line of code at the end of your theme’s functions.php file of your active child theme (or theme) and Save the file.

This will remove SKU section from ever being added to the product,but the SKU will still be displayed and editable from the WooCommerce admin.

function remove_wocommerce_sku_productpage( $enabled ) {
    if ( ! is_admin() && is_product() ) {
        return false;
    }
    return $enabled;
}
add_filter( 'wc_product_sku_enabled', 'remove_wocommerce_sku_productpage' );

Leave a Comment

Scroll to Top