• Hi,

    I have put some code in a child theme I created because my client wants me to hide the following on his website:
    SKU on product page;
    Product title;
    Additional information tab;
    Review tab;

    So, in order to achieve this I put the following code in the child themes function.php:

    <?php
    add_filter( 'woocommerce_product_tabs', 'woo_remove_product_tabs', 98 );
    
    function woo_remove_product_tabs( $tabs ) {
    
        unset( $tabs['reviews'] );
        unset( $tabs['additional_information'] );
    
        return $tabs;
    
    }
    
       // Remove Product title
    
    add_filter( 'woocommerce_product_description_heading', 'remove_product_description_heading' );
    function remove_product_description_heading() {
    return '';
    }
    
      // remove SKU on product page
    
    function sv_remove_product_page_skus( $enabled ) {
        if ( ! is_admin() && is_product() ) {
            return false;
        }
    
        return $enabled;
    }
    add_filter( 'wc_product_sku_enabled', 'sv_remove_product_page_skus' );

    But the information stil shows in the frontend. When I put the same code in the function.php of the parent theme, it is executed properly.

    What am I missing and how do I get it to work.

    Thank you in advance.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘Code in function.php child theme not executed.’ is closed to new replies.