Skip to content

Instantly share code, notes, and snippets.

@woogists
Last active May 31, 2021 13:06
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save woogists/b876d4ec508922765258f3d07e03f1f2 to your computer and use it in GitHub Desktop.
Save woogists/b876d4ec508922765258f3d07e03f1f2 to your computer and use it in GitHub Desktop.
[Frontend Snippets][Editing product data tabs] Customize a tab
/**
* Customize product data tabs
*/
add_filter( 'woocommerce_product_tabs', 'woo_custom_description_tab', 98 );
function woo_custom_description_tab( $tabs ) {
$tabs['description']['callback'] = 'woo_custom_description_tab_content'; // Custom description callback
return $tabs;
}
function woo_custom_description_tab_content() {
echo '<h2>Custom Description</h2>';
echo '<p>Here\'s a custom description</p>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment