How to customize the WooCommerce My Account menu
Rename, remove, reorder and add links in the WooCommerce My Account menu, with safe filter code, an external link example and the traps to avoid.
At a glance
A how-to for changing the links in the WooCommerce My Account menu: rename, remove, reorder, add an external link, add a new account page and show links to some customers only. It uses the woocommerce_account_menu_items filter in a child theme or small plugin, lists the default keys, and covers the common traps such as 404s and caching.
Updated November 29, 2026 · For WooCommerce store owners and developers
- For WooCommerce store owners and developers
- Method the woocommerce_account_menu_items filter, no plugin edits
- Where to put code a child theme or a small site plugin
- Test as a real customer login, not an administrator
- New pages need Settings, Permalinks, Save once
- Help WooCommerce specialists can build a custom account area
On this page
- What does the My Account menu actually come from?
- How do I remove or rename a link?
- How do I reorder the menu?
- How do I add a link or a new page?
- What goes wrong most often?
- How do I show a link only to some customers?
- How do I style the menu or add icons?
- What should I test afterwards?
- Worked example: a store that sells only services
- What are the other options?
- FAQ
After a customer logs in, the My Account page shows a menu: Dashboard, Orders, Downloads, Addresses, Account details and Log out. You can rename, remove, reorder or add to those links. Use the `woocommerce_account_menu_items` filter in a child theme or small plugin, and test with a real customer login.
What does the My Account menu actually come from?
WooCommerce builds it from a list of endpoints, each a key and a label, for example orders and "Orders". The same list drives the menu and the sub-pages. Two places control it:
| Where | What it controls | Use it when |
|---|---|---|
| WooCommerce, Settings, Advanced | The URL slug of each account page | You only want a different address, or want an endpoint gone completely |
woocommerce_account_menu_items filter | Which links appear, their labels and their order | You want to rename, remove, reorder or add links |
Back up first if the site is live, and re-save permalinks after changing a slug.
How do I remove or rename a link?
Put the code in a child theme's functions.php or, better, in a small site plugin so it survives a theme change. Never edit the WooCommerce plugin itself, and take a backup before changing a live store.
add_filter( 'woocommerce_account_menu_items', function ( $items ) {
// Hide Downloads on a store that sells only physical goods.
unset( $items['downloads'] );
// Rename a link.
$items['orders'] = __( 'My purchases', 'my-site' );
return $items;
} );The keys you can use by default:
| Key | Default label | Note |
|---|---|---|
dashboard | Dashboard | Landing page of the account |
orders | Orders | Order history |
downloads | Downloads | Needed by anyone who bought a digital product |
edit-address | Addresses | Billing and shipping |
payment-methods | Payment methods | Only when a gateway supports saved methods |
edit-account | Account details | Name, email, password |
customer-logout | Log out | Keep it last |
Removing a link from the menu does not disable the page, so a customer who knows the address can still reach it. If you want an endpoint gone completely, clear its slug in the Advanced settings.
How do I reorder the menu?
Build a new array in the order you want and keep only keys that exist:
add_filter( 'woocommerce_account_menu_items', function ( $items ) {
$order = array( 'dashboard', 'orders', 'edit-account', 'edit-address', 'customer-logout' );
$sorted = array();
foreach ( $order as $key ) {
if ( isset( $items[ $key ] ) ) {
$sorted[ $key ] = $items[ $key ];
}
}
// Keep anything a plugin added that is not in our list.
return $sorted + $items;
} );The final + $items matters. It keeps links added by memberships, subscriptions or wishlist plugins, which a hard-coded list would silently drop.
How do I add a link or a new page?
The simplest custom link points somewhere that already exists, such as a help page. Add a menu item, then tell WooCommerce what URL to use for that key:
add_filter( 'woocommerce_account_menu_items', function ( $items ) {
$logout = $items['customer-logout'] ?? null;
unset( $items['customer-logout'] );
$items['help-centre'] = __( 'Help centre', 'my-site' );
if ( $logout ) {
$items['customer-logout'] = $logout;
}
return $items;
} );
add_filter( 'woocommerce_get_endpoint_url', function ( $url, $endpoint ) {
return 'help-centre' === $endpoint ? 'https://example.com/help/' : $url;
}, 10, 2 );Re-adding the logout link last keeps it at the bottom, where customers expect it. Use esc_url() if the address ever comes from a setting rather than being typed into the code.
A page that lives inside the account area, such as "Support tickets", is a custom endpoint. It needs three pieces: register the endpoint, add the menu item, and print the content.
add_action( 'init', function () {
add_rewrite_endpoint( 'support', EP_ROOT | EP_PAGES );
} );
add_filter( 'woocommerce_account_menu_items', function ( $items ) {
$items['support'] = __( 'Support', 'my-site' );
return $items;
} );
add_action( 'woocommerce_account_support_endpoint', function () {
echo '<p>' . esc_html__( 'Open a ticket and we will reply within one working day.', 'my-site' ) . '</p>';
} );After you add the code, go to Settings, Permalinks and press Save once. Without that, /my-account/support/ returns a 404 because the rewrite rule is not flushed. Do not call flush_rewrite_rules() on every page load; it is slow. Any output you print must be escaped. If the page shows customer data, check the user is logged in and show only their own records.
What goes wrong most often?
| Symptom | Likely cause | Fix |
|---|---|---|
unset() changes nothing | Wrong key, for example download instead of downloads | Print array_keys( $items ) once on a staging site |
| Plugin links vanish | A hard-coded list drops keys added by membership or wishlist plugins | Use filters that preserve unknown keys, as above |
| Menu ignores the filter | The theme copies myaccount/navigation.php with hard-coded links | Make the override print the menu from the filter |
| New page returns 404 | Rewrite rules not flushed | Settings, Permalinks, Save |
| A customer sees another's menu | Account pages are page-cached | Exclude My Account, Cart and Checkout from caching |
How do I show a link only to some customers?
The filter runs for the logged-in user, so you can test their role or data. For example, to show a Wholesale link only to users with a custom role:
add_filter( 'woocommerce_account_menu_items', function ( $items ) {
$user = wp_get_current_user();
if ( in_array( 'wholesale_customer', (array) $user->roles, true ) ) {
$items['wholesale'] = __( 'Wholesale', 'my-site' );
}
return $items;
} );The role name must match one that exists on your site. Remember that hiding a link is not access control. A page that must stay private has to check the user's capability when it renders, because anyone can type the address.
How do I style the menu or add icons?
WooCommerce gives each item a class based on its key, such as woocommerce-MyAccount-navigation-link--orders, and marks the current page with is-active. You can target those in your theme's CSS, for example to add an icon with a ::before rule. Using the existing classes keeps your change small and avoids replacing the template.
What should I test afterwards?
- Log in as a customer
Use a normal customer account, not an administrator, because admins may see differences.
- Click every link
Confirm none returns a 404.
- Check a phone
The menu usually stacks above the content.
- Place a test order
Confirm the Orders page shows it.
- Log out
Use the menu link.
- Reset
Re-save permalinks if you added an endpoint, and clear caches.
Worked example: a store that sells only services
For example, a store sells bookings with no shipping and no downloads. The menu shows Downloads and Addresses that mean nothing to its customers. The owner removes downloads, renames edit-address to "Billing details", adds a link to an existing "Booking help" page, and puts the logout link last. The whole change is about twenty lines in a site plugin, and a customer sees a short, relevant menu instead of a generic one.
What are the other options?
If you do not want to write code, plugins exist that let you edit the account menu from a settings screen. Check how recently they were updated and whether they work with your version of WooCommerce before using one on a live store. Code gives you less to maintain, and a plugin gives you a visual editor.
Redesigns of the account area, checkout and store behaviour.
See WooCommerce experts02Custom developmentAn account dashboard with orders, tickets and downloads in one place.
WordPress development03Store broken?If checkout or accounts stopped working, the help desk can look now.
Help deskDescribe what customers should see and an engineer will scope it.
Why does my new My Account link show a 404 page?
A custom endpoint needs its rewrite rule registered and flushed once. Go to Settings, Permalinks and press Save, or link to an existing page instead of adding an endpoint.
Link to this answerWill this still work if I use the block-based My Account page?
The filter drives the classic My Account menu that the standard shortcode prints. If you rebuilt the page with blocks or a page builder, check that its navigation uses WooCommerce's account menu, and test the change.
Link to this answerCan I show a My Account link only to certain users?
Yes. Test the current user's role or data inside the filter. Hiding a link is not access control, so protect the page itself too.
Link to this answerShould I put this code in functions.php or a plugin?
A small site plugin is better because it survives a theme change. A child theme's functions.php also works. Never edit the WooCommerce plugin itself, since an update would overwrite your change.
Link to this answerHow do I keep the Log out link at the bottom?
Remove it from the items array before adding your own links, then add it back last. The external-link example in this guide shows exactly that pattern, so customers still find Log out where they expect it.
Link to this answerWhy did my unset line do nothing?
Usually the key is wrong. The key is downloads, not download. Print array_keys of the items array once on a staging site to see the exact keys, including any added by membership or subscription plugins.
Link to this answerDo I need code, or is there a plugin for this?
Plugins exist that edit the account menu from a settings screen. Check how recently they were updated and whether they support your WooCommerce version. Code is less to maintain; a plugin gives a visual editor.
Link to this answerCan WP24x7 build a custom account area for my store?
Yes. A heavily customized account area, such as one combining orders, tickets and downloads, is a job for WooCommerce specialists or custom development. Post a project describing what customers should see and you will get a scoped answer.
Link to this answerKeep reading
Want an engineer on it?
Tell us what is wrong in plain words. A person reads it, today.