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:
Solved! Go to Solution.
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
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
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!
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
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
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"/>