Skip to content

Instantly share code, notes, and snippets.

@jameskoster
Last active July 16, 2017 17:30
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jameskoster/5133566 to your computer and use it in GitHub Desktop.
Save jameskoster/5133566 to your computer and use it in GitHub Desktop.
WooCommerce - customise a product tab
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