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>
Add new layout handle to one of places:
- If creating new module:
VendorName/ModuleName/view/frontend/layout/customer_account.xml
- If creating new theme, 2 similar layout handles should be created to declare removal of each block separately:
app/design/frontend/VendorName/themeName/Magento_Wishlist/layout/customer_account.xml
(and similar layout for billing agreement module)
Layout handle content:
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="customer-account-navigation-wish-list-link" remove="true"/>
<referenceBlock name="customer-account-navigation-billing-agreements-link" remove="true"/>
</body>
</page>
Best Answer
Billing Agreements : copy this file
app/design/frontend/base/default/layout/sales/billing_agreement.xml
in your current theme and remove below linesRecurring Profiles : copy this file
app/design/frontend/base/default/layout/sales/recurring_profile.xml
in your current theme and remove below linesMy Downloadable Products : copy this file
app/design/frontend/base/default/layout/downloadable.xml
in your current theme and remove below lines