Magento - Removing Billing Agreements, Recurring Profiles, and My Applications

by: Preston Schmidt

Editing The Template Files

Editing The My Applications File

Lets start with the oauth.xml file:

This file is located under app/design/frontend/base/default/layout/oauth.xml

Open this file in a text editor and towards the bottom of this page is a block of code that creates the menu item for the oauth section, let's go ahead and remove this so it doesn't show up in Magento. It looks like this:

All we need to do is place comment tags around this section to remove it. Like so:

Now we have successfully removed the menu link, so Magento will no longer provide us or our users with a method to access this content.

Editing The Billing Agreement File

This file is under app/design/frontend/base/default/layout/sales/billing_agreement.xml

Open the file in your text editor and look for a section called customer_account with a reference named "customer_account_navigation". Inside this reference is an action with a name of "billing_agreements", and all we need to do is comment out the action which will keep Magento from creating the billing agreements link. So we go from this:

To this:

Edit the Recurring Profiles File

This file is under app/design/frontend/base/default/layout/sales/recurring_profiles.xml

On this file we are looking for a block of text called customer_account with a reference named "customer_account_navigation". Inside is an action named "recurring_profiles", and again, all we need to do is comment out this action to keep Magento from creating this link item. So we go from this:

To this:

Conclusion

We worked through removing the billing agreement and recurring profiles from showing up in Magento, but make sure that you make such changes to your Magento install by doing template overrides. The benefit of removing content with a template override is the ease of reverting if anything ever changes in the future, and the ability to do core updates without over-writing your changes.

Outlier

Video, Web, and Design Agency