You need to rewrite Magento's Customer Mage_Customer_Block_Account_Navigation Block class.
create config.xml file in the app/code/local/Neo/CustomerNavigationLinks/etc
<?xml version="1.0"?>
<config>
<modules>
<Neo_CustomerNavigationLinks>
<version>0.0.1</version>
</Neo_CustomerNavigationLinks>
</modules>
<global>
<blocks>
<customer>
<rewrite>
<account_navigation>Neo_CustomerNavigationLinks_Block_Account_Navigation</account_navigation>
</rewrite>
</customer>
</blocks>
<helpers>
<customernavigationlinks>
<class>Neo_CustomerNavigationLinks_Helper</class>
</customernavigationlinks>
</helpers>
</global>
</config>
in Neo/CustomerNavigationLinks/Block/Account/ careate a file called Navigation.php with the following content in it
<?php
class Neo_CustomerNavigationLinks_Block_Account_Navigation extends Mage_Customer_Block_Account_Navigation
{
public function removeLinkByName($name)
{
unset($this->_links[$name]);
return $this;
}
}
?>
in app/etc/modules create a file called Neo_CustomerNavigationLinks.xml with the following content
<?xml version="1.0"?>
<config>
<modules>
<Neo_CustomerNavigationLinks>
<active>true</active>
<codePool>local</codePool>
</Neo_CustomerNavigationLinks>
</modules>
</config>
Now in local.xml add following content
<customer_account>
<reference name="customer_account_navigation">
<action method="removeLinkByName">
<name>newsletter</name>
</action>
</reference>
</customer_account>
Billing Agreements :
copy this file
app/design/frontend/base/default/layout/sales/billing_agreement.xml
in your current theme and remove below lines
<reference name="customer_account_navigation" >
<action method="addLink" translate="label"><name>billing_agreements</name><path>sales/billing_agreement/</path><label>Billing Agreements</label></action>
</reference>
Recurring Profiles :
copy this file
app/design/frontend/base/default/layout/sales/recurring_profile.xml
in your current theme and remove below lines
<reference name="customer_account_navigation" >
<action method="addLink" translate="label"><name>recurring_profiles</name><path>sales/recurring_profile/</path><label>Recurring Profiles</label></action>
</reference>
My Downloadable Products :
copy this file
app/design/frontend/base/default/layout/downloadable.xml
in your current theme and remove below lines
<reference name="customer_account_navigation">
<action method="addLink" translate="label" module="downloadable"><name>downloadable_products</name><path>downloadable/customer/products</path><label>My Downloadable Products</label></action>
</reference>
Best Answer
In Magento 2 these links are controlled by the class
Magento\Customer\Block\Account\Navigation
. This block is added to the sidebar in the xmlMagento/Customer/view/frontend/layout/customer_account.xml
.To add a new link you need to reference this block and then can add a child block as follows.
If the link you are trying to remove is built like the wishlist you can turn it on or off via the system configuration (see
ifconfig="wishlist/general/active"
).If the link you are trying to remove is not built with such a flag then you will have to remove the block via it's name as follows: