Skip to content

Commit

Permalink
Fix issue #2 - Module does not work for Magento 2.2.8
Browse files Browse the repository at this point in the history
  • Loading branch information
kiwi-commerce committed Apr 24, 2019
1 parent 3a4faca commit 532dba7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Email/Log/SaveEmailLog.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public function __construct(
$this->logger = $logger;
$this->benchmark = $benchmark;

if (!$config->versionCompare('2.3.0')) {
if (!$config->versionCompare('2.2.8')) {
parent::__construct($templateFactory, $message, $senderResolver, $objectManager, $mailTransportFactory);
} else {
parent::__construct($templateFactory, $message, $senderResolver, $objectManager, $mailTransportFactory, $messageFactory);
Expand Down Expand Up @@ -153,7 +153,7 @@ public function initEmailLog()
$module = $this->requests->getModuleName();
$emailLog = $this->logsFactory->create();

if ($this->config->versionCompare('2.3.0')) {
if ($this->config->versionCompare('2.2.8')) {

$from = $this->mailMessage->getFrom();

Expand Down Expand Up @@ -338,7 +338,7 @@ public function prepareMessage()

parent::prepareMessage();

if ($this->config->versionCompare('2.3.0')) {
if ($this->config->versionCompare('2.2.8')) {
$this->mailMessage = \Zend\Mail\Message::fromString($this->message->getRawMessage());

$recipients = $this->getRecipients();
Expand All @@ -352,7 +352,7 @@ public function prepareMessage()
foreach ($recipients as $key => $recipient) {
$emailLog = $this->initEmailLog();

if ($this->config->versionCompare('2.3.0')) {
if ($this->config->versionCompare('2.2.8')) {
$name = $this->getRecipientsNameByEmail($recipient);
} else {
$name = $this->getRecipientName($key);
Expand Down

0 comments on commit 532dba7

Please sign in to comment.