The default Magento 2 “My Account” section offers a number of tabs such as
- Account Dashboard
- Account Information
- Address Book
- My Downloadable Products
- My Orders
- Newsletter Subscriptions
- Stored Payment Methods
- My Product Reviews
- Billing Agreements
- My Wish List
Previously, I had discussed how to add Custom Tab in Customer Account Dashboard in Magento 2 to add custom tabs in My Account section for the specific requirements.
Customers seem to be cleanliness freak! 😄
And thus, Sometimes we need to customize the code to exclude unnecessary links as not all links are needed.
I’ll help you remove unnecessary customer account links in Magento 2 to manage the “My Account” section. Implementing this in your store, you are making sure that customers can easily navigate and find the exact things they want faster. Improve the customer experience and offer an easy-to-use customer account dashboard for Magento 2!
Follow the below code for easy Magento 2 Customer Account Links Manager!
Method to Remove Unnecessary Customer Account Links in Magento 2:
Create customer_account.xml file at app\code\Vendor\Extension\view\frontend\layout\
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<!--remove newsletter tab-->
<referenceBlock name="customer-account-navigation-newsletter-subscriptions-link" remove="true"/>
<!--remove wishlist tab-->
<referenceBlock name="customer-account-navigation-wish-list-link" remove="true"/>
<!--remove review tab-->
<referenceBlock name="customer-account-navigation-product-reviews-link" remove="true"/>
That’s it. Implementing this, the customer account dashboard looks something like this where the links to Newsletter Subscription, Wish lIst, and Product Reviews are absent:
As per your business requirements, you can implement this method to remove the unnecessary tabs in Magento 2. For example, if you are not offering a newsletter, for now, remove the Newsletter subscription link altogether.
An easy to follow method, however, feel free to post any doubts on the topic in the Comments section below and I’d be happy to help 🙂
Get Weekly Updates
Never miss Magento tips, tricks, tutorials, and news.
Thank you for subscribing.
Something went wrong.