MailPoet Newsletters (New) - Version 3.87.1

Version Description

  • 2022-04-14 =
  • Improved: minor changes and fixes.
Download this release

Release Info

Developer MailPoet
Plugin Icon 128x128 MailPoet Newsletters (New)
Version 3.87.1
Comparing to
See all releases

Code changes from version 3.87.0 to 3.87.1

lang/mailpoet.pot CHANGED
@@ -2,9 +2,9 @@
2
  # This file is distributed under the same license as the MailPoet 3 (New) package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: MailPoet 3 (New) 3.87.0\n"
6
  "Report-Msgid-Bugs-To: http://support.mailpoet.com/\n"
7
- "POT-Creation-Date: 2022-04-11 20:19:34+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
2
  # This file is distributed under the same license as the MailPoet 3 (New) package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: MailPoet 3 (New) 3.87.1\n"
6
  "Report-Msgid-Bugs-To: http://support.mailpoet.com/\n"
7
+ "POT-Creation-Date: 2022-04-14 08:54:15+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
lib/Segments/WooCommerce.php CHANGED
@@ -309,13 +309,21 @@ class WooCommerce {
309
  $now = (Carbon::createFromTimestamp($this->wp->currentTime('timestamp')))->format('Y-m-d H:i:s');
310
  $source = Source::WOOCOMMERCE_USER;
311
  foreach ($emails as $email) {
312
- $subscribersValues[] = "(1, '{$email}', '{$status}', '{$now}', '{$now}', '{$source}')";
 
313
  }
314
 
 
 
 
 
 
 
 
 
315
  $this->connection->executeQuery('
316
  INSERT IGNORE INTO ' . $subscribersTable . ' (`is_woocommerce_user`, `email`, `status`, `created_at`, `last_subscribed_at`, `source`) VALUES
317
  ' . implode(',', $subscribersValues) . '
318
- ON DUPLICATE KEY UPDATE is_woocommerce_user = 1
319
  ');
320
 
321
  return count($emails);
@@ -488,6 +496,7 @@ class WooCommerce {
488
  if ($this->needsCollationChange()) {
489
  $collation = "COLLATE $this->mailpoetEmailCollation";
490
  }
 
491
  $this->connection->executeQuery("
492
  CREATE TEMPORARY TABLE {$tmpTableName}
493
  (`email` varchar(150) NOT NULL, UNIQUE(`email`)) {$collation}
309
  $now = (Carbon::createFromTimestamp($this->wp->currentTime('timestamp')))->format('Y-m-d H:i:s');
310
  $source = Source::WOOCOMMERCE_USER;
311
  foreach ($emails as $email) {
312
+ $email = strval($this->connection->quote($email));
313
+ $subscribersValues[] = "(1, {$email}, '{$status}', '{$now}', '{$now}', '{$source}')";
314
  }
315
 
316
+ // Update existing subscribers
317
+ $this->connection->executeQuery('
318
+ UPDATE ' . $subscribersTable . ' mps
319
+ SET mps.is_woocommerce_user = 1
320
+ WHERE mps.email IN (:emails)
321
+ ', ['emails' => $emails], ['emails' => Connection::PARAM_STR_ARRAY]);
322
+
323
+ // Insert new subscribers
324
  $this->connection->executeQuery('
325
  INSERT IGNORE INTO ' . $subscribersTable . ' (`is_woocommerce_user`, `email`, `status`, `created_at`, `last_subscribed_at`, `source`) VALUES
326
  ' . implode(',', $subscribersValues) . '
 
327
  ');
328
 
329
  return count($emails);
496
  if ($this->needsCollationChange()) {
497
  $collation = "COLLATE $this->mailpoetEmailCollation";
498
  }
499
+
500
  $this->connection->executeQuery("
501
  CREATE TEMPORARY TABLE {$tmpTableName}
502
  (`email` varchar(150) NOT NULL, UNIQUE(`email`)) {$collation}
mailpoet.php CHANGED
@@ -5,7 +5,7 @@ if (!defined('ABSPATH')) exit;
5
 
6
  /*
7
  * Plugin Name: MailPoet 3 (New)
8
- * Version: 3.87.0
9
  * Plugin URI: http://www.mailpoet.com
10
  * Description: Create and send newsletters, post notifications and welcome emails from your WordPress.
11
  * Author: MailPoet
@@ -20,7 +20,7 @@ if (!defined('ABSPATH')) exit;
20
  */
21
 
22
  $mailpoetPlugin = [
23
- 'version' => '3.87.0',
24
  'filename' => __FILE__,
25
  'path' => dirname(__FILE__),
26
  'autoloader' => dirname(__FILE__) . '/vendor/autoload.php',
5
 
6
  /*
7
  * Plugin Name: MailPoet 3 (New)
8
+ * Version: 3.87.1
9
  * Plugin URI: http://www.mailpoet.com
10
  * Description: Create and send newsletters, post notifications and welcome emails from your WordPress.
11
  * Author: MailPoet
20
  */
21
 
22
  $mailpoetPlugin = [
23
+ 'version' => '3.87.1',
24
  'filename' => __FILE__,
25
  'path' => dirname(__FILE__),
26
  'autoloader' => dirname(__FILE__) . '/vendor/autoload.php',
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: mailpoet
3
  Tags: email, email marketing, post notification, woocommerce emails, email automation, newsletter, newsletter builder, newsletter subscribers
4
  Requires at least: 5.6
5
  Tested up to: 5.9
6
- Stable tag: 3.87.0
7
  Requires PHP: 7.2
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
@@ -218,6 +218,9 @@ Check our [Knowledge Base](https://kb.mailpoet.com) or contact us through our [s
218
 
219
  == Changelog ==
220
 
 
 
 
221
  = 3.87.0 - 2022-04-11 =
222
  * Added: new condition (at least 10 emails in lifetime) before marking subscriber as inactive;
223
  * Added: logging for failed MailPoet key validation checks;
3
  Tags: email, email marketing, post notification, woocommerce emails, email automation, newsletter, newsletter builder, newsletter subscribers
4
  Requires at least: 5.6
5
  Tested up to: 5.9
6
+ Stable tag: 3.87.1
7
  Requires PHP: 7.2
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
218
 
219
  == Changelog ==
220
 
221
+ = 3.87.1 - 2022-04-14 =
222
+ * Improved: minor changes and fixes.
223
+
224
  = 3.87.0 - 2022-04-11 =
225
  * Added: new condition (at least 10 emails in lifetime) before marking subscriber as inactive;
226
  * Added: logging for failed MailPoet key validation checks;
vendor/autoload.php CHANGED
@@ -2,4 +2,4 @@
2
  if (!defined('ABSPATH')) exit;
3
  // autoload.php @generated by Composer
4
  require_once __DIR__ . '/composer/autoload_real.php';
5
- return ComposerAutoloaderInit216dae76ec062cb460a0af6c750f824c::getLoader();
2
  if (!defined('ABSPATH')) exit;
3
  // autoload.php @generated by Composer
4
  require_once __DIR__ . '/composer/autoload_real.php';
5
+ return ComposerAutoloaderInit5f107f955e39ecf74c240c498fde1aa8::getLoader();
vendor/composer/autoload_real.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  if (!defined('ABSPATH')) exit;
3
  // autoload_real.php @generated by Composer
4
- class ComposerAutoloaderInit216dae76ec062cb460a0af6c750f824c
5
  {
6
  private static $loader;
7
  public static function loadClassLoader($class)
@@ -16,13 +16,13 @@ class ComposerAutoloaderInit216dae76ec062cb460a0af6c750f824c
16
  return self::$loader;
17
  }
18
  require __DIR__ . '/platform_check.php';
19
- spl_autoload_register(array('ComposerAutoloaderInit216dae76ec062cb460a0af6c750f824c', 'loadClassLoader'), true, true);
20
  self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
21
- spl_autoload_unregister(array('ComposerAutoloaderInit216dae76ec062cb460a0af6c750f824c', 'loadClassLoader'));
22
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
23
  if ($useStaticLoader) {
24
  require __DIR__ . '/autoload_static.php';
25
- call_user_func(\Composer\Autoload\ComposerStaticInit216dae76ec062cb460a0af6c750f824c::getInitializer($loader));
26
  } else {
27
  $map = require __DIR__ . '/autoload_namespaces.php';
28
  foreach ($map as $namespace => $path) {
@@ -39,17 +39,17 @@ class ComposerAutoloaderInit216dae76ec062cb460a0af6c750f824c
39
  }
40
  $loader->register(true);
41
  if ($useStaticLoader) {
42
- $includeFiles = Composer\Autoload\ComposerStaticInit216dae76ec062cb460a0af6c750f824c::$files;
43
  } else {
44
  $includeFiles = require __DIR__ . '/autoload_files.php';
45
  }
46
  foreach ($includeFiles as $fileIdentifier => $file) {
47
- composerRequire216dae76ec062cb460a0af6c750f824c($fileIdentifier, $file);
48
  }
49
  return $loader;
50
  }
51
  }
52
- function composerRequire216dae76ec062cb460a0af6c750f824c($fileIdentifier, $file)
53
  {
54
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
55
  $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
1
  <?php
2
  if (!defined('ABSPATH')) exit;
3
  // autoload_real.php @generated by Composer
4
+ class ComposerAutoloaderInit5f107f955e39ecf74c240c498fde1aa8
5
  {
6
  private static $loader;
7
  public static function loadClassLoader($class)
16
  return self::$loader;
17
  }
18
  require __DIR__ . '/platform_check.php';
19
+ spl_autoload_register(array('ComposerAutoloaderInit5f107f955e39ecf74c240c498fde1aa8', 'loadClassLoader'), true, true);
20
  self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
21
+ spl_autoload_unregister(array('ComposerAutoloaderInit5f107f955e39ecf74c240c498fde1aa8', 'loadClassLoader'));
22
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
23
  if ($useStaticLoader) {
24
  require __DIR__ . '/autoload_static.php';
25
+ call_user_func(\Composer\Autoload\ComposerStaticInit5f107f955e39ecf74c240c498fde1aa8::getInitializer($loader));
26
  } else {
27
  $map = require __DIR__ . '/autoload_namespaces.php';
28
  foreach ($map as $namespace => $path) {
39
  }
40
  $loader->register(true);
41
  if ($useStaticLoader) {
42
+ $includeFiles = Composer\Autoload\ComposerStaticInit5f107f955e39ecf74c240c498fde1aa8::$files;
43
  } else {
44
  $includeFiles = require __DIR__ . '/autoload_files.php';
45
  }
46
  foreach ($includeFiles as $fileIdentifier => $file) {
47
+ composerRequire5f107f955e39ecf74c240c498fde1aa8($fileIdentifier, $file);
48
  }
49
  return $loader;
50
  }
51
  }
52
+ function composerRequire5f107f955e39ecf74c240c498fde1aa8($fileIdentifier, $file)
53
  {
54
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
55
  $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
vendor/composer/autoload_static.php CHANGED
@@ -2,7 +2,7 @@
2
  // autoload_static.php @generated by Composer
3
  namespace Composer\Autoload;
4
  if (!defined('ABSPATH')) exit;
5
- class ComposerStaticInit216dae76ec062cb460a0af6c750f824c
6
  {
7
  public static $files = array (
8
  'e65c52a9094ad098d9369d5cad5421fa' => __DIR__ . '/../..' . '/lib/exceptions.php',
@@ -1445,9 +1445,9 @@ class ComposerStaticInit216dae76ec062cb460a0af6c750f824c
1445
  public static function getInitializer(ClassLoader $loader)
1446
  {
1447
  return \Closure::bind(function () use ($loader) {
1448
- $loader->prefixLengthsPsr4 = ComposerStaticInit216dae76ec062cb460a0af6c750f824c::$prefixLengthsPsr4;
1449
- $loader->prefixDirsPsr4 = ComposerStaticInit216dae76ec062cb460a0af6c750f824c::$prefixDirsPsr4;
1450
- $loader->classMap = ComposerStaticInit216dae76ec062cb460a0af6c750f824c::$classMap;
1451
  }, null, ClassLoader::class);
1452
  }
1453
  }
2
  // autoload_static.php @generated by Composer
3
  namespace Composer\Autoload;
4
  if (!defined('ABSPATH')) exit;
5
+ class ComposerStaticInit5f107f955e39ecf74c240c498fde1aa8
6
  {
7
  public static $files = array (
8
  'e65c52a9094ad098d9369d5cad5421fa' => __DIR__ . '/../..' . '/lib/exceptions.php',
1445
  public static function getInitializer(ClassLoader $loader)
1446
  {
1447
  return \Closure::bind(function () use ($loader) {
1448
+ $loader->prefixLengthsPsr4 = ComposerStaticInit5f107f955e39ecf74c240c498fde1aa8::$prefixLengthsPsr4;
1449
+ $loader->prefixDirsPsr4 = ComposerStaticInit5f107f955e39ecf74c240c498fde1aa8::$prefixDirsPsr4;
1450
+ $loader->classMap = ComposerStaticInit5f107f955e39ecf74c240c498fde1aa8::$classMap;
1451
  }, null, ClassLoader::class);
1452
  }
1453
  }
vendor/composer/installed.php CHANGED
@@ -7,7 +7,7 @@ if (!defined('ABSPATH')) exit;
7
  'type' => 'library',
8
  'install_path' => __DIR__ . '/../../',
9
  'aliases' => array(),
10
- 'reference' => '401c8163f2c8ed8f76a9ecf838233293c52a30f7',
11
  'name' => '__root__',
12
  'dev' => false,
13
  ),
@@ -18,7 +18,7 @@ if (!defined('ABSPATH')) exit;
18
  'type' => 'library',
19
  'install_path' => __DIR__ . '/../../',
20
  'aliases' => array(),
21
- 'reference' => '401c8163f2c8ed8f76a9ecf838233293c52a30f7',
22
  'dev_requirement' => false,
23
  ),
24
  'mtdowling/cron-expression' => array(
7
  'type' => 'library',
8
  'install_path' => __DIR__ . '/../../',
9
  'aliases' => array(),
10
+ 'reference' => 'bf9f77b861a5353427d151caf3785c2eae13466a',
11
  'name' => '__root__',
12
  'dev' => false,
13
  ),
18
  'type' => 'library',
19
  'install_path' => __DIR__ . '/../../',
20
  'aliases' => array(),
21
+ 'reference' => 'bf9f77b861a5353427d151caf3785c2eae13466a',
22
  'dev_requirement' => false,
23
  ),
24
  'mtdowling/cron-expression' => array(