The Reviews Data Tab is one of the three tabs that you will find on a WooCommerce product page.
The Reviews tab displays user reviews and ratings of a product.
Remove the Reviews on the WooCommerce Product Page
Some website owners do not want to display ratings because of negative or empty reviews. In that case, removing it instead of leaving it empty as it ruins the user experience would be ideal.
So, if you want to remove the ‘Ratings’ tab, you can use the code snippet below.
php
/**
* Remove WooCommerce Reviews Tab
*
* @param array $tabs
* @return array $tabs
*/
function maverick_remove_woocommerce_reviews_tab($tabs)
{
unset($tabs['reviews']);
return $tabs;
}
add_filter('woocommerce_product_tabs', 'maverick_remove_woocommerce_reviews_tab', 98);
Rename the ‘Reviews’ Tab on the WooCommerce Product Page
If you want to rename the ‘Reviews’ tab, you can use the code snippet below.
php
/**
* Rename WooCommerce 'Reviews' Tab
*
* @param array $tabs
* @return array $tabs
*/
function maverick_rename_woocommerce_reviews_tab($tabs)
{
$tabs['reviews']['title'] = __( 'Ratings' );
return $tabs;
}
add_filter('woocommerce_product_tabs', 'maverick_rename_woocommerce_reviews_tab', 98);