To remove the "Reviews" tab from WooCommerce product pages, you can use a code snippet in your theme's functions.php file or in a custom plugin. The snippet uses the woocommerce_product_tabs filter to modify the product tabs array and remove the "Reviews" tab. Here's the code snippet:

// Remove Reviews tab from WooCommerce product pages - https://websitefunctions.com

function remove_reviews_tab($tabs) {

    unset($tabs['reviews']);

    return $tabs;

}

add_filter('woocommerce_product_tabs', 'remove_reviews_tab', 98);

 

Explanation of the code:

  1. We define a custom function named remove_reviews_tab that takes the array of product tabs as an argument ($tabs).

  2. Within the function, we use the unset() function to remove the "reviews" tab from the $tabs array.

  3. Finally, we return the modified $tabs array from the function.

  4. We hook our function into the woocommerce_product_tabs filter with a priority of 98. The priority ensures that our function is called after WooCommerce has set up the default product tabs.

Add this code snippet to your theme's functions.php file or create a new custom plugin. This will remove the "Reviews" tab from the product pages on your WooCommerce website. Remember to take a backup of your site or use a child theme before making any changes to the theme files.