• Resolved alexdex

    (@alexdex)


    Hi, there is a function for renaming the Tab Brand on the single product page?
    Please help me

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter alexdex

    (@alexdex)

    Somebody can help?

    shtryklio

    (@shtryklio)

    In functions.php add:

    add_filter( 'woocommerce_product_tabs', 'woo_remove_product_tabs', 98 );
    function woo_remove_product_tabs( $tabs ) {
    
    	$tabs['pwb_tab']['title'] = __( 'Your text here!' );
    
    	return $tabs;
    }

    Depending on plugin you’ll have to change ‘pwb_tab’ to correct one, as shown in page source.

    Thread Starter alexdex

    (@alexdex)

    Great, i will test it tomorrow, thank you so much

    Thread Starter alexdex

    (@alexdex)

    Hi, unfortunately is not working. I tried many combinations, clear the cache, tried in incognito, no luck

    Here is the page source code of the tab

    </div></div><div class="wc-tabs-section"><div class="container"><div class="row"><div class="col-sm-12">
    	<div class="woocommerce-tabs wc-tabs-wrapper">
    		<ul class="tabs wc-tabs" role="tablist">
    							<li class="description_tab" id="tab-title-description" role="tab" aria-controls="tab-description">
    					<a href="#tab-description">
    						Description					</a>
    				</li>
    							<li class="pwb_tab_tab" id="tab-title-pwb_tab" role="tab" aria-controls="tab-pwb_tab">
    					<a href="#tab-pwb_tab">
    						Brand					</a>
    				</li>
    							<li class="additional_information_tab" id="tab-title-additional_information" role="tab" aria-controls="tab-additional_information">
    					<a href="#tab-additional_information">
    						Additional information					</a>
    				</li>
    					</ul>

    Please let me know

    shtryklio

    (@shtryklio)

    Did you make your changes trough: Theme -> Theme File Editor -> functions.php – on current theme?

    Thread Starter alexdex

    (@alexdex)

    Yes, I did the edits in the function php of the child theme

    shtryklio

    (@shtryklio)

    Try this one, just for renaming.

    /**
     * Rename product data tabs
     */
    add_filter( 'woocommerce_product_tabs', 'woo_rename_tabs', 98 );
    function woo_rename_tabs( $tabs ) {
    
            $tabs['pwb_tab']['title'] = __( 'Your Text Here!' );
    
    	$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;
    
    }
    • This reply was modified 3 years ago by shtryklio.
    Thread Starter alexdex

    (@alexdex)

    It is working in the function of the main template, not on the child

    Thank you so much

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Rename Product Tab’ is closed to new replies.