# Add a "Shipping & Returns" Product Tab

> Adds a tab with the same shipping and returns information to every product page, next to Description and Reviews.

- Type: PHP
- Runs: Run everywhere
- Category: [WooCommerce](https://wpide.com/library/category/woocommerce/)
- Requires: WooCommerce
- Tags: woocommerce, product-page, tabs
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/woo-custom-product-tab/

## Code

```php
add_filter( 'woocommerce_product_tabs', function ( $tabs ) {
    $title   = 'Shipping & Returns';
    $content = '<p>Orders ship within 2 business days. Returns are free within 30 days of delivery.</p>';

    $tabs['wpide_shipping_returns'] = array(
        'title'    => $title,
        'priority' => 25,
        'callback' => function () use ( $title, $content ) {
            echo '<h2>' . esc_html( $title ) . '</h2>';
            echo wp_kses_post( do_shortcode( $content ) );
        },
    );

    return $tabs;
} );
```

## Notes

Edit $title and $content. HTML and shortcodes are allowed in the content.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Add a "Shipping & Returns" Product Tab" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
