# Custom "Support" Tab in My Account

> Adds a new Support section to the My Account area with its own URL and content, for help links, a contact form shortcode or FAQs.

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

## Code

```php
$wpide_account_tab = array(
    'endpoint' => 'support',          // URL slug: /my-account/support/
    'label'    => 'Support',          // Menu label.
    'content'  => '<h3>Need help?</h3><p>Email us at help@example.com and we will reply within one business day.</p>',
);

add_action( 'init', function () use ( $wpide_account_tab ) {
    add_rewrite_endpoint( $wpide_account_tab['endpoint'], EP_ROOT | EP_PAGES );
} );

add_filter( 'woocommerce_get_query_vars', function ( $vars ) use ( $wpide_account_tab ) {
    $vars[ $wpide_account_tab['endpoint'] ] = $wpide_account_tab['endpoint'];

    return $vars;
} );

add_filter( 'woocommerce_account_menu_items', function ( $items ) use ( $wpide_account_tab ) {
    $logout = isset( $items['customer-logout'] ) ? $items['customer-logout'] : null;
    unset( $items['customer-logout'] );

    $items[ $wpide_account_tab['endpoint'] ] = $wpide_account_tab['label'];

    if ( $logout ) {
        $items['customer-logout'] = $logout;
    }

    return $items;
} );

add_action( 'woocommerce_account_' . $wpide_account_tab['endpoint'] . '_endpoint', function () use ( $wpide_account_tab ) {
    echo wp_kses_post( do_shortcode( $wpide_account_tab['content'] ) );
} );

add_filter( 'woocommerce_endpoint_' . $wpide_account_tab['endpoint'] . '_title', function () use ( $wpide_account_tab ) {
    return $wpide_account_tab['label'];
} );
```

## Notes

After activating, visit Settings > Permalinks and click Save once so the new URL works. Change $content to your text or a shortcode.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Custom "Support" Tab in My Account" 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/
