0

I want to stop Default Newsletter subscription in magento2 because I am already using Ebizmarts_MageMonkey module for that functionality.

Currently I am using Plugin to override SendConfirmationSuccessEmail().

My code is etc/di.xml

<type name="Magento\Newsletter\Model\Subscriber">
    <plugin name="my-subscriber" type="Custom\Module\Newsletter\Model\Subscriber" setOrder="1" disabled="false"/>
</type>

and php file Newsletter/Model/Subscribe.php code is,

namespace Custom\Module\Newsletter\Model;

use Magento\Newsletter\Model\Subscriber as MageSubscriber;

class Subscriber
{
    public function aroundSendConfirmationSuccessEmail(MageSubscriber $oSubject, callable $proceed) {}   
}

This is working fine but it stopped developer mode. Can anybody tell me where I am doing wrong?

Thanks,

1

Your best option is to actually disable output in the Magento Admin.

Go to Admin -> System -> Configuration -> Advanced -> Disable Modules Output. Select Mage_Newsletter and select “Disabled”. Save and you are done.

You can also disable the module completely from app/etc/modules. Open up Mage_All.xml and go to the Mage_Newsletter node. change active from true to false and save.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.