di.xml 1.1 KB

12345678910111213141516171819202122232425262728
  1. <?xml version="1.0"?>
  2. <!--
  3. /**
  4. * Copyright © Magento, Inc. All rights reserved.
  5. * See COPYING.txt for license details.
  6. */
  7. -->
  8. <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
  9. <virtualType name="Magento\Newsletter\Model\Session\Storage" type="Magento\Framework\Session\Storage">
  10. <arguments>
  11. <argument name="namespace" xsi:type="string">newsletter</argument>
  12. </arguments>
  13. </virtualType>
  14. <type name="Magento\Newsletter\Model\Session">
  15. <arguments>
  16. <argument name="storage" xsi:type="object">Magento\Newsletter\Model\Session\Storage</argument>
  17. </arguments>
  18. </type>
  19. <type name="Magento\Newsletter\Helper\Data">
  20. <arguments>
  21. <argument name="frontendUrlBuilder" xsi:type="object">Magento\Framework\Url</argument>
  22. </arguments>
  23. </type>
  24. <type name="Magento\Customer\Api\CustomerRepositoryInterface">
  25. <plugin name="update_newsletter_subscription_on_customer_update"
  26. type="Magento\Newsletter\Model\Plugin\CustomerPlugin"/>
  27. </type>
  28. </config>