I am trying to merge the additional information tab with the description tab in WooCommerce.
The intention is to display information from both tabs side-by-side in a
Here is another option if you want the data in the tabs to be displayed sequentially instead of in two column format as answered above by LoicTheAztec. Below is the code drawing on the code in LoicTheAztec's answer
// Manipulating product tabs
add_filter('woocommerce_product_tabs', 'change_product_tab', 98);
function change_product_tab($tabs){
global $product;
// Save the tabs to keep
$reviews = $tabs['reviews'];
// Remove tabs
unset($tabs['description']);
unset($tabs['additional_information']);
unset($tabs['reviews']);
// Add a new tab
$tabs['other_details'] = array(
'title' => __( 'Details', 'woocommerce' ),
'priority' => 10,
'callback' => 'other_details_tab_content'
);
// Set the good priority to existing "reviews" tab
$reviews['priority'] = 20;
// Add back "reviews" tab
$tabs['reviews'] = $reviews;
return $tabs;
}
// Tab content
function other_details_tab_content() {
global $product;
$heading = esc_html( apply_filters( 'woocommerce_product_description_heading', __( 'Description', 'woocommerce' ) ) );
$heading2 = esc_html( apply_filters( 'woocommerce_product_additional_information_heading', __( 'Additional information', 'woocommerce' ) ) );
?>
"; ?>
";
?>
You can also refer to the link here: https://docs.woocommerce.com/document/editing-product-data-tabs/