Change Product Tabs Order

The good news is that we do not have to deal with sorting arrays like we did with my account menu or admin columns for example.

Each of the tabs has its own priority value:

We can easily display the “Reviews” tab first by changing this parameter with the hook:

add_filter( 'woocommerce_product_tabs', 'misha_change_tabs_order' );
function misha_change_tabs_order( $tabs ) {
	
	$tabs[ 'reviews' ][ 'priority' ] = 5;
	return $tabs;
	
}

As you can see on the screenshot below, this code snippet didn’t only change the tab order but it also redefined which tab is opened by default.

Change product tabs order in WooCommerce

One more thing –  that hook priority in this case must be 98 or below! It is because the array sorting function is also connected to this hook and has 99 priority, so if you set it to 99 or more than 99, the code will have no effect at all.

// it is OK
add_filter( 'woocommerce_product_tabs', 'misha_change_tabs_order', 98 );

// NOT OK
add_filter( 'woocommerce_product_tabs', 'misha_change_tabs_order', 99 );

You may be also interested in how to remove default tabsrename them or even create your own custom tab.

Misha Rudrastyh

Misha Rudrastyh

Hey guys and welcome to my website. For more than 10 years I've been doing my best to share with you some superb WordPress guides and tips for free.

Need some developer help? Contact me

Follow me on Twitter