How7o
  • Home
  • Tools
  • Prank Screens
  • Learn
  • Blog
  • Contact
Reading: How to Rename Menu Items on the WooCommerce My Account Page
Share
How7oHow7o
Font ResizerAa
  • OS
Search
  • Home
  • Tools
  • Prank Screens
  • Learn
  • Blog
  • Contact
Follow US
© 2024–2026 How7o. All rights reserved.
How7o > Free Laravel, PHP, WordPress & Server Tutorials > Web Development > How to Rename Menu Items on the WooCommerce My Account Page
Web Development

How to Rename Menu Items on the WooCommerce My Account Page

how7o
By how7o
Last updated: May 22, 2026
4 Min Read
Rename menu items on the WooCommerce My Account page
SHARE

To rename a menu item on the WooCommerce “My Account” page, hook the woocommerce_account_menu_items filter and replace the label by its key. The example below renames the “Coupons” item (used by WooCommerce Smart Coupons) to “Gift Cards” — the same pattern works for any menu item by changing the key.

Contents
  • The filter
  • The built-in menu item keys
  • Rename multiple items at once
  • Reorder or remove items
  • Frequently asked questions
  • Related guides
  • References

Last verified: 2026-05-17 on WooCommerce 9.0 + WordPress 6.5. Originally published 2024-03-23, rewritten and updated 2026-05-17.

The filter

add_filter( 'woocommerce_account_menu_items', function ( $items ) {
    if ( isset( $items['wc-smart-coupons'] ) ) {
        $items['wc-smart-coupons'] = __( 'Gift Cards', 'your-textdomain' );
    }
    return $items;
}, 99 );

Put this in your child theme’s functions.php or in a small site-specific plugin. The filter runs every time WooCommerce builds the account-menu sidebar.

WooCommerce My Account menu — rename via filter, default keys, reorder, remove

The built-in menu item keys

  • 'dashboard' → “Dashboard”
  • 'orders' → “Orders”
  • 'downloads' → “Downloads”
  • 'edit-address' → “Addresses”
  • 'payment-methods' → “Payment methods”
  • 'edit-account' → “Account details”
  • 'customer-logout' → “Log out”

Third-party plugins add their own keys — Smart Coupons uses 'wc-smart-coupons', Subscriptions adds 'subscriptions', etc. Dump the array once to see what’s available on your site:

add_filter( 'woocommerce_account_menu_items', function ( $items ) {
    error_log( print_r( $items, true ) );
    return $items;
}, 1 );

Rename multiple items at once

add_filter( 'woocommerce_account_menu_items', function ( $items ) {
    $rename = [
        'orders'          => __( 'My Orders',    'your-textdomain' ),
        'edit-account'    => __( 'Profile',      'your-textdomain' ),
        'customer-logout' => __( 'Sign Out',     'your-textdomain' ),
    ];

    foreach ( $rename as $key => $label ) {
        if ( isset( $items[ $key ] ) ) {
            $items[ $key ] = $label;
        }
    }
    return $items;
}, 99 );

Reorder or remove items

// Reorder
add_filter( 'woocommerce_account_menu_items', function ( $items ) {
    return [
        'orders'          => $items['orders'],
        'downloads'       => $items['downloads'],
        'edit-account'    => $items['edit-account'],
        'edit-address'    => $items['edit-address'],
        'customer-logout' => $items['customer-logout'],
    ];
}, 99 );

// Remove
add_filter( 'woocommerce_account_menu_items', function ( $items ) {
    unset( $items['downloads'] );
    return $items;
}, 99 );

Frequently asked questions

How do I find a menu item’s key?

Hook woocommerce_account_menu_items once and var_dump($items) to see the array. The keys are stable identifiers like 'dashboard', 'orders', 'downloads', 'edit-address', 'edit-account', 'customer-logout'. Third-party plugins add their own keys (Smart Coupons uses 'wc-smart-coupons').

How do I reorder the menu items, not just rename them?

