WooCommerce Change Order Of Product Tabs


There are no pre-requisites in order for you to be able to implement this solution.

How To Implement This Solution?

Simply copy the pre-coded solution to your active theme’s functions.php or preferably the Code Snippets Plugin.

About this Solution

By default, the first tab is the tab which is opened when the product page is loaded. That means, out of the box, WooCommerce will display the product description as open as this is the first tab. However, if we change the order of the tabs, so that Reviews is first for example, Reviews will show as open. By default, there are three product tabs providing they are populated and enabled which display in the following order: Description, Additional Information, and Reviews. This guide shows you how you can change the order of tabs, and therefore the default opened tab, by changing the priority parameter:

  • Description Tab has a priority parameter of 10
  • Additional Information Tab has a priority parameter of 20
  • Reviews Tab has a priority parameter of 30

So, to change the order, we simply change the priority parameters as necessary. Specifically, this guide shows the Reviews Tab first, the Description Tab second, and the Additional Information Tab last.

 * Snippet Name:	WooCommerce Change Order Of Product Tabs
 * Snippet Author:	ecommercehints.com

add_filter( 'woocommerce_product_tabs', 'ecommercehints_change_product_tabs_order' );
function ecommercehints_change_product_tabs_order($tabs) {
	$tabs['reviews']['priority'] = 10;
	$tabs['additional_information']['priority'] = 20;
	$tabs['description']['priority'] = 30;
	return $tabs;

Snippet Benefits

  • Change the order of the WooCommerce product tabs.
  • Change which WooCommerce product tab is opened by default.
WooCommerce Conversion Rate Optimisation (CRO) eBook
100 WooCommerce Conversion Rate Optimisation Tips

Leave a Reply

If you are going to write code in the comments, please wrap it between code tags.

Your email address will not be published. Required fields are marked *

Other Recent Guides

Subscribe To Emails

Get exclusive WooCommerce tips that I only share with email subscribers

Join hundreds of other subscribers