Business Bloomer
  • About
  • WooCommerce Blog
  • Online Courses
  • Login
  • 0
  • About
  • WooCommerce Blog
  • Online Courses
  • Login
  • 0

WooCommerce: Hide or Rename a My Account Tab

> Published: Oct 2017 - Revised: Mar 2021
> Blog Category: WooCommerce Tips
> Blog Tags: My Account
> Blog Comments: 33 Comments
Tweet

Join 17,000+ WooWeekly subscribers

Many WooCommerce websites don’t need the “Downloads” tab in the My Account page. Or maybe the “Addresses” tab needs to be renamed into something more user-friendly πŸ™‚

Well, here are 2 super simple snippets to hide or rename any tabs you have in the My Account page, including custom tabs that are added by plugins such as Account Funds, Subscriptions, and so on.

Simply note down the URL of the tab e.g. “edit-account” (see image) and edit the snippets accordingly. Enjoy!

Hide or Rename a My Account Tab – WooCommerce

PHP Snippet: Hide or Rename a My Account Tab – WooCommerce

/**
* @snippet       Hide Edit Address Tab @ My Account
* @how-to        Get CustomizeWoo.com FREE
* @author        Rodolfo Melogli
* @testedwith    WooCommerce 5.0
* @donate $9     https://businessbloomer.com/bloomer-armada/
*/

add_filter( 'woocommerce_account_menu_items', 'bbloomer_remove_address_my_account', 9999 );

function bbloomer_remove_address_my_account( $items ) {
   unset( $items['edit-address'] );
   return $items;
}

/**
* @snippet       Rename Edit Address Tab @ My Account
* @how-to        Get CustomizeWoo.com FREE
* @author        Rodolfo Melogli
* @testedwith    WooCommerce 5.0
* @donate $9     https://businessbloomer.com/bloomer-armada/
*/

add_filter( 'woocommerce_account_menu_items', 'bbloomer_rename_address_my_account', 9999 );

function bbloomer_rename_address_my_account( $items ) {
   $items['edit-address'] = 'Delivery Address';
   return $items;
}

If you need the full list of default account menu item keys, here they are:

$items = array(
	'dashboard'       => __( 'Dashboard', 'woocommerce' ),
	'orders'          => __( 'Orders', 'woocommerce' ),
	'downloads'       => __( 'Downloads', 'woocommerce' ),
	'edit-address'    => _n( 'Addresses', 'Address', (int) wc_shipping_enabled(), 'woocommerce' ),
	'payment-methods' => __( 'Payment methods', 'woocommerce' ),
	'edit-account'    => __( 'Account details', 'woocommerce' ),
	'customer-logout' => __( 'Logout', 'woocommerce' ),
);

If PHP fails… Remove an Endpoint from WooCommerce Settings

Go to WordPress Dashboard > WooCommerce > Settings > Advanced, and look for “Account endpoints”.

For example, the official Memberships plugin adds a “Memberships” tab to your My Account page which is controlled by the endpoint “members-area”.

Delete this endpoint from the text input field, click on “Save changes”, flush your permalinks, and the “Memberships” tab will be deleted. Be really careful with these endpoints, and only delete them if you know what you’re doing.

Delete an account endpoint in order to hide a My Account tab on the frontend

Is There a (Reliable) Plugin For That?

If you’d love to code but don’t feel 100% confident with PHP, I decided to look for a reliable plugin that achieves the same result.

In this case, I recommend the YITH WooCommerce Customize My Account Page plugin. On top of removing or renaming My Account tabs, you can also move the tab menu around, customize the color scheme, add banners, set up reCaptcha on the register and login forms, sort and group tabs, conditionally show tabs to a given user role and much more.

But in case you hate plugins and wish to code (or wish to try that), then keep reading πŸ™‚

Related posts:

  1. WooCommerce: Add New Tab @ My Account Page
  2. WooCommerce: Add First & Last Name to My Account Register Form
  3. WooCommerce: Add Select Field to “My Account” Register Form
  4. WooCommerce: Add Privacy Policy Consent @ My Account Registration
  5. WooCommerce: Separate Login, Registration, My Account Pages
  6. WooCommerce: Allow Users to Edit Processing Orders
  7. WooCommerce: Deny Automatic Login Upon Registration @ My Account
  8. WooCommerce: File Upload @ My Account Registration Form
  9. WooCommerce: Rename “My Account” If Logged Out @ Nav Menu
  10. WooCommerce: Add a Custom Download File @ My Account

