Skip to content

Instantly share code, notes, and snippets.

@woogists
Last active August 19, 2021 09:17
Show Gist options
  • Select an option

  • Save woogists/abb8a37f8c708d712e46ce2d02ffdc43 to your computer and use it in GitHub Desktop.

Select an option

Save woogists/abb8a37f8c708d712e46ce2d02ffdc43 to your computer and use it in GitHub Desktop.
[Frontend Snippets][Editing product data tabs] Reordering product data tabs
/**
* Reorder product data tabs
*/
add_filter( 'woocommerce_product_tabs', 'woo_reorder_tabs', 98 );
function woo_reorder_tabs( $tabs ) {
$tabs['reviews']['priority'] = 5; // Reviews first
$tabs['description']['priority'] = 10; // Description second
$tabs['additional_information']['priority'] = 15; // Additional information third
return $tabs;
}
@betayazilim
Copy link
Copy Markdown

This error happens only if description is empty.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment