Search
Close this search box.

How to Change the Product Page Tab Titles in WooCommerce

WooCommerce product page tabs display important information. Sometimes, you may want to change their titles to suit your needs.

For example, instead of “Description,” you might want to say “Product Details.” Let’s see how you can easily change product page tab titles with some little code.

Code Snippet to Change the Product Page Tab Titles

This code modifies the default tab names on WooCommerce product pages. Here’s what it does:

  1. Changes the “Description” tab to “Product Details.”
  2. Changes the “Reviews” tab to “Customer Reviews.”
  3. Changes the “Additional Information” tab to “More Info.”

By hooking into woocommerce_product_tabs, the code allows you to customize the titles of these tabs to fit your needs.

Copy the code and add it to your functions.php file. Replace the names in the code with what you want.

// Change default product tab names
add_filter('woocommerce_product_tabs', 'custom_woocommerce_product_tabs', 98);

function custom_woocommerce_product_tabs($tabs) {
    // Change the "Description" tab name
    if (isset($tabs['description'])) {
        $tabs['description']['title'] = 'Product Details'; // Change to your desired name
    }

    // Change the "Reviews" tab name
    if (isset($tabs['reviews'])) {
        $tabs['reviews']['title'] = 'Customer Reviews'; // Change to your desired name
    }

    // Change the "Additional Information" tab name
    if (isset($tabs['additional_information'])) {
        $tabs['additional_information']['title'] = 'More Info'; // Change to your desired name
    }

    return $tabs;
}

How to Add the Code Snippet

You should add the code snippet to the functions.php file in your child theme. If you don’t have a child theme, read this guide on How to Create a Child Theme.

Once you have the child theme, follow these steps:

  • Go to your WordPress dashboard.
  • Hover over Appearance and click on Theme File Editor.
screenshot 1 1
  • On the right side, find functions.php and style.css
  • Click on file names to add the code.
theme file editor

Paste the code and click on Update File.

Go to your product page and refresh it. You should see the new tab names displayed.

screenshot 3

Related articles: How to Add Custom Tabs to Single Product Page in WooCommerce (Free)

The code should work as described. If it doesn’t work for you, feel free to leave a comment below. I will try my best to assist you.

Share

Twitter
Facebook
LinkedIn
Reddit
Pinterest

Related Posts

Toufique Alahi

Hi there! I enjoy writing about WooCommerce and sharing my hands-on experiences to help you customize your store easily. I explore WooCommerce features, tips, and tweaks to improve your store's performance. Stick around for helpful tutorials and insights!

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.