Build a new array in your desired order: add_filter('woocommerce_account_menu_items', fn($items) => ['orders' => $items['orders'], 'downloads' => $items['downloads'], 'edit-account' => $items['edit-account'], 'customer-logout' => $items['customer-logout']]). PHP arrays preserve insertion order, so the new ordering is what WooCommerce renders.

How do I remove an item entirely?

unset($items['downloads']); inside the same filter. WooCommerce skips missing keys gracefully — the endpoint still works if someone visits the URL directly, but the link doesn’t appear in the menu.

What does the 99, 1 at the end of add_filter do?

Priority and argument count. 99 is the filter priority (higher = runs later, so this overrides earlier filters from other plugins). 1 is the number of arguments to pass to the callback. WordPress’s default is 10, 1; setting 99 is a defensive choice to win against plugins that add filters at priority 10.

Related guides

  • How to Display Orders Instead of Dashboard on the My Account Page
  • How to Add a Link After the Login Form in My Account
  • How to Remove Checkout Fields in WooCommerce

References

WooCommerce woocommerce_account_menu_items hook: woocommerce.com/document/editing-account-endpoints. WordPress add_filter(): developer.wordpress.org/reference/functions/add_filter.

TAGGED:phpWooCommercewordpress

Sign Up For Daily Newsletter

Be keep up! Get the latest breaking news delivered straight to your inbox.
[mc4wp_form]
By signing up, you agree to our Terms of Use and acknowledge the data practices in our Privacy Policy. You may unsubscribe at any time.
Share This Article
Facebook Copy Link Print
Previous Article Remove unwanted characters from a PHP string with regex How to Remove Unwanted Characters from a String in PHP
Next Article Replace strings in a MySQL database with UPDATE and REPLACE() How to Replace Strings in a MySQL Database
Leave a Comment

Leave a Reply Cancel reply

You must be logged in to post a comment.

FacebookLike
XFollow
PinterestPin
InstagramFollow
Most Popular
Run a Linux cron job as a non-root user
How to Run a Cron Job as a Non-Root User
May 22, 2026
Reset the LiteSpeed WebAdmin Console password
How to Reset the LiteSpeed WebAdmin Console Password
May 22, 2026
Replace strings in a MySQL database with UPDATE and REPLACE()
How to Replace Strings in a MySQL Database
May 22, 2026
Rename menu items on the WooCommerce My Account page
How to Rename Menu Items on the WooCommerce My Account Page
May 22, 2026
Remove unwanted characters from a PHP string with regex
How to Remove Unwanted Characters from a String in PHP
May 22, 2026

You Might Also Like

PHP merge arrays without duplicates — union operator and array_unique
Web Development

How to Combine Two Arrays Without Duplicates in PHP

7 Min Read
JavaScript check Unicode character — regex, codePointAt, Unicode property escape
Web Development

How to Check if a JavaScript String Contains a Unicode Character

38 Min Read
How I Fixed Composer Dependency Errors
Web Development

How I Fixed Composer Dependency Errors Using the –ignore-platform-reqs Flag (Step-by-Step Guide)

7 Min Read
WordPress too many redirects HTTPS — Cloudflare flexible SSL loop and the wp-config fix
Web Development

Fix ERR_TOO_MANY_REDIRECTS in WordPress After Switching to HTTPS

7 Min Read
How7o

We provide tips, tricks, and advice for improving websites and doing better search.

Tools

  • Age Calculator
  • Word Counter
  • Image Upscaler
  • Password Generator
  • QR Code Generator
  • See all tools→

Pranks

  • Fake Blue Screen Prank
  • Hacker Typer
  • Fake iMessage Generator
  • Windows XP Crash Prank
  • Windows 11 Update Prank
  • See all prank screens →

Company

  • About Us
  • Blog
  • Contact
  • Privacy Policy
  • Terms of Service
  • Sitemap
© 2024–2026 How7o. All rights reserved.
Welcome Back!

Sign in to your account

Username or Email Address
Password

Lost your password?