By default, the tabs from a WooCommerce product page are being ordered automatically by the plugin itself. In order to update the order of the tabs simply use the following code:

/**
* This function will allow you to customize the order of the tabs on WooCommerce product pages.
* Change the priority values to change the order of the tabs.
* Lower number means higher position in the order.
**/
function modeltheme_reorder_tabs_product_page( $tabs ) {
  $tabs['description']['priority'] = 5;
  $tabs['additional_information']['priority'] = 10;
  $tabs['reviews']['priority'] = 15;

  return $tabs;
}
add_filter( 'woocommerce_product_tabs', 'modeltheme_reorder_tabs_product_page', 98 );

How to integrate this code snippet in my WooCommerce store?

  • Upload the snippet to the functions.php of your child theme (install the child theme if it is not installed yet).
  • Modify the values for the priority for each tab to change the order of the tabs.

Was this post helpful?

Tags: , ,