Compare commits
3 Commits
update-plu
...
3.87.1
Author | SHA1 | Date | |
---|---|---|---|
bf9f77b861 | |||
4ab67af847 | |||
afbc91a5c2 |
@ -306,13 +306,21 @@ class WooCommerce {
|
|||||||
$now = (Carbon::createFromTimestamp($this->wp->currentTime('timestamp')))->format('Y-m-d H:i:s');
|
$now = (Carbon::createFromTimestamp($this->wp->currentTime('timestamp')))->format('Y-m-d H:i:s');
|
||||||
$source = Source::WOOCOMMERCE_USER;
|
$source = Source::WOOCOMMERCE_USER;
|
||||||
foreach ($emails as $email) {
|
foreach ($emails as $email) {
|
||||||
$subscribersValues[] = "(1, '{$email}', '{$status}', '{$now}', '{$now}', '{$source}')";
|
$email = strval($this->connection->quote($email));
|
||||||
|
$subscribersValues[] = "(1, {$email}, '{$status}', '{$now}', '{$now}', '{$source}')";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Update existing subscribers
|
||||||
|
$this->connection->executeQuery('
|
||||||
|
UPDATE ' . $subscribersTable . ' mps
|
||||||
|
SET mps.is_woocommerce_user = 1
|
||||||
|
WHERE mps.email IN (:emails)
|
||||||
|
', ['emails' => $emails], ['emails' => Connection::PARAM_STR_ARRAY]);
|
||||||
|
|
||||||
|
// Insert new subscribers
|
||||||
$this->connection->executeQuery('
|
$this->connection->executeQuery('
|
||||||
INSERT IGNORE INTO ' . $subscribersTable . ' (`is_woocommerce_user`, `email`, `status`, `created_at`, `last_subscribed_at`, `source`) VALUES
|
INSERT IGNORE INTO ' . $subscribersTable . ' (`is_woocommerce_user`, `email`, `status`, `created_at`, `last_subscribed_at`, `source`) VALUES
|
||||||
' . implode(',', $subscribersValues) . '
|
' . implode(',', $subscribersValues) . '
|
||||||
ON DUPLICATE KEY UPDATE is_woocommerce_user = 1
|
|
||||||
');
|
');
|
||||||
|
|
||||||
return count($emails);
|
return count($emails);
|
||||||
@ -485,6 +493,7 @@ class WooCommerce {
|
|||||||
if ($this->needsCollationChange()) {
|
if ($this->needsCollationChange()) {
|
||||||
$collation = "COLLATE $this->mailpoetEmailCollation";
|
$collation = "COLLATE $this->mailpoetEmailCollation";
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->connection->executeQuery("
|
$this->connection->executeQuery("
|
||||||
CREATE TEMPORARY TABLE {$tmpTableName}
|
CREATE TEMPORARY TABLE {$tmpTableName}
|
||||||
(`email` varchar(150) NOT NULL, UNIQUE(`email`)) {$collation}
|
(`email` varchar(150) NOT NULL, UNIQUE(`email`)) {$collation}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Plugin Name: MailPoet 3 (New)
|
* Plugin Name: MailPoet 3 (New)
|
||||||
* Version: 3.87.0
|
* Version: 3.87.1
|
||||||
* Plugin URI: http://www.mailpoet.com
|
* Plugin URI: http://www.mailpoet.com
|
||||||
* Description: Create and send newsletters, post notifications and welcome emails from your WordPress.
|
* Description: Create and send newsletters, post notifications and welcome emails from your WordPress.
|
||||||
* Author: MailPoet
|
* Author: MailPoet
|
||||||
@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
$mailpoetPlugin = [
|
$mailpoetPlugin = [
|
||||||
'version' => '3.87.0',
|
'version' => '3.87.1',
|
||||||
'filename' => __FILE__,
|
'filename' => __FILE__,
|
||||||
'path' => dirname(__FILE__),
|
'path' => dirname(__FILE__),
|
||||||
'autoloader' => dirname(__FILE__) . '/vendor/autoload.php',
|
'autoloader' => dirname(__FILE__) . '/vendor/autoload.php',
|
||||||
|
@ -3,7 +3,7 @@ Contributors: mailpoet
|
|||||||
Tags: email, email marketing, post notification, woocommerce emails, email automation, newsletter, newsletter builder, newsletter subscribers
|
Tags: email, email marketing, post notification, woocommerce emails, email automation, newsletter, newsletter builder, newsletter subscribers
|
||||||
Requires at least: 5.6
|
Requires at least: 5.6
|
||||||
Tested up to: 5.9
|
Tested up to: 5.9
|
||||||
Stable tag: 3.87.0
|
Stable tag: 3.87.1
|
||||||
Requires PHP: 7.2
|
Requires PHP: 7.2
|
||||||
License: GPLv3
|
License: GPLv3
|
||||||
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
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
|
|||||||
|
|
||||||
== Changelog ==
|
== Changelog ==
|
||||||
|
|
||||||
|
= 3.87.1 - 2022-04-14 =
|
||||||
|
* Improved: minor changes and fixes.
|
||||||
|
|
||||||
= 3.87.0 - 2022-04-11 =
|
= 3.87.0 - 2022-04-11 =
|
||||||
* Added: new condition (at least 10 emails in lifetime) before marking subscriber as inactive;
|
* Added: new condition (at least 10 emails in lifetime) before marking subscriber as inactive;
|
||||||
* Added: logging for failed MailPoet key validation checks;
|
* Added: logging for failed MailPoet key validation checks;
|
||||||
|
Reference in New Issue
Block a user