If you want to remove reviews on your WooCommerce site, it is easy and straightforward to disable reviews in WooCommerce as you will see in the illustration in this post.
WooCommerce reviews play an important role in ensuring customers provide feedback for the products but when they are not needed; they should be disabled easily from the WooCommerce settings.
WooCommerce Reviews
By default, the reviews section of WooCommerce is enabled when you install the WooCommerce plugin.
The WooCommerce reviews are located on the single product page on the tabs as shown in the image below:
How to Remove WooCommerce Reviews
There are also some plugins that you can use to remove reviews from WooCommerce. If you don’t prefer to use a plugin you can employ two measures:
- Disabling WooCommerce reviews on the settings page
- Adding a code snippet that has a remove_action function to remove the WooCommerce action hook that adds the reviews tab.
We are going to illustrate both ways to remove or disable WooCommerce reviews.
We will use the default WooCommerce theme –Storefront to remove or disable WooCommerce reviews. On Storefront the reviews are seen as shown on this image:
Disable WooCommerce Reviews
- Log in to your WooCommerce site and navigate to the WooCommerce settings page as shown on the image below (1 on image).
- On the settings page, click on the products tab as indicated on the image above(2 on image)
- On the products page look for the Enable Products reviews option (3 on image) that should be checked for the reviews to be displayed. Uncheck this option and the WooCommerce reviews will be disabled.
- Do not forget to click on save changes ( 4 on image) for the changes to be effected
How it works
This option is a default WooCommerce option that is designed to remove the reviews tab from all products on your WooCommerce site.
It also removes all recent review widgets from your WordPress dashboard and enables the product metadata reviews option.
WooCommerce Remove Reviews with Code Snippet
An alternative method to remove reviews on WooCommerce shop is by adding the following code snippet in the functions.php file of your theme or child theme if it exists.
remove_action('woocommerce_product_tabs', 'woocommerce_product_reviews_tab', 30); remove_action('woocommerce_product_tab_panels', 'woocommerce_product_reviews_panel', 30);
How the Code Works
This code snippet simply unhooks the action hook that adds the reviews tab on the WooCommerce product page and this removes reviews from WooCommerce.
The function used in the code is remove_action which is primarily a WordPress function that is responsible for removing existing actions from WordPress.
WooCommerce Remove Reviews Action Hook
Since WooCommerce product is a custom post type, you can employ an action hook to remove the reviews from WooCommerce. The following code can be added to the functions.php to remove WooCommerce comments/reviews:
/** * WooCommerce remove reviews */ function woocommmerce_njengah_remove_reviews() { remove_post_type_support( 'product', 'comments' ); } add_action( 'init', 'woocommmerce_njengah_remove_reviews' );
How the Code Works
We are using the remove_post_type_support() function that is designed to remove the support of specific features in a custom post type. The features are added in one of the arguments during custom post-type registration.
Wrapping up
Either of these two methods highlighted in this post can be used to remove reviews from WooCommerce.
For a WooCommerce plugin developer, the second option might be useful where you want to have the option to remove reviews enabled by default.
I hope you can now implement this solution on your site but I am always available for further consultation and help with WooCommerce issues.
Joe is an experienced full-stack web developer with a decade of industry experience in the LAMP & MERN stacks, WordPress, WooCommerce, and JavaScript – (diverse portfolio). He has a passion for creating elegant and user-friendly solutions and thrives in collaborative environments. In his spare time, he enjoys exploring new tech trends, tinkering with new tools, and contributing to open-source projects. You can hire me here for your next project.
Similar Articles
- How to Add Product to Cart Programmatically in WooCommerce
- WooCommerce Logout PHP Snippet to Create Logout Button
- How to Get Post ID by Slug in WordPress With a Practical Example
- How to Get Logged In User Information in WordPress
- How to Redirect User If Not Logged in WordPress » Page Redirect
- WooCommerce Get Total Spent By Customer
- How to Fix Checkout Is Not Available Whilst Your Cart Is Empty WooCommerce
- WooCommerce Storefront Theme Create Multiple Category Templates
- How to Create Page In WordPress Programmatically
- How to Create Product Programmatically WooCommerce
- 5 WordPress Pagination Code Snippets with Examples [Simple to Advanced]
- How to Add Description after Price in WooCommerce
- How to Use WooCommerce Save Order Hook
- How to Check If It Is Checkout Page WooCommerce
- How to Get Product Name WooCommerce
- How to Move Description Under Image in WooCommerce
- How to Change Out Of Stock Text in WooCommerce
- How to Remove or Hide Comments from Custom Post Type » Disable Comments in Custom Post Types
- How to Move Email Field to the Top WooCommerce
Comments are closed.