New Landing How can we help? Themeforest Theme Support Neighborhood Issue with theme tabs on product page – error

Viewing 4 posts - 1 through 4 (of 4 total)
  • #251027
    MarieWorks
    Member
    Post count: 225

    Issue with product tabs on product pages.

    Not sure whats going on but we need to get it fixed pronto as looks very unprofessional.

    Note we have the below code running in the child theme functions php file:

    <?php
    add_filter( 'woocommerce_product_tabs', 'woo_rename_tabs', 98 );
    function woo_rename_tabs( $tabs ) {
    
    	$tabs['description']['title'] = __( 'More Information' );		// Rename the description tab
    	$tabs['additional_information']['title'] = __( 'Dimensions and Care' );	// Rename the additional information tab
    
    	return $tabs;
    
    }

    Many thanks,

    Chris

    Attachments:
    You must be logged in to view attached files.
    #251087
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please remove your code for tabs and use this code:-

    add_filter( 'woocommerce_product_tabs', 'woo_rename_tabs', 98 );
    
    function woo_rename_tabs( $tabs ) {
    
    	global $product;
    
    $tabs['description']['title'] = __( 'More Information' );		// Rename the description tab
    	
    	
    	if( $product->has_attributes() || $product->has_dimensions() || $product->has_weight() ) { // Check if product has attributes, dimensions or weight
    		
    
    $tabs['additional_information']['title'] = __( 'Dimensions and Care' );	// Rename the additional information tab
    	}
     
    	return $tabs;
     
    }
    

    Thanks
    Mohammad

    #251129
    MarieWorks
    Member
    Post count: 225

    Hi Mohammad

    Not sure that will work – we use custom attribute for Dimensions details, not the standard woocommerce dimensions (shown under product item shipping tab)

    #251140
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    It will work sure.
    Thanks
    Mohammad

Viewing 4 posts - 1 through 4 (of 4 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