Reserve Your Free Seat for Our Next WooCommerce Class! Search
Business Bloomer
  • Business Bloomer Club
  • WooCommerce Plugins
  • WooCommerce Tips
  • Log In
  • 0
  • Business Bloomer Club
  • WooCommerce Plugins
  • WooCommerce Tips
  • Log In
  • Search
  • Contact
  • Cart
WooCommerce Code Snippets My Account

WooCommerce: How to Merge My Account Tabs

Last Revised: Mar 2021

STAY UPDATED

The default WooCommerce My Account tabs are many. Sometimes, they’re too many. In this post, we will see how to “merge” two tabs into a single one.

For example, how can we move the content of the “Edit Address” tab into the “Edit Account” tab – and save users some navigation time?

WooCommerce: merge two “My Account” tabs

PHP Snippet: Merge Two My Account Tabs @ WooCommerce My Account Page

Merging two tabs means hiding a tab, and after that moving its content to another tab. Super easy, and you can apply this to any tab, as long as you change the snippet below with the correct name of the tabs (or endpoints, like WooCommerce calls them).

/**
* @snippet       Merge Two "My Account" Tabs @ WooCommerce Account
* @how-to        https://businessbloomer.com/woocommerce-customization
* @author        Rodolfo Melogli
* @compatible    WooCommerce 5.0
* @community     https://businessbloomer.com/club/
*/

// -------------------------------
// 1. First, hide the tab that needs to be merged/moved (edit-address in this case)

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

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

// -------------------------------
// 2. Second, print the ex tab content (woocommerce_account_edit_address) into an existing tab (woocommerce_account_edit-account_endpoint). See notes below!

add_action( 'woocommerce_account_edit-account_endpoint', 'woocommerce_account_edit_address' );

// NOTES
// 1. to select a given tab, use 'woocommerce_account_ENDPOINTSLUG_endpoint' hook
// 2. to print a given tab content, use any of these:
// 'woocommerce_account_orders'
// 'woocommerce_account_view_order'
// 'woocommerce_account_downloads'
// 'woocommerce_account_edit_address'
// 'woocommerce_account_payment_methods'
// 'woocommerce_account_add_payment_method'
// 'woocommerce_account_edit_account'

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 merging 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, rename, delete 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 🙂

Where to add custom code?

You should place custom PHP in functions.php and custom CSS in style.css of your child theme: where to place WooCommerce customization?

This code still works, unless you report otherwise. To exclude conflicts, temporarily switch to the Storefront theme, disable all plugins except WooCommerce, and test the snippet again: WooCommerce troubleshooting 101

