0

I found and implemented the following code. I need the Additional Information to display BEFORE the Product Description content. I have been looking through posts for hours with no luck.

add_filter( 'woocommerce_product_tabs', function( $tabs ) {
unset( $tabs['additional_information'] );
return $tabs;
}, 98 );

add_filter( 'woocommerce_product_tabs', function( $tabs ) {
$tabs['description']['callback'] = function() {
    global $product;
    wc_get_template( 'single-product/tabs/description.php' );
    if ( $product && ( $product->has_attributes() || apply_filters(
'wc_product_enable_dimensions_display', $product->has_weight() || $product->has_dimensions() ) ) ) 
        wc_get_template( 'single-product/tabs/additional-information.php' );
    }
};
return $tabs;
}, 98 );
0

Literally just swap the order of them in the code:

add_filter( 'woocommerce_product_tabs', function( $tabs ) {
$tabs['description']['callback'] = function() {
    global $product;
    if ( $product && ( $product->has_attributes() || apply_filters(
'wc_product_enable_dimensions_display', $product->has_weight() || $product->has_dimensions() ) ) ) 
        wc_get_template( 'single-product/tabs/additional-information.php' );
    }
    wc_get_template( 'single-product/tabs/description.php' );
};
return $tabs;
}, 98 );
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.