almost 10 years ago
If you want to reorder product tabs, you can do this according to you wish as you want, just add the below code to your function.php.
- <?php
- add_filter( 'woocommerce_product_tabs', 'FindNerd_woo_reorder_tabs', 90 );
- function FindNerd_woo_reorder_tabs( $woo_tabs ) {
- $woo_tabs['reviews']['priority'] = 10; // Reviews first
- $woo_tabs['description']['priority'] = 15; // Description second
- $woo_tabs['additional_information']['priority'] = 20; // Additional information third
- return $woo_tabs;
- } ?>
<?php add_filter( 'woocommerce_product_tabs', 'FindNerd_woo_reorder_tabs', 90 ); function FindNerd_woo_reorder_tabs( $woo_tabs ) { $woo_tabs['reviews']['priority'] = 10; // Reviews first $woo_tabs['description']['priority'] = 15; // Description second $woo_tabs['additional_information']['priority'] = 20; // Additional information third return $woo_tabs; } ?>
In above code I have used filter hook (add_filter) to reorder product tabs contents.
Also here we have set first priority to review, second to description and third priority to additional information , but you can set priority according to your need.
0 Comment(s)