New Landing How can we help? Themeforest Theme Support Neighborhood Renaming the Description Tab

Viewing 6 posts - 1 through 6 (of 6 total)
  • #59176
    buzzcreations
    Member
    Post count: 11

    Hi there,

    I hope this is an easy one – have just spent 20mins searching the forum and cant find an answer.

    I would like to change the word “description’ on the Description tab. I have inserted the below code into my functions.php file.

    /* RENAME TABS================================================== */
    add_filter( ‘woocommerce_product_tabs’, ‘woo_rename_tabs’, 98 );
    function woo_rename_tabs( $tabs ) {

    $tabs[‘description’][‘title’] = __( ‘More Information’ ); // Rename the description tab
    $tabs[‘reviews’][‘title’] = __( ‘Ratings’ ); // Rename the reviews tab
    $tabs[‘additional_information’][‘title’] = __( ‘Product Data’ ); // Rename the additional information tab

    return $tabs;

    }

    BUT i get an error on the front-end inside that tab saying:

    “Warning: call_user_func() [function.call-user-func]: First argument is expected to be a valid callback in /home/peacho/public_html/wp-content/themes/neighborhood/woocommerce/single-product/tabs/tabs.php on line 35”

    Hope someone can help 🙂

    #59177
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please use this code

    add_filter( ‘woocommerce_product_tabs’, ‘woo_rename_tabs’, 98 );
    function woo_rename_tabs( $tabs ) {
    global $product; 
    $tabs['description']['title'] = __( ‘More Information’ ); 
    $tabs['reviews']['title'] = __( ‘Ratings’ ); 
    if( $product->has_attributes() || $product->has_dimensions() || $product->has_weight() ) { 
    $tabs['additional_information']['title'] = __( ‘Product Data’ ); 
    }
    return $tabs;
    
    }
    

    Hope it should work 100% .

    Thanks 🙂
    With Best Regards
    Swift Ideas

    #59187
    buzzcreations
    Member
    Post count: 11

    mm, that broke my site:

    Parse error: syntax error, unexpected T_STRING in /home/——/public_html/wp-content/themes/neighborhood/functions.php on line 1629

    #59190
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please remove code there through FTP software or CPANEL and Use code from here http://pastebin.com/H8RCyR0g because some wrong character copied .

    With Best Regards
    Swift Ideas

    #59191
    buzzcreations
    Member
    Post count: 11

    Thanks, but im back at step one again – error inside tab on front-end 🙁

    #59193
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please share website URL so i can check this .
    Thanks

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register