Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sakilimran/6d04d1f55c8028bd500a69c01686cf1d to your computer and use it in GitHub Desktop.
Save sakilimran/6d04d1f55c8028bd500a69c01686cf1d to your computer and use it in GitHub Desktop.
<?php
// Reorder single product page tabs
add_filter( 'woocommerce_product_tabs', 'woo_reorder_tabs', 98 );
function woo_reorder_tabs( $tabs ) {
if($tabs['description']){ $tabs['description']['priority'] = 1; } // Description first
if($tabs['additional_information']){ $tabs['additional_information']['priority'] = 2; } // Additional information second
if($tabs['reviews']){ $tabs['reviews']['priority'] = 3; } // Reviews third
return $tabs;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment