| Conditions | 4 |
| Paths | 3 |
| Total Lines | 16 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 45 | public function execute(Observer $observer) |
||
| 46 | { |
||
| 47 | if (!$this->configHelper->isEnabled() || !$this->configHelper->isContactExportEnabled()) { |
||
| 48 | return; |
||
| 49 | } |
||
| 50 | |||
| 51 | /** @var Subscriber $subscriber */ |
||
| 52 | $subscriber = $observer->getEvent()->getData('subscriber'); |
||
| 53 | |||
| 54 | if ($subscriber->getData('customer_id')) { |
||
| 55 | return; |
||
| 56 | } |
||
| 57 | |||
| 58 | $this->publisher->publish( |
||
| 59 | Topics::NEWSLETTER_CONTACT_EXPORT, |
||
| 60 | json_encode(['email' => $subscriber->getEmail()]) |
||
|
|
|||
| 61 | ); |
||
| 64 |