Related content

  • WooCommerce: Separate Login, Registration, My Account Pages
    There are times when you need to send logged out customers to a Login page and unregistered customers to a standalone Register page. As you…
  • WooCommerce: Add New Tab @ My Account Page
    One of the features of Business Bloomer Club is the provision of Premium WooCommerce Q&A Support to supporters who enroll. So, how to add an…
  • WooCommerce: How To Make A Website GDPR Compliant? (12 Steps)
    Ok, we all know that the EU General Data Protection Regulation (GDPR) will come into force on the 25th May 2018. So the main question…
  • WooCommerce Visual Hook Guide: My Account Pages
    Hey WooCustomizers, the Visual Hook Guide is back 🙂 In this episode, I’ve created a visual HTML hook guide for the WooCommerce Account Pages (there…
  • WooCommerce: Add First & Last Name to My Account Register Form
    Here’s yet another useful PHP snippet – and a mini-plugin alternative with super simple settings – that adds the Billing First Name and Billing Last…

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

29 thoughts on “WooCommerce: How to Merge My Account Tabs”

  1. Avelin
    November 12, 2021

    Hello, how do i merge more than 2 tabs into one? I’m trying to merge both the payment-methods tab as well as the edit-address tab into the edit-account tab but can’t seem to figure out the code. Thanks!

    Reply
    1. Rodolfo Melogli
      November 29, 2021

      Hello Avelin 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
  2. Luke
    July 30, 2021

    I was just wondering if, rather than merging into the same endpoint, we move the menu options into a submenu for a parent endpoint.

    i.e.

    <li>Orders</li>
    <li>Account Details</li>
      <ul>
        <li>Payment Methods</li>
        <li>Addresses</li>
       ... etc
    
    Reply
    1. Rodolfo Melogli
      August 20, 2021

      I guess that’s an option as well. Will require some customization

      Reply
  3. Hasnain Mahar
    March 25, 2021

    What is 999 there and what about the word “bbloomer” you used in your code? What should I replace it with?

    Reply
    1. Rodolfo Melogli
      April 19, 2021

      I recommend to keep the 999 (priority) but you can change “bbloomer” to whatever you like

      Reply
  4. Phil
    March 11, 2021

    Using these actions/hooks, is it possible to actually add the billing and shipping forms in the account page? Rather than links to the edit billing/shipping, the actual forms are there?

    Reply
    1. Rodolfo Melogli
      March 22, 2021

      I’m pretty sure that’s possible!

      Reply
  5. Diego
    June 18, 2020

    Hi.
    Can I also merge Woocommerce Membership tabs? I want to move content to “MY ACCOUNT DETAILS” from “MANAGE” to display the membership details. But I can’t find the correct name for this last tab to complete the snippet.
    I would really appreciate your help!

    Reply
    1. Rodolfo Melogli
      June 28, 2020

      Hi Diego, 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
  6. Helene
    April 27, 2020

    Not sure what I am doing wrong, but when I add this snippet the whole side menu disappears :O I haven’t changed anything about it.

    Any ideas?

    Reply
    1. Rodolfo Melogli
      April 29, 2020

      Uhm, not sure. Tried also on Storefront theme or 2020?

      Reply
  7. Chemin
    April 9, 2020

    When I merge the address to edit-account tab, the content in address will be right below the content in edit-account, i.e. the fields to edit address will be below the save changes button which is in edit-account tab.
    It looks weird that after the save changes button, there is still fields to be edited.
    Any idea to organize the structure?

    Reply
    1. Rodolfo Melogli
      April 9, 2020

      Hi Chemin, you’ll need a bit of CSS for that

      Reply
  8. Aurélien
    November 26, 2019

    Great approach except that endpoint url will not follow your new rules. For instance, if you edit a payment method and validate the form and will redirect to the default endpoint and your custom will be lost in the navigation. I’m trying to change the URL too but it doesn’t seem to be posible.

    Reply
    1. Rodolfo Melogli
      November 27, 2019

      Good point – I’m sure there is a way to change redirect URL though

      Reply
    2. Miko
      December 12, 2019

      Hey Aurélien,
      I’ve overcome this problem – all you have to do is go setting and change the end points of each page. Everything seems to be working fine for me 🙂 good luck buddy, if you need help feel free to contact me

      Reply
  9. Busola Okeowo
    January 11, 2019

    hi i merged the dashboard tab and a custom tab i created. now i want to separate them. I removed this line of code below but it still wont be separated.

    add_action( 'woocommerce_account_dashboard_endpoint', 'woocommerce_account_customlink' );

    any ideas please?
    #BloomerArmada

    Reply
    1. Rodolfo Melogli
      January 18, 2019

      Hey Busola, thanks for your comment. Did you remove the first part of the snippet as well?

      Reply
  10. joshuaeverettdunn
    November 22, 2018

    Maybe you touched on this, but is there a reason why bbloomer is within the code?

    Reply
    1. Rodolfo Melogli
      November 26, 2018

      Hey Joshua, thanks for your comment! That’s how I name my PHP functions, you can use whatever name you like 🙂

      Reply
  11. ridzuan
    October 30, 2018

    hi Rodolfo, may i know is it possible to show edit-address form without clicking the edit. It means when i click address it will automatically allow user to edit their form.

    Reply
    1. Rodolfo Melogli
      October 30, 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. Thanks a lot for your understanding! ~R

      Reply
  12. Helms
    June 29, 2018

    Works great! In your example, how would you move the edit address output before the edit account form?

    Reply
    1. Rodolfo Melogli
      July 4, 2018

      Hey Helms, you could try taking a look at the plugins listed here: https://businessbloomer.com/woocommerce-how-to-customize-the-my-account-page/

      Reply
  13. Antonio
    June 14, 2018

    Hello,

    I’ve tried to change the endpoints but I actually cannot merge the Order tab into the Downloads one. Any suggestion?

    Thanks!
    Antonio

    Reply
    1. Rodolfo Melogli
      June 18, 2018

      Hey Antonio, thanks for your comment! You’ll need to find out the exact hook and functions of the tab you want to move, sorry but this is custom work 🙂

      Reply
  14. Sharon
    February 28, 2018

    This is fantastic, Rodolfo. Can’t wait to implement it! Thank you!!! 🙂

    Reply
    1. Rodolfo Melogli
      March 1, 2018

      Fantastic 🙂

      Reply
Questions? Feedback? Customization? Leave your comment now!
_____

If you are writing code, please wrap it like so: [php]code_here[/php]. Failure to complying with this, as well as going off topic or not using the English language will result in comment disapproval. 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 the Business Bloomer Club to get quick WooCommerce support. Thank you!

Cancel reply

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


Search WooCommerce Tips

Popular Searches: Visual Hook Guides - Checkout Page - Cart Page - Single Product Page - Add to Cart - Emails - Shipping - Prices - Hosting

Recent Articles

  • WooCommerce: How to Stop Spam Orders on Free Products
  • WooCommerce: How to Configure Product and Order Sync
  • WooCommerce: “Beautify” Item Meta in Order Emails
  • WooCommerce: Per-Product Checkout Fees / Tariffs
  • WooCommerce: Auto-Cancel Orders After 3 Failed Payments

Latest Comments

  1. Rodolfo Melogli on WooCommerce Visual Hook Guide: Checkout Page
  2. Rodolfo Melogli on WooCommerce: Prevent Duplicate Orders
  3. Rodolfo Melogli on WooCommerce: Hide Checkout Fields if Virtual Product @ Cart

Find Out More

  • Become a WooCommerce Expert
  • Business Bloomer Club
  • WooCommerce Blog
  • WooCommerce Weekly
  • 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:

Twitter: @rmelogli

Get in touch: Contact Page

Business Bloomer © 2011-2025 - VAT IT02722220817 - Terms of Use - Privacy Policy

Cart reminder?

x