Viewing 3 replies - 1 through 3 (of 3 total)
  • We have this true/false option we can set to hide/show SKU .

    wc_product_sku_enabled
    src:
    https://docs.woocommerce.com/wc-apidocs/function-wc_product_sku_enabled.html

    To use it, add following in your theme’s functions.php file:
    add_filter( 'wc_product_sku_enabled', '__return_false' );

    Above code will disable SKU for both Admin and Front-end.

    If you want only to disable it for Front-end product page only, you can add following custom function:

    function wm_hide_product_page_skus( $enabled ) {
        if ( ! is_admin() && is_product() ) {
            return false;
        }
    
        return $enabled;
    }
    add_filter( 'wc_product_sku_enabled', 'wm_hide_product_page_skus' );
    Thread Starter tamirvcd5000

    (@tamirvcd5000)

    where do i add it?
    thanks a lot ??

    If you are running a child theme, the snippet can go in functions.php for the child theme, otherwise you could use the “My Custom Functions” plugin.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to delete sku from product page’ is closed to new replies.