Where to add this snippet?

You can place PHP snippets at the bottom of your child theme functions.php file (delete "?>" if you have it there). CSS, on the other hand, goes in your child theme style.css file. Make sure you know what you are doing when editing such files - if you need more guidance, please take a look at my free video tutorial "Where to Place WooCommerce Customization?"

Does this snippet (still) work?

Please let me know in the comments if everything worked as expected. I would be happy to revise the snippet if you report otherwise (please provide screenshots). I have tested this code with Storefront theme, the WooCommerce version listed above and a WordPress-friendly hosting on PHP 7.3.

If you think this code saved you time & money, feel free to join 14,000+ WooCommerce Weekly subscribers for blog post updates or 250+ Business Bloomer supporters for 365 days of WooCommerce benefits. Thank you in advance :)

Need Help with WooCommerce?

Check out these free video tutorials. You can learn how to customize WooCommerce without unnecessary plugins, how to properly configure the WooCommerce plugin settings and even how to master WooCommerce troubleshooting in case of a bug!

Rodolfo Melogli

Business Bloomer Founder

Author, WooCommerce expert and WordCamp speaker, Rodolfo has worked as an independent WooCommerce freelancer since 2011. His goal is to help entrepreneurs and developers overcome their WooCommerce nightmares. Rodolfo loves travelling, chasing tennis & soccer balls and, of course, wood fired oven pizza.

Follow @rmelogli
Category: WooCommerce Tips
Tag: My Account

Post navigation

Previous post: WooCommerce: How to Customize Storefront Theme in a Few Clicks
Next post: WooCommerce: Should I Noindex Product Tag Pages?

