Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Vendor/magento/module-customer/Controller/Account/CreatePost.php
- if ($this->getRequest()->getParam('is_subscribed', false)) {
- $this->subscriberFactory->create()->subscribeCustomerById($customer->getId());
- }
- <?xml version="1.0"?>
- <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
- <preference for="MagentoNewsletterModelSubscriber" type="HarrigoSendyConnectModelSubscriberfactory" />
- </config>
- <?php
- namespace HarrigoSendyConnectModel;
- use MagentoCustomerApiAccountManagementInterface;
- use MagentoCustomerApiCustomerRepositoryInterface;
- use MagentoFrameworkExceptionMailException;
- use MagentoFrameworkExceptionNoSuchEntityException;
- class Subscriberfactory extends MagentoNewsletterModelSubscriber
- {
- public function isSubscribed()
- {
- if ($this->sendySubscribed() == "Subscribed") {
- return true;
- } else {
- return false;
- }
- }
- protected function _updateCustomerSubscription($customerId, $subscribe)
- {
- ...
- }
- }
Add Comment
Please, Sign In to add comment