WooCommerce Product Tabs Generator
Remove, rename or reorder the Description, Additional information and Reviews tabs, and add your own, without a page builder.
Your details
Your snippet
<?php
/**
* Customize the WooCommerce product tabs: remove, rename, reorder and add.
* Priority 98 so this runs after woocommerce_default_product_tabs() (priority 10) has added the built-in tabs.
*/
add_filter( 'woocommerce_product_tabs', 'ea_custom_product_tabs', 98 );
function ea_custom_product_tabs( $tabs ) {
if ( isset( $tabs['description'] ) ) {
$tabs['description']['priority'] = 10;
}
if ( isset( $tabs['additional_information'] ) ) {
$tabs['additional_information']['priority'] = 20;
}
if ( isset( $tabs['reviews'] ) ) {
$tabs['reviews']['priority'] = 30;
}
$tabs['ea_size_guide'] = array(
'title' => 'Size guide',
'priority' => 25,
'callback' => function () {
echo wp_kses_post( '<p>See our size chart for measurements.</p>' );
},
);
return $tabs;
}Reviews only shows when comments are open for the product, and Additional information only shows when the product has attributes, a weight or dimensions, regardless of this filter.
How WooCommerce builds the tabs array
The single product tabs template calls apply_filters( 'woocommerce_product_tabs', array() ), and woocommerce_default_product_tabs() is the function that fills in the three built-in tabs: description (priority 10), additional_information (priority 20, only shown when the product has attributes or dimensions), and reviews (priority 30, only shown when comments are open).
| Tab key | Default priority | Shows when |
|---|---|---|
description | 10 | The product has content in its Description field |
additional_information | 20 | The product has attributes, a weight or dimensions |
reviews | 30 | Reviews are enabled for the product |
This tool builds a filter that removes keys with unset(), changes title and priority on the ones you keep, and appends new entries with a callback that prints your content, sorted by priority before WooCommerce renders them.
Adding tabs
Paste the snippet into a site-specific plugin or your child theme's functions.php, then open a product page and confirm the order and wording. A new tab's content can include basic HTML (it's run through wp_kses_post(), the same filter WooCommerce uses for post content), but not shortcodes unless you add do_shortcode() yourself.
A tab you add here shows on every product. To show a tab only on some products (like a size guide only on clothing), wrap the tab's array entry in a condition using the global $product inside your callback, or filter it out for other categories with has_term().
Questions people ask
Why doesn't my removed tab disappear?
Make sure the filter runs at a priority of 98 or later (this snippet uses 98), so it runs after woocommerce_default_product_tabs() (attached at the default priority 10) has already added the tab you're trying to remove.
Can I reorder tabs without removing or renaming them?
Yes, just change the priority numbers. WooCommerce sorts the tabs array by priority before rendering, so a tab set to priority 5 shows before one at priority 10.
Can a new tab show a shortcode, like a size chart plugin?
Yes. In the callback, wrap your content in echo do_shortcode( '[your_shortcode]' ) instead of printing plain text.
Does this work with block themes and the Product Gallery/Details blocks?
It changes the classic tabs output on the single product template. If your theme uses the newer block-based Product Details block instead of the classic template, that block renders tabs from block content, not this filter.
Related tools
Last reviewed 30 September 2026.
Sources: WooCommerce source: wc-template-functions.php · WooCommerce Code Reference: Hooks
