• Resolved ptuchos

    (@ptuchos)


    Hi. I have a problem trying to remove the reviews and additional information on product tabs via Code Snippets. I used the following code:

    /**
    * Remove product data tabs
    */
    add_filter( ‘woocommerce_product_tabs’, ‘woo_remove_product_tabs’, 98 );

    function woo_remove_product_tabs( $tabs ) {

    unset( $tabs[‘description’] ); // Remove the description tab
    unset( $tabs[‘reviews’] ); // Remove the reviews tab
    unset( $tabs[‘additional_information’] ); // Remove the additional information tab

    return $tabs;
    }

    And although it’s active the code doesn’t work at all. I’ve already tried putting // before the unset of the tab I want to remove and it stays the same. I’ve tried it without // too, and nothing changes. What could be the problem?

    • This topic was modified 2 years, 10 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Developing with WordPress topic
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Code snippet don’t work’ is closed to new replies.