Created
September 19, 2020 08:56
-
-
Save toptools/c12629a60f193e7fc97c7a2553748c0c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Copy from here to your (child) themes functions.php | |
function my_custom_product_tabs_order( $tabs ) { | |
// Double check to make sure the default tabs exist and are not removed at some point. | |
if ( isset( $tabs['description'] ) ) { | |
$tabs['description']['priority'] = 30; | |
} | |
if ( isset( $tabs['additional_information'] ) ) { | |
$tabs['additional_information']['priority'] = 20; | |
} | |
if ( isset( $tabs['reviews'] ) ) { | |
$tabs['reviews']['priority'] = 10; | |
} | |
return $tabs; | |
} | |
add_filter( 'woocommerce_product_tabs', 'my_custom_product_tabs_order' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment