cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 2.3.5-p1 - Override Stripe module customer_account.xml (customer_account_navigation)

SOLVED

Magento 2.3.5-p1 - Override Stripe module customer_account.xml (customer_account_navigation)

Magento 2.3.5-p1

StripeIntegration/Payments module

 

Under Customer Account navigation menu, the Stripe menu item "My Subscriptions" is showing even though I've turned off subscriptions in Stripe module. I can't seem to override using:

<referenceBlock name="stripe-payments-subscriptions" remove="true">

in Magento_Customer/layout/customer_account.xml.

 

Stripes customer_account.xml, located in app\code\StripeIntegration\Payments\view\frontend\layout contains:

<?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">
<block class="Magento\Framework\View\Element\Html\Link\Current" name="stripe-payments-customer-cards">
<arguments>
<argument name="path" xsi:type="string">stripe/customer/cards</argument>
<argument name="label" xsi:type="string">My Saved Cards</argument>
<argument name="sortOrder" xsi:type="number">150</argument>
</arguments>
</block>
<block class="Magento\Framework\View\Element\Html\Link\Current" name="stripe-payments-subscriptions">
<arguments>
<argument name="path" xsi:type="string">stripe/customer/subscriptions</argument>
<argument name="label" xsi:type="string">My Subscriptions</argument>
<argument name="sortOrder" xsi:type="number">160</argument>
</arguments>
</block>
</referenceBlock>
</body>

</page>

 

I'm trying to override name="stripe-payments-subscriptions"> (My Subscriptions) so it doesn't show up on the Customer Account navigation menu:

 

 

Untitled-1.jpg

 

2 ACCEPTED SOLUTIONS

Accepted Solutions

Re: Magento 2.3.5-p1 - Override Stripe module customer_account.xml (customer_account_navigation)

Hello @aglasser1 

 

first, you need to create customer_account.xml into your theme 

 

so path will be

 

app\design\frontend\<VendorName>\<ThemeName>\Module_Name\layout/customer_account.xml
<referenceBlock name="stripe-payments-subscriptions" remove="true">

 

 

add above code into that xml with some pre-define xml tag

 

if works then mark as solution

 

 


Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer

View solution in original post

Re: Magento 2.3.5-p1 - Override Stripe module customer_account.xml (customer_account_navigation)

Hello,

 

https://github.com/magepal/magento2-customer-account-links-manager

 

above module is good, for the custom module you need to modify little bit code

 

If works then mark as solution

 


Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer

View solution in original post

4 REPLIES 4

Re: Magento 2.3.5-p1 - Override Stripe module customer_account.xml (customer_account_navigation)

Hi @aglasser1 

For override layout.xml please follow below steps:

Go to your theme folder path and place your xml file :

app\design\frontend\<VendorName>\<ThemeName>\StripeIntegration_Payments\view\frontend\layout\layout.xml

Add your changes with layout file and run following commands:

php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy


If issue resolve, please click on 'Kudos' & Accept as Solution!

Problem solved? Click Accept as Solution!

Re: Magento 2.3.5-p1 - Override Stripe module customer_account.xml (customer_account_navigation)

Hello @aglasser1 

 

first, you need to create customer_account.xml into your theme 

 

so path will be

 

app\design\frontend\<VendorName>\<ThemeName>\Module_Name\layout/customer_account.xml
<referenceBlock name="stripe-payments-subscriptions" remove="true">

 

 

add above code into that xml with some pre-define xml tag

 

if works then mark as solution

 

 


Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer

Re: Magento 2.3.5-p1 - Override Stripe module customer_account.xml (customer_account_navigation)

Hello,

 

https://github.com/magepal/magento2-customer-account-links-manager

 

above module is good, for the custom module you need to modify little bit code

 

If works then mark as solution

 


Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer

Re: Magento 2.3.5-p1 - Override Stripe module customer_account.xml (customer_account_navigation)

@Sunil Patel  -

 

I had done that 600 times. I, too, was missing the close:

<referenceBlock name="stripe-payments-subscriptions" remove="true">

when I should have had:

<referenceBlock name="stripe-payments-subscriptions" remove="true"/>