Add a new page to WooCommerce's My Account area, such as Support or Rewards, with its own menu item and URL.
// 1. Register the endpoint: /my-account/support/.
add_action( 'init', function (): void {
add_rewrite_endpoint( 'support', EP_ROOT | EP_PAGES );
} );
// 2. Add it to the menu, just before Log out.
add_filter( 'woocommerce_account_menu_items', function ( array $items ): array {
$logout = $items['customer-logout'] ?? null;
unset( $items['customer-logout'] );
$items['support'] = 'Support';
if ( $logout ) {
$items['customer-logout'] = $logout;
}
return $items;
} );
// 3. Print the content.
add_action( 'woocommerce_account_support_endpoint', function (): void {
echo '<h2>Support</h2>';
echo '<p>Need help with an order? Email us at <a href="mailto:help@example.com">help@example.com</a> and include your order number.</p>';
} );
// 4. Give the page a title.
add_filter( 'woocommerce_endpoint_support_title', fn () => 'Support' );
Always add PHP to a staging site first, or have FTP or file manager access ready, so you can undo it if something goes wrong.
My Account is where logged-in customers already go, which makes it a good place for support info, loyalty points or custom content. This snippet adds a new tab with its own URL.
An endpoint is the part after /my-account/, like /my-account/orders/. add_rewrite_endpoint() registers a new one called support. The menu filter adds it just above Log out, and WooCommerce automatically calls woocommerce_account_support_endpoint to print its content. The last filter sets the page title.
Replace support in every line with your own endpoint name.
apply_filters( 'the_content', get_post_field( 'post_content', $page_id ) ).Visit Settings → Permalinks and save, then log in as a customer. A Support tab should appear above Log out and open /my-account/support/.