Skip to main content
Login Join
Snippet · PHP

Add a Custom Product Tab in WooCommerce

Shared by Amit Dholiya · August 12, 2026 · @woocommerce_product_tabs

13 views
Back to Snippets

WooCommerce allows you to add your own product tabs without editing template files. This is useful for displaying shipping information, warranty details, sizing guides, or other product-specific content.

Steps

  1. Open your theme’s functions.php file.
  2. Add the code below.
  3. Save the file.
  4. Open any WooCommerce product page.

Done — a new Shipping Information tab will appear alongside the default product tabs.

function add_custom_product_tab( $tabs ) {

    $tabs['shipping_info'] = array(
        'title'    => 'Shipping Information',
        'priority' => 25,
        'callback' => 'custom_shipping_tab_content',
    );

    return $tabs;
}

add_filter(
    'woocommerce_product_tabs',
    'add_custom_product_tab'
);

function custom_shipping_tab_content() {

    echo '<h2>Shipping Information</h2>';

    echo '<p>We offer fast and reliable shipping on all orders. 
    Delivery times may vary depending on your location.</p>';
}
Know a different way to do this? Add your approach as a variation so folks can compare them side by side.
Submit a variation

0 comments