WooCommerce’s My Account page works, but it rarely fits the store: “Downloads” on a store with no downloads, “Addresses” when you only sell services, and nowhere to put the things your customers actually come back for, like licenses or bookings. All of this can be changed with a few WooCommerce hooks.
Before you start
- A way to add PHP snippetsChild theme, must-use plugin or a snippets plugin
- WooCommerce 7.0 or newerTested on WooCommerce 11.3
- A test customer accountTo check each change as a customer sees it
Rename, reorder or remove menu items
Every item in the My Account menu comes from the woocommerce_account_menu_items filter, as a list of endpoint keys and labels. Our snippet shows all three changes:
The keys WooCommerce uses are dashboard, orders, downloads, edit-address, payment-methods, edit-account and customer-logout. Removing an item hides it from the menu. To stop people reaching the page by address too, turn its endpoint off under WooCommerce → Settings → Advanced → Account endpoints by clearing its field.
Add your own tab
Here is a complete “Licenses” tab. Change licenses and the text to suit your store.
Register the endpoint and menu item
// 1. Tell WooCommerce about the new endpoint (it registers the URL for you). add_filter( 'woocommerce_get_query_vars', function ( array $vars ): array { $vars['licenses'] = 'licenses'; return $vars; } ); // 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['licenses'] = __( 'Licenses', 'your-text-domain' ); if ( $logout ) { $items['customer-logout'] = $logout; } return $items; } ); // 3. The page title shown above the tab's content. add_filter( 'woocommerce_endpoint_licenses_title', function (): string { return __( 'Your licenses', 'your-text-domain' ); } );Tested on WordPress 7.1 · PHP 8.3Print the tab’s content
WooCommerce runs
woocommerce_account_{endpoint}_endpointwhen the tab is open. Print anything you like there: a shortcode, a list from your own table, or a message.add_action( 'woocommerce_account_licenses_endpoint', function (): void { $licenses = get_user_meta( get_current_user_id(), 'my_store_licenses', true ); if ( empty( $licenses ) || ! is_array( $licenses ) ) { echo '<p>' . esc_html__( 'You have no licenses yet.', 'your-text-domain' ) . '</p>'; return; } echo '<ul class="my-licenses">'; foreach ( $licenses as $key ) { echo '<li><code>' . esc_html( $key ) . '</code></li>'; } echo '</ul>'; } );Tested on WordPress 7.1 · PHP 8.3Always escape what you print (
esc_html(),esc_url()), even data from your own database.Save permalinks once
Go to Settings → Permalinks and click Save Changes without changing anything. WordPress rebuilds its address rules and learns about
/my-account/licenses/.
Logged in as your test customer, My Account shows a “Licenses” item above “Log out”. Clicking it opens /my-account/licenses/ with the title “Your licenses”.
The new tab shows a 404 or the dashboard3 common fixes
- 404 page. Permalinks weren’t saved after adding the endpoint. Save them again.
- It shows the dashboard instead. The key in
woocommerce_get_query_varsand the action name must match exactly:licensesandwoocommerce_account_licenses_endpoint. - The menu item is missing. Another plugin may filter the menu later. Give your filter a higher priority, such as
20.
Send customers to the right page after login
By default, customers land on the account dashboard. If most of them come back for one thing, send them straight there:
When a plugin makes more sense
Hooks are perfect for a renamed item or one extra tab. If you want a branded, full-page portal with a custom dashboard, order tracking and a mobile tab bar, building it by hand quickly becomes a project of its own. That’s the job we built WC Account Portal for.
Summary
Use woocommerce_account_menu_items to rename, reorder and remove items. Add a tab with a query var, a menu item and an endpoint action, then save permalinks. Escape everything you print, and test as a real customer.
Check your understanding
Was this helpful?
Sorry about that. What was missing?
Thanks for your feedback!

