When working with plugin like WooCommerce, it is hard to avoid customization, a lots of it. In my recent project, I adopted WooCommerce to achieve product management without shopping cart experience. You guessed it, disable and hide so many options.
Option 1: Using a Plugin
Disable Comments is a plugin that allows administrators to globally disable comments on any post type, including custom post type. As review is just using comments feature for Product (custom post type). So we can disable product review and hide the tab in product page by just disabling comment on Product.
Option 2: woocommerce_product_tabs filter
The other way is to use woocommerce_product_tabs filter provided by WooCommerce plugin. The filter gives us direct control to hide the tab(s) we donβt need.
// Disable product review (tab)
function woo_remove_product_tabs($tabs) {
unset($tabs['description']); // Remove Description tab
unset($tabs['additional_information']); // Remove Additional Information tab
unset($tabs['reviews']); // Remove Reviews tab
return $tabs;
}
add_filter( 'woocommerce_product_tabs', 'woo_remove_product_tabs', 98 );
Reference Blog
ways to Disable WooCommerce Reviews Tab In WordPress
Top comments (1)
Hi there, we encourage authors to share their entire posts here on CodeNewbie, rather than mostly pointing to an external link. Doing so helps ensure that readers donβt have to jump around to too many different pages, and it helps focus the conversation right here in the comments section.