33 thoughts on “WooCommerce: Hide or Rename a My Account Tab”

  1. Syrehn
    October 16, 2021

    I used your snippet to unset a couple endpoints and then decided to comment one of those unsets out – to try to bring it back.

    However, for w/e reason the endpoint will not show up again unless I completely disable the snippet. Is there something I need to flush?

    Additionally, would it be possible somehow to unset those menu items conditionally based on the endpoint (i.e if you’re on edit_addresses endpoint then unset a, b, c menu items)?

    Reply
    1. Rodolfo Melogli
      October 27, 2021

      Did you try refreshing/resaving permalinks?

      Reply
  2. Claudia
    September 4, 2021

    Hello
    The code still works by September 2021.
    Thank you so much for all your snippets, they are life saving!

    Reply
    1. Rodolfo Melogli
      September 15, 2021

      Thanks!

      Reply
  3. Chris Pink
    December 15, 2020

    The filters don’t seem to be working any more. Woocommerce 4.7, 4.8

    The endpoints still work, but not the useful Account Tab filters

    Reply
    1. Rodolfo Melogli
      December 16, 2020

      Just checked, filter still exists and should work

      Reply
  4. Mike
    October 18, 2020

    Thanks Rodolfo, very neat and direct way to remove unwanted tabs.

    One small problem though: having hidden away tabs for products & address – the default greeting under ‘Dashboard’ retains a link to them: “From your account dashboard you can view your recent orders, manage your shipping and billing addresses, and edit your password and account details.”

    Could you please point me towards where I could edit this message? I’ve been using ‘Say What’ plugin in other areas – but not sure if that’s the best approach here. Thanks.

    Reply
    1. Rodolfo Melogli
      October 27, 2020

      Hey Mike this should help https://www.businessbloomer.com/translate-single-string-woocommerce-wordpress/

      Reply
  5. Chris De Bruyne
    July 2, 2020

    Thanks so much for this, just saved my ass πŸ™‚

    Reply
    1. Rodolfo Melogli
      July 7, 2020

      Cool

      Reply
  6. Mishael
    June 30, 2020

    Thanks a lot Rodolfo for your assistance…
    I want my-account menu to display horizontally and in-line not the default vertical position. Is there a snippet that could change that.

    Reply
    1. Rodolfo Melogli
      July 7, 2020

      Hi Mishael, thanks so much for your comment! Yes, this is definitely possible, but I’m afraid it’s custom work. If you’d like to get a quote, feel free to contact me here. Thanks a lot for your understanding!

      Reply
      1. Chris Pink
        December 15, 2020

        You need to do this in CSS, it’s very stragihtforward

        Reply
  7. Tibère
    June 11, 2020

    Hi, all your code snippets look really useful and considering the comments, I thought it would be very easy. And yet, when I add the code snippet from this article, nothing changes on my site. I have WordPress 5.4.2, WooCommerce 4.1.1, PHP 7.4 and the FlatSome theme (child theme enabled of course). I tested many other code snippets, nothing worked and yet the child theme came “read” since my site crashes when I deliberately add a synthax error inside the code snippets.
    Please help me ! πŸ™‚

    Reply
    1. Rodolfo Melogli
      June 15, 2020

      Hey Tibere, try switch to another theme to test it. If it works, then this snippet needs to be adjusted for Flatsome

      Reply
  8. happy guy
    May 11, 2020

    Thanks Rodolfo,
    The php hook cleaned up my 3rd party plugin that didn’t give me an option to not add their plugin dashboard to my-account.
    Problem solved.

    Reply
    1. Rodolfo Melogli
      May 13, 2020

      Nice!

      Reply
  9. Roberta
    February 17, 2019

    Wonderful website – so clear and straightforward! Thank you!
    It works well, except I can’t figure out how to change the name of “My Subscriptions” in your snippet. The URL is …account/view-subscription/100987/ so the path is for a specific subscription that will be different for everyone. The answer might be obvious but I am not great with PHP.

    Reply
    1. Rodolfo Melogli
      February 27, 2019

      Uhm, not sure, did you ask the Subscriptions plugin developers?

      Reply
  10. notice woocommerce dev
    December 6, 2018

    hi
    When clicking on “orders” you see on the next pages that you can cancel subscription.
    I like to remove this link as I want it elsewhere. How is that done?

    Reply
    1. Rodolfo Melogli
      December 11, 2018

      Hello there, thanks so much for your comment! Yes, this is possible – but unfortunately this is custom work and I cannot provide a complementary solution here via the blog comments. If you’d like to get a quote, feel free to contact me here. Thanks a lot for your understanding! ~R

      Reply
  11. Cezar
    December 3, 2018

    Thank you for this post man!! I’ve learned a lot with you! I have a question:

    Instead of use my theme functions.php I’ve created a Theme-child folder and added a functions.php and style.css as well.

    This is my new function.php

    add_filter( 'woocommerce_account_menu_items', 'removeDownload', 999); //remove link download from my account page
    function removeDownload( $items ) {
    	unset($items['downloads']);
    	return $items;
    }
    

    But changes are not being showed up. If I change my theme functions.php I can see my changes but with the Child theme I can't see it. What is wrong?

    Reply
    1. Rodolfo Melogli
      December 5, 2018

      Cezar, thanks so much for your comment! I just retested this on the latest version of WooCommerce and it still works. Unfortunately this looks like custom troubleshooting work and I cannot help here via the blog comments. Thanks a lot for your understanding! ~R

      Reply
  12. Bet Hannon
    September 16, 2018

    Looks like maybe an update to WooCommerce has removed the Endpoints settings from Settings > Account.

    I was wanting to remove the Memberships from the My Account page. I ended up using this:

    function bhm_remove_my_memberships_table() {
       if ( function_exists( 'wc_memberships' ) && ! is_admin() ) { 
          remove_filter( 'woocommerce_account_menu_items', array( wc_memberships()->get_frontend_instance()->get_members_area_instance(), 'add_account_members_area_menu_item' ), 999 );
       }
    }
    add_action( 'init', 'bhm_remove_my_memberships_table', 50 );
    
    
    Reply
    1. Rodolfo Melogli
      September 20, 2018

      Nice! πŸ™‚

      Reply
      1. Spafford
        May 30, 2020

        This snippet is working great, but I am also not able to remove membership, and the code from Bet generated some errors – just a heads up. Is there a modification of the original snippet that might work for to remove the Membership tab?

        Reply
        1. Rodolfo Melogli
          June 2, 2020

          I’ve fixed Bet’s snippet, try again

          Reply
  13. Oliver Perez
    August 29, 2018

    This was a great help to get rid of Downloads just as you suggested. Worked perfectly. Thanks.

    Reply
    1. Rodolfo Melogli
      September 3, 2018

      Excellent πŸ™‚

      Reply
  14. danny79
    June 30, 2018

    I just deleted the endpoint Downloads and it disappeared from the account page, no coding required πŸ™‚

    Reply
    1. Rodolfo Melogli
      July 4, 2018

      Nice, thanks Danny πŸ™‚

      Reply
  15. Ron Killian
    November 2, 2017

    Yet another awesome Woocommerce snippet!

    Since my store is digital products (downloads), the Address tab is unnecessary. So it was nice to ditch it. Even makes the My Account page look a little better.

    Code worked perfectly. Thank you πŸ™‚

    If you need any idea’s, any code that better allows working with customers in Woocommerce, I am sure many would find useful. The biggest lack with WC.

    Ron

    Reply
    1. Rodolfo Melogli
      November 2, 2017

      Thank you Ron πŸ™‚

      Reply
