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
- Open your theme’s
functions.phpfile. - Add the code below.
- Save the file.
- 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>';
}