1

Im trying to disable Amasty\Gdpr\Block\AccountLinkPlugin from my vendor folder.

Amasty frontend/di.xml

<type name="Magento\Customer\Block\Account\Navigation">
 <plugin name="amasty-gdpr-account-navigation" type="Amasty\Gdpr\Block\AccountLinkPlugin"/>
</type>

so i tried creating a module to disable it.

module.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
 <module name="Namespace_AmastyGdpr" setup_version="1.0.0">
 <sequence>
 <module name="Amasty_Gdpr" />
 </sequence>
 </module>
</config>

etc/di.xml (i also tried putting it in etc/frontend/di.xml)

<?xml version="1.0" ?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
 <type name="Magento\Customer\Block\Account\Navigation">
 <plugin name="amasty-gdpr-account-navigation" disabled="true"/>
 </type>
</config>

already tried different approaches to make this work. like including the 'type' on the di.xml, but it didnt work. also saw a some question and solution here. but for some reasons its not working for me. im using 2.4.0.

im sure that im trying to remove the correct plugin cause when i tried to do

<type name="Magento\Customer\Block\Account\Navigation">
 <plugin name="amasty-gdpr-account-navigation" type="Amasty\Gdpr\Block\AccountLinkPlugin" disabled="true"/>
</type>

directly on the amasty module, it did work.

asked May 3, 2021 at 6:45
1
  • Were you able to solve it? Commented Feb 16, 2022 at 9:54

1 Answer 1

-1

There are three different ways to disable a module.

  1. This file - app/etc/config.php then find your module name, then make it to 0 from 1 , it will disable the module.
  2. To disable a module from command line.
    For example, to disable the Weee module, enter:
$ bin/magento module:disable Magento_Weee 

3. It may be helpful - https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html
Black
3,4094 gold badges44 silver badges131 bronze badges
answered May 3, 2021 at 8:02
4
  • Hi @Vibhore Jain, i dont want to disable the whole Amasty_Gdpr module. i just want to disable one of its plugins. Commented May 3, 2021 at 8:11
  • Try comment the <plugin> tag in all related files. Commented May 3, 2021 at 8:17
  • Your above code seems ok, run setup upgrade and compile it again, deploy -f , chmod 777 var pub, then clean: cache.. Commented May 3, 2021 at 8:28
  • @VibhoreJain You clearly don't understand his question Commented Feb 16, 2022 at 9:54

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.