Skip to content

Instantly share code, notes, and snippets.

@OscarAbadFolgueira
Last active March 28, 2019 12:07
Show Gist options
  • Save OscarAbadFolgueira/75a62d480c4beac5eef9 to your computer and use it in GitHub Desktop.
Save OscarAbadFolgueira/75a62d480c4beac5eef9 to your computer and use it in GitHub Desktop.
This WordPress code snippet change de order of the woocommerce product tabs in products pages.
/**
* This WordPress code snippet change de order of the woocommerce product tabs in products pages.
*
* Author: Oscar Abad Folgueira
* Author URI: http://www.oscarabadfolgueira.com
*
* You can copy this snippet and paste in your functions.php or you can build your own plugin.
*/
add_filter( 'woocommerce_product_tabs', 'oaf_wc_change_tabs_order', 20 );
// function that set the order of the tabs.
function oaf_wc_change_tabs_order( $tabs ) {
$tabs['reviews']['priority'] = 5;
$tabs['description']['priority'] = 10;
return $tabs;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment