Change the default text/name of single product page tabs

This topic has 21 replies, 4 voices, and was last updated 2 years, 7 months ago ago by Rose Tyler

  • Avatar: densitysk
    densitysk
    Participant
    April 21, 2022 at 08:01

    Hi,

    is it somehow possible in this theme to simply change the text of the default product page tabs to a different one?

    For example I want to rename “Additional Information” to “Specifications”

    Attached the screenshot:

    https://ibb.co/JkMKJ75

    Kind regards
    Michal

    20 Answers
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    April 21, 2022 at 10:20

    Hello,

    Please read this article https://woocommerce.com/document/editing-product-data-tabs/

    Regards

    Avatar: densitysk
    densitysk
    Participant
    April 21, 2022 at 18:29

    thank you. That will definitely help.

    But these mention only the default tabs. Can you please let me know, how to add a line for the custom tabs created with your theme?

    Renaming is easy, because I set the name of the tab when creating it. But when I want to change the order, I need to know how it is called in the theme.

    For example I have created a custom tab called “Processing Time” and I would like to rearrange it to be on top of all tabs.

    https://ibb.co/J2Xj7sX

    Do you think the code below from Woocommerce help pages will work on this custom tab?

    /**
    * Reorder product data tabs
    */
    add_filter( ‘woocommerce_product_tabs’, ‘woo_reorder_tabs’, 98 );
    function woo_reorder_tabs( $tabs ) {

    $tabs[‘processing_time’][‘priority’] = 5; // Processing first
    $tabs[‘description’][‘priority’] = 10; // Description second
    $tabs[‘additional_information’][‘priority’] = 15; // Additional information third
    $tabs[‘reviews’][‘priority’] = 20; // Reviews fourth

    return $tabs;
    }

    Avatar: densitysk
    densitysk
    Participant
    April 22, 2022 at 09:36

    one note is, that when I tried just to rename the default tabs based on the woocommerce tutorial, I get fatal errors from your theme

    I have used the following snippet in my child theme functions.php

    /**
    * Rename product data tabs
    */
    add_filter( ‘woocommerce_product_tabs’, ‘woo_rename_tabs’, 98 );
    function woo_rename_tabs( $tabs ) {

    $tabs[‘additional_information’][‘title’] = __( ‘Specifications’ ); // Rename the additional information tab

    return $tabs;

    }

    Please contact administrator
    for this information.
    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    April 22, 2022 at 14:26

    Hello,

    Provide us with WP Dashboard and FTP access to your site to check the code and help you.

    Regards

    Avatar: densitysk
    densitysk
    Participant
    April 23, 2022 at 09:13

    Hi,

    kindly check PM. Limited access to FTP THemes directory and limited admin privileges to backend to theme and settings related areas.

    Please contact administrator
    for this information.
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    April 23, 2022 at 12:19

    Hello,

    I’ve passed your question to one of our developers. I will let you know once get an answer. Our developers team will be back at work after the weekend. Please be patient.

    Regards

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    April 25, 2022 at 14:41

    Hello,

    Changes were done in /xstore-child/woocommerce/single-product/tabs/tabs.php , clear cache, and check now.

    Regards

    Avatar: densitysk
    densitysk
    Participant
    April 25, 2022 at 15:45

    thank you. I will check and let you know if I find any weird behavior.

    Have a nice day.

    Greetings from Slovakia
    Michal

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    April 25, 2022 at 16:02

    You’re welcome! Have a nice day!

    Regards

    Avatar: densitysk
    densitysk
    Participant
    April 28, 2022 at 17:08

    unfortunately there are still a lot of fatal errors resulting from the tabs.php snippet that you have added. Today I even had to login via recovery mode into my backend of the website.

    can you please check?

    Kind regards
    Michal

    Please contact administrator
    for this information.
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    April 29, 2022 at 10:05

    Hello,

    1/ Changing the title of tab works as it should ( https://prnt.sc/Uk2AJfsxSV2l -> https://prnt.sc/Gf5oj5aT62yx )
    2/ Login to wp dashboard does not work -> https://prnt.sc/GQHX7ZafGYDj
    3/ Previously we made changes in xstore-child/woocommerce/single-product/tabs/tabs.php to make positions of custom tabs changed (moved above others) – but we could not check because
    3.1/ we cannot find product with custom tabs
    3.2/ edit any product is not possible due to the limited access of admin user you provided.

    Could you please, write what questions do you still have and provide link for product with custom tabs to check their positions (if the fix does not work still)?

    Regards

    Avatar: densitysk
    densitysk
    Participant
    April 29, 2022 at 16:09

    Hi,

    sorry. Now the geoblocking is temporarily disabled and you can log in.

    As you can see in the error message in the PM area, there is a fatal error specifically refering to the tabs.php file that you have previously changed. Maybe there is just some small error in there

    only thing that I have changed is to rename “additional information” to “specifications”. I have not yet played around with the order of the tabs since just the name change is showing fatal errors.

    Editing of the products should be possible once you log into the admin

    Please contact administrator
    for this information.
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    April 30, 2022 at 07:40

    Hello,

    Thanks for the reply.
    Our developers team will be back at work after the weekend. Please be patient.
    Where exactly do you see mentioned errors?
    Provide URL of product with custom tabs.

    Regards

    Avatar: densitysk
    densitysk
    Participant
    April 30, 2022 at 20:54

    Understood. no rush.

    I see the fatal errors in the regular Woocommerce logs>
    https://ibb.co/ZVDk2tB

    Here is a product that has an additional custom tab added called “processing time”

    https://www.density.sk/product/cerberus/
    Screenshot here
    https://ibb.co/Wzct1Bj

    Avatar: Niddy
    Niddy
    Participant
    May 1, 2022 at 00:29

    Hi

    Not sure if you seen but I created a post with the easiest way to sort & rename tabs once they’re created here -> https://www.8theme.com/topic/fix-for-product-tabs-and-renaming-them-using-functions-and-css/

    I’ve successfully added and renamed many tabs to the sites we look after using the functions as shown.

    Good luck.

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    May 1, 2022 at 07:11

    Hello,

    Thanks for understanding, screenshots, and link

    Regards

    Avatar: densitysk
    densitysk
    Participant
    May 4, 2022 at 17:59

    Hi there!
    do you have an update for the current issue? I have noticed, that someone from your support staff has logged into my website and has deleted the error logs.

    Should I consider this issue fixed?

    Regards
    Michal

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    May 5, 2022 at 06:29

    Hello,

    Yes, please, check now! We fixed php notices. We fixed first active tab (in case product has custom tab it is shown above all and it is active)

    Regards

    Avatar: densitysk
    densitysk
    Participant
    May 5, 2022 at 07:08

    thank you very much. I appreciate it.

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    May 5, 2022 at 07:43

    You’re welcome!

    Regards

  • Viewing 21 results - 1 through 21 (of 21 total)

The issue related to '‘Change the default text/name of single product page tabs’' has been successfully resolved, and the topic is now closed for further responses

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.