How to add custom tabs to WooCommerce product pages
WooCommerce does not provide a general custom-tab editor in its core product screen. For one fixed tab, add a small snippet with the woocommerce_product_tabs filter; for multiple product-specific or shared tabs, use a tab plugin.
- 01Decide what the tab contains
- 02Add one tab with code
- 03Place the snippet safely
- 04Check the product layout
- 05Use a plugin for managed tabs
- 06Take the fast route
What you need
- A WooCommerce store with products already set up
- Administrator access to WordPress
- A child theme or code snippets plugin for the manual route
- A staging site or recent backup before changing PHP
Decide what the tab contains
Choose a short label such as Shipping, Size guide, Ingredients, or FAQs. Keep the content focused on information that does not belong in the main description or Additional Information area.
Decide whether the same tab should appear on every product. A fixed site-wide tab is a good fit for a code snippet. Product-specific tabs, shared tabs, category rules, and visual ordering are better handled by a plugin.
Add one tab with code
WooCommerce exposes product-page tabs through the woocommerce_product_tabs filter. Add a new array entry with a title, priority, and content callback, then return the modified tabs array. This example creates a Shipping tab:
function mysite_add_shipping_tab( $tabs ) { $tabs['mysite_shipping'] = array( 'title' => 'Shipping', 'priority' => 50, 'callback' => 'mysite_shipping_tab_content' ); return $tabs; } function mysite_shipping_tab_content() { echo '<h2>Shipping</h2>'; echo '<p>Add your shipping information here.</p>'; } add_filter( 'woocommerce_product_tabs', 'mysite_add_shipping_tab' );
The callback outputs the tab contents. Use a unique prefix instead of mysite, and escape user-supplied values rather than placing untrusted text directly into the output.
Place the snippet safely
Put the code in a child theme’s functions.php file or use a reputable code-snippets plugin. Do not put it directly in a parent theme, because a theme update can overwrite it. Keep a backup or use staging first, since a PHP syntax error can take down the front end or WordPress admin.
If the tab does not appear, check that the snippet is active, the function names match, and the product template has not been replaced by a page builder or theme layout that does not render the normal WooCommerce product tabs.
Check the product layout
Open a product page in an incognito window and confirm the label, order, content, links, and mobile layout. The priority value controls the tab’s position relative to other tabs; lower values normally appear earlier.
Classic themes usually display these sections as tabs. Block themes can use the Product Details block or an accordion layout, so the visual result may differ even when the custom tab is registered correctly. Built-in tabs and custom tabs can also be affected by theme or page-builder templates.
Use a plugin for managed tabs
For several tabs, edit the product and look for a product-tab or tabs panel provided by the plugin. Add a label and content, arrange the tabs, then update the product. For store-wide content such as a returns policy, use a shared or global tab if the plugin provides one; reserve product-level tabs for information that applies to one product.
This route avoids maintaining PHP for every change and is the practical choice when staff need to edit tabs, when different products need different content, or when you want drag-and-drop ordering. WooCommerce’s own Tab Manager documentation describes global tabs, product-level tabs, default layouts, and per-product overrides as separate controls.
Take the fast route
Install and activate WPC Product Tabs for WooCommerce, then configure the tabs from the plugin’s settings and product-editing controls. Create tabs for specifications, FAQs, reviews, shipping, or warranty details, and arrange them with drag-and-drop controls where available.
This is faster than maintaining a custom snippet when you need unlimited tabs, shared defaults, per-product changes, responsive output, or a visual editor. The manual snippet remains fine for one simple tab that rarely changes; use the plugin when tab management is part of your normal product workflow.
Let WPC Product Tabs for WooCommerce do it
Adds unlimited drag-and-drop tabs for specs, FAQs, and reviews; ideal when product descriptions feel cluttered.
Sources
- woocommerce.com /document/editing-product-data-tabs/?utm_source=openai
- woocommerce.com /document/tab-manager/?utm_source=openai
Questions
- Can I add a WooCommerce product tab without a plugin?
- Yes, you can add a fixed custom tab without a plugin by filtering the product tabs array with <code>woocommerce_product_tabs</code> and providing a callback for its content. The drawback is that you must edit PHP to change the label or content, and the tab is not convenient for product-by-product editing. Use a child theme or code-snippets plugin rather than a parent theme file.
- Why is my custom WooCommerce tab not showing?
- A custom tab may not show because the snippet is inactive or contains a PHP error, the function names do not match, or the theme or page builder has replaced the normal WooCommerce product layout. Check the browser’s product page, temporarily disable conflicting customisations, and confirm that the template still renders product tabs. Block themes may show Product Details as an accordion instead of classic tabs.
- How do I add different tabs to different products?
- Use a product-tab plugin with product-level controls, or write custom conditional PHP that checks the current product before adding a tab. A plugin is usually safer for store staff because each product can have its own content without editing code. WooCommerce Tab Manager supports product-level tabs as well as shared global tabs and default layouts.
- Can I create a tab shared across several WooCommerce products?
- Yes, a tab manager can create shared or global tabs and assign them to multiple products, categories, or a default layout. This is useful for shipping, returns, warranty, or care instructions that change in one place. With a manual snippet, the content is normally fixed in code unless you build a separate custom-field system.
- Will custom tabs work with a WooCommerce block theme?
- Custom tabs can be added through the product-tabs filter, but block themes may display product information through the Product Details block or an accordion rather than classic tabs. Edit the Product Details block in the Site Editor when changing built-in items, and check the actual product page because your theme or builder controls the final presentation.