Re-arrange product page tabs

Q: The default product page layout in JigoShop has the tabs as follows: Related Products, Description, Reviews. I’d like the Description to be visible by default instead of the Related Products. In fact I’d like it as the first tab. How can I achieve this?

A: Change the theme function (example for Sommerce theme functions-theme.php):

Find:
if ( yiw_if_related() )

  $current_tab = '#related-products';

elseif ( get_the_content() != '' )

  $current_tab = '#tab-description';

elseif ( comments_open() )

  $current_tab = '#tab-reviews';

elseif ( $_product->has_attributes() )

  $current_tab = '#tab-attributes';

Replace with:
if ( get_the_content() != '' )

  $current_tab = '#tab-description';

elseif ( yiw_if_related() )

  $current_tab = '#related-products';

elseif ( comments_open() )

  $current_tab = '#tab-reviews';

elseif ( $_product->has_attributes() )

  $current_tab = '#tab-attributes';

Then Find:
add_action( 'jigoshop_product_tab_panels', 'jigoshop_related_products_panel', 1 ); add_action( 'jigoshop_product_tabs', 'yiw_related_products_tab', 1 );

Replace with:
add_action( 'jigoshop_product_tab_panels', 'jigoshop_related_products_panel', 10 ); add_action( 'jigoshop_product_tabs', 'yiw_related_products_tab', 10 );