Skip to content

Commit

Permalink
Merge pull request #109 from sendsmaily/release/2.7.3
Browse files Browse the repository at this point in the history
Release 2.7.3
  • Loading branch information
kaittodesk authored May 6, 2024
2 parents 329c447 + 31e325e commit aed9da1
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

### 2.7.3

- Fixes non-existing array key warning on subscribers synchronization [[#108](https://github.com/sendsmaily/smaily-magento-extension/pull/108)] (thanks @raulikesvatera)

### 2.7.2

- PHP 8.2 compatibility [[#103](https://github.com/sendsmaily/smaily-magento-extension/pull/103)]
Expand Down
4 changes: 2 additions & 2 deletions Cron/SubscribersSync.php
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ protected function optOutNewsletterSubscribers(\Magento\Store\Api\Data\WebsiteIn

$smailyUnsubscribers = [];
foreach ($unsubscribers as $unsubscriber) {
$email = $unsubscriber['email'];
$email = strtolower($unsubscriber['email']);
$unsubscribedAt = new \DateTimeImmutable($unsubscriber['unsubscribed_at'], $timezoneLocal);

$smailyUnsubscribers[$email] = $unsubscribedAt->setTimezone($timezoneUTC);
Expand All @@ -268,7 +268,7 @@ protected function optOutNewsletterSubscribers(\Magento\Store\Api\Data\WebsiteIn
$subscribers = $this->resourceConnection->fetchAll($select);

foreach ($subscribers as $subscriber) {
$emailAddress = $subscriber['subscriber_email'];
$emailAddress = strtolower($subscriber['subscriber_email']);
$changeStatusAt = new \DateTimeImmutable($subscriber['change_status_at'], $timezoneUTC);
$unsubscribedAt = $smailyUnsubscribers[$emailAddress];

Expand Down
2 changes: 1 addition & 1 deletion Setup/Patch/Data/NormalizeSyncUnsubscribeStatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class NormalizeSyncUnsubscribeStatus implements \Magento\Framework\Setup\Patch\D
*/
public function __construct(
\Magento\Framework\Setup\ModuleDataSetupInterface $moduleDataSetup,
\Magento\Newsletter\Model\ResourceModel\Subscriber\Collection $newsletterSubscribersCollection,
\Magento\Newsletter\Model\ResourceModel\Subscriber\Collection $newsletterSubscribersCollection
) {
$this->moduleDataSetup = $moduleDataSetup;

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "smaily/smailyformagento",
"description": "Smaily extension for Magento 2",
"version": "2.7.2",
"version": "2.7.3",
"type": "magento2-module",
"license": "GPL-3.0-only",
"authors": [
Expand Down
2 changes: 1 addition & 1 deletion etc/module.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Smaily_SmailyForMagento" setup_version="2.7.2">
<module name="Smaily_SmailyForMagento" setup_version="2.7.3">
<sequence>
<module name="Magento_Newsletter" />
<module name="Magento_Captcha" />
Expand Down

0 comments on commit aed9da1

Please sign in to comment.