Home Forums Basel support forum How to hide SKU without CSS

How to hide SKU without CSS

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #13781

    Thangamuthu
    Participant

    Hi Team, How can I disable SKU shows in front end, There is any other option for disable SKU?

    #13785

    Artem Temos
    Keymaster

    Hi,

    Try to add the following code snippet to the functions.php file in the child theme to hide it

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

    Regards

Tagged: 

Viewing 2 posts - 1 through 2 (of 2 total)