Learn in this tutorial how to remove the Memberships link from the WooCommerce “my account” page with a simple code snippet.
When you install and configure WooCommerce, a page is created that allows the customer to manage their orders, data, etc. By default it has the following sections:
- Dashboard
- Orders
- Downloads
- Addresses
- Account Details
- Logout

In a previous tutorial we have already seen how you can delete the links you are not interested in displaying.
But if you are using the WooCommerce Memberships plugin you will have noticed that it also adds a new link and you may not want to show it.

As it is not a native WooCommerce field the way to remove it is a bit different, so let’s see how to do it:
Snippet to hide the Membership link from the my WooCommerce account page.
Option A
Add the following code at the end of functions.php or in your functionality plugin:
To see this and another 965 code snippets of this website, login or subscribe here.
In this case you also use the woocommerce_account_menu_items
filter to remove the Memberships field, but you have to encapsulate it in a function that runs in init
.
Option B
If you don’t mind that in addition to hiding the “my account” link you also can’t access it directly (by entering the URL) you have another simpler option which is to go to WooCommerce > Settings > Advanced and remove the text that comes in the “My Membership” field.

Usually it is filled with “members-area”, but if you remove it and leave it blank there will no longer be a link to access it and therefore it will not be displayed on the “my account” page either.
Conclusion
As you can see, you have two options to prevent the Memberships link from displaying on the WooCommerce my account page.
Any questions? I read you in the comments.
And if you want to give me any suggestion for future tutorials, leave it in the contact form. Advantages of being a subscriber. 😉