{"id":417,"date":"2023-03-15T10:30:00","date_gmt":"2023-03-15T10:30:00","guid":{"rendered":"https:\/\/unmaskwp.com\/?post_type=snippets&p=417"},"modified":"2023-03-11T08:54:28","modified_gmt":"2023-03-11T08:54:28","slug":"remove-rename-the-reviews-data-tab-in-woocommerce","status":"publish","type":"snippets","link":"https:\/\/unmaskwp.com\/snippets\/remove-rename-the-reviews-data-tab-in-woocommerce\/","title":{"rendered":"How to Remove or Rename the “Reviews” Data Tab in WooCommerce?"},"content":{"rendered":"\n
The Reviews Data Tab is one of the three tabs that you will find on a WooCommerce product page.<\/p>\n\n\n\n
The Reviews tab displays user reviews and ratings of a product. <\/p>\n\n\n\n
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.<\/p>\n\n\n\n
So, if you want to remove the ‘Ratings’ tab, you can use the code snippet below.<\/p>\n\n\n\n
\/**\n * Remove WooCommerce Reviews Tab\n *\n * @param array $tabs\n * @return array $tabs\n *\/\nfunction maverick_remove_woocommerce_reviews_tab($tabs)\n{\n unset($tabs['reviews']);\n return $tabs;\n}\n\nadd_filter('woocommerce_product_tabs', 'maverick_remove_woocommerce_reviews_tab', 98);<\/code><\/pre>\n\n\n\nRename the ‘Reviews’ Tab on WooCommerce Product Page<\/h3>\n\n\n\n
If you want to rename the ‘Reviews’ tab, you can use the code snippet below.<\/p>\n\n\n\n
\n\/**\n * Rename WooCommerce 'Reviews' Tab\n *\n * @param array $tabs\n * @return array $tabs\n *\/\nfunction maverick_rename_woocommerce_reviews_tab($tabs)\n{\n $tabs['reviews']['title'] = __( 'Ratings' );\t\t\n return $tabs;\n}\n\nadd_filter('woocommerce_product_tabs', 'maverick_rename_woocommerce_reviews_tab', 98);<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"