Viewing 1 reply thread
You must be logged in to reply to this topic.
Dear Support,
On our website with variable products we display much information about the products. Some variable products contain 20 to (in extreme cases) 100 products. This makes the table very long. It would be much better for us if the information in the table would correspond to the currently selected variation of the variable product. The other information should then be hidden. Is it possible to do something like this?
We are talking about the Additional information table on this page of the example. This one shows all sizes, but we would like to show only the selected size.
In this article you can find something that can help you.
Try to add this function:
/**
* Check if product has attributes, dimensions or weight to override the call_user_func() expects parameter 1 to be a valid callback error when changing the additional tab
*/
add_filter( 'woocommerce_product_tabs', 'woo_rename_tabs', 98 );
function woo_rename_tabs( $tabs ) {
global $product;
if( $product->has_attributes() || $product->has_dimensions() || $product->has_weight() ) { // Check if product has attributes, dimensions or weight
$tabs['additional_information']['title'] = __( 'Product Data' ); // Rename the additional information tab
}
return $tabs;
}
Regards!
You must be logged in to reply to this topic.