WooCommerce is a popular eCommerce plugin for WordPress. It offers many features, including customer reviews on product pages. While reviews can be a great way to build trust and provide social proof, some store owners may want to hide or remove this section for various reasons. You can quickly hide the reviews tab on WooCommerce product pages by adding the PHP snippet shown below to the functions.php file in your theme.
// Function to remove the reviews tab from WooCommerce product pages
function themesdna_remove_woocommerce_reviews_tab($tabs) {
unset($tabs['reviews']); // Remove the reviews tab
return $tabs;
}
// Hook the function to WooCommerce to disable the reviews tab
add_filter('woocommerce_product_tabs', 'themesdna_remove_woocommerce_reviews_tab', 98);
The snippet above not only visually hides the reviews but also prevents them from loading on the product page, thereby improving load times. If you ever decide to enable reviews again, simply remove or comment out this code, and the reviews will reappear.