Questions? Feedback? Support? Leave your Comment Now!
_____

If you are writing code, please wrap it between shortcodes: [php]code_here[/php]. Failure to complying with this (as well as going off topic, not writing in English, etc.) will result in comment deletion. You should expect a reply in about 2 weeks - this is a popular blog but I need to get paid work done first. Please consider joining BloomerArmada to get blog comment reply priority, ask me 1-to-1 WooCommerce questions and enjoy many more perks. Thank you :)

Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts
  • WooCommerce: Related Products Custom Heading & Subheading
  • WooCommerce: Display Stock Status For External Products
  • WooCommerce: Display Product Grid @ Order Emails e.g. Related Products
  • WooCommerce: Capitalize All Product Names
  • WooCommerce: Add a Third Description @ Single Product Page
About Business Bloomer

With 100,000 (and growing) monthly organic sessions, Business Bloomer is the most consistent, most active and most complete WooCommerce development/customization blog.

Of course this website itself uses the WooCommerce plugin, the Storefront theme and runs on a WooCommerce-friendly hosting.

Join 75,000+ Monthly Readers & 16,500+ Subscribers.

Become a Business Bloomer Supporter.

Join BloomerArmada and become an Official Business Bloomer Supporter:
easy-peasy, and lots of perks for you.
See your Benefits →
Popular Searches: Visual Hook Guides - Checkout Page - Cart Page - Single Product Page - Add to Cart - Emails - Shipping - Prices - Hosting
Latest Articles
  • WooCommerce: Related Products Custom Heading & Subheading
  • WooCommerce: Display Stock Status For External Products
  • WooCommerce: Display Product Grid @ Order Emails e.g. Related Products
  • WooCommerce: Capitalize All Product Names
  • WooCommerce: Add a Third Description @ Single Product Page
Latest Comments
  • Rodolfo Melogli on WooCommerce: Separate Login, Registration, My Account Pages
  • Rodolfo Melogli on WooCommerce: Separate Login, Registration, My Account Pages
  • Rodolfo Melogli on WooCommerce: Related Products Custom Heading & Subheading
  • Rodolfo Melogli on WooCommerce: Switch Shop Columns Responsively
Find Out More
  • Become a WooCommerce Expert
  • WooCommerce Blog
  • WooCommerce Online Courses
  • WooCommerce Weekly
  • Bloomer Armada
  • Affiliate Program
  • Contact
Contact Info

Ciao! I’m Rodolfo Melogli, an Italian Civil Engineer who has turned into an international WooCommerce expert. You can contact me here:

Email: [email protected]

Twitter: @rmelogli

Hire me by the hour: Get Quote Β»

VisaMastercardAmexPayPal Acceptance Mark
Business Bloomer © 2011-2023 - Terms of Use - Privacy Policy