No results found. Try again with different words?

Search must be at least 3 characters.

How to Set the “Review” Tab as the Default Active Tab in WooCommerce

In an e-commerce store powered by WooCommerce, the product page tabs play a crucial role in providing information to potential customers. By default, the “Description” tab is usually set as the active tab when a user lands on a product page.

However, in some cases, you might want to highlight the “Review” tab as the default active tab to encourage customers to read and leave reviews.

In this tutorial, we’ll show you how to achieve this by adding a simple code snippet to your Astra Child Theme’s functions.php file.

How to Set the “Review” Tab as the Default Active Tab in WooCommerce

Before we get started, make sure you have access to your WordPress admin dashboard. Then, follow these steps:

  • Log in to your WordPress admin panel.
  • Navigate to “Appearance” and click on “Theme Editor.”
  • On the right side, you’ll see a list of theme files. Look for your Astra Child Theme’s functions.php file. It should be located in the theme’s directory.
  • Click on the “functions.php” file to open it for editing.
  • Once you have the functions.php file open, you can add the following code snippet at the end of the file.
add_filter( 'woocommerce_product_tabs', 'woo_reorder_tabs', 98 );
function woo_reorder_tabs( $tabs ) {
    $tabs['reviews']['priority'] = 5;           // Reviews first
    $tabs['description']['priority'] = 10;      // Description second
    return $tabs;
}
  • After adding the code snippet, make sure to save your changes. Simply click the “Update File” button at the bottom of the editing window.
How to Set the "Review" Tab as the Default Active Tab in WooCommerce

This code will reorder the product tabs’ priority, making the “Reviews” tab the first tab to be displayed and the “Description” tab the second.

Now that you’ve added and saved the code, you can go to any product page on your WooCommerce store to see the “Review” tab set as the default active tab. This change will encourage customers to read and leave reviews, potentially boosting trust and sales on your site.

How to Set the "Review" Tab as the Default Active Tab in WooCommerce

By following the steps outlined in this document and adding the provided code snippet to your Astra Child Theme’s functions.php file, you can easily make this adjustment.

Your online store will benefit from increased visibility of product reviews, which can lead to higher conversion rates and customer satisfaction.

Note:

We have documentation on how to add custom codes. This document will assist you in better understanding it. Here’s the link https://git-staging.wpastra.com/docs/add-custom-php-code/.

Was this article helpful?
Did not find a solution? We are here to help you succeed.

Related Docs

Astra is Free. Now & Forever.

We believe creating beautiful websites should not be expensive. That's why Astra is free for everyone. Get started for free and extend with affordable packages.

REWIND

YEAR IN REVIEW

Download is Just A Click Away!

Enter your email address and be the first to learn about updates and new features.

Download Free Astra Theme - Modal Popup Form
Scroll to Top
Now choose your preferred
page builder addon
Choose your preferred page builder addon

Download is Just A Click Away!

Enter your email address and be the first to learn about updates and new features.

Download Free Astra Theme - Modal Popup Form