Creative Mail – Easier WordPress & WooCommerce Email Marketing - Version 1.3.1

Version Description

Download this release

Release Info

Developer constantcontact
Plugin Icon 128x128 Creative Mail – Easier WordPress & WooCommerce Email Marketing
Version 1.3.1
Comparing to
See all releases

Code changes from version 1.3.0 to 1.3.1

CHANGELOG.md CHANGED
@@ -1,7 +1,10 @@
1
  Changelog
2
  =========
3
 
4
- #### 1.3.0 - January 12 2021
 
 
 
5
  - Support for abandoned cart emails
6
 
7
  #### 1.2.4 - December 16 2020
1
  Changelog
2
  =========
3
 
4
+ #### 1.3.1 - January 20 2021
5
+ - Add the ability to show the amount of recovered revenue via abandoned carts
6
+
7
+ #### 1.3.0 - January 6 2021
8
  - Support for abandoned cart emails
9
 
10
  #### 1.2.4 - December 16 2020
README.md CHANGED
@@ -3,7 +3,7 @@ Contributors: Constant Contact
3
  Tags: email, marketing, newsletter, subscribe, contact form, constant contact, crm, automations, ecommerce, promotion, offers, retargeting
4
  Requires at least: 4.6
5
  Tested up to: 5.6
6
- Stable tag: 1.3.0
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
  Requires PHP: 5.6
@@ -88,6 +88,7 @@ Creative Mail by Constant Contact [Privacy Notice](https://www.endurance.com/pri
88
  6. Enhance your brand with logomaker
89
 
90
  == Changelog ==
 
91
  * 1.3.0 - Support for abandoned cart emails.
92
  * 1.2.4 - Introduces a 'Reset' button on the settings page for accounts that are stuck.
93
  * 1.2.3 - Fixes an issue where the banner would show up again after being dismissed.
3
  Tags: email, marketing, newsletter, subscribe, contact form, constant contact, crm, automations, ecommerce, promotion, offers, retargeting
4
  Requires at least: 4.6
5
  Tested up to: 5.6
6
+ Stable tag: 1.3.1
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
  Requires PHP: 5.6
88
  6. Enhance your brand with logomaker
89
 
90
  == Changelog ==
91
+ * 1.3.1 - Add the ability to show the amount of recovered revenue via abandoned carts.
92
  * 1.3.0 - Support for abandoned cart emails.
93
  * 1.2.4 - Introduces a 'Reset' button on the settings page for accounts that are stuck.
94
  * 1.2.3 - Fixes an issue where the banner would show up again after being dismissed.
creative-mail-plugin.php CHANGED
@@ -9,7 +9,7 @@
9
  * Plugin URI: https://wordpress.org/plugins/creative-mail-by-constant-contact/
10
  * Description: Free email marketing designed specifically for WordPress, Jetpack and WooCommerce. Send newsletters, promotions, updates and transactional e-commerce emails. Simple and easy, powered by Constant Contact’s rock solid reliability.
11
  * Author: Constant Contact
12
- * Version: 1.3.0
13
  * Author URI: https://www.constantcontact.com
14
  */
15
  use CreativeMail\CreativeMail;
@@ -24,7 +24,7 @@ function _load_ce4wp_plugin()
24
  define('CE4WP_PLUGIN_DIR', __DIR__ . '/');
25
  define('CE4WP_PLUGIN_URL', plugin_dir_url(__FILE__) . '/');
26
  define('CE4WP_PLUGIN_FILE', __FILE__);
27
- define('CE4WP_PLUGIN_VERSION', '1.3.0');
28
  define('CE4WP_INSTANCE_UUID_KEY', 'ce4wp_instance_uuid');
29
  define('CE4WP_INSTANCE_HANDSHAKE_TOKEN', 'ce4wp_handshake_token');
30
  define('CE4WP_INSTANCE_HANDSHAKE_EXPIRATION', 'ce4wp_handshake_expiration');
@@ -41,7 +41,7 @@ function _load_ce4wp_plugin()
41
  define('CE4WP_APP_GATEWAY_URL', 'https://app-gateway.creativemail.com/');
42
  define('CE4WP_APP_URL', 'https://app.creativemail.com/');
43
  define('CE4WP_ENVIRONMENT', 'PRODUCTION');
44
- define('CE4WP_BUILD_NUMBER', '961');
45
  define('CE4WP_BATCH_SIZE', 500);
46
  define('CE4WP_WC_API_KEY_ID', 'ce4wp_woocommerce_api_key_id');
47
  define('CE4WP_WC_API_CONSUMER_KEY', 'ce4wp_woocommerce_consumer_key');
9
  * Plugin URI: https://wordpress.org/plugins/creative-mail-by-constant-contact/
10
  * Description: Free email marketing designed specifically for WordPress, Jetpack and WooCommerce. Send newsletters, promotions, updates and transactional e-commerce emails. Simple and easy, powered by Constant Contact’s rock solid reliability.
11
  * Author: Constant Contact
12
+ * Version: 1.3.1
13
  * Author URI: https://www.constantcontact.com
14
  */
15
  use CreativeMail\CreativeMail;
24
  define('CE4WP_PLUGIN_DIR', __DIR__ . '/');
25
  define('CE4WP_PLUGIN_URL', plugin_dir_url(__FILE__) . '/');
26
  define('CE4WP_PLUGIN_FILE', __FILE__);
27
+ define('CE4WP_PLUGIN_VERSION', '1.3.1');
28
  define('CE4WP_INSTANCE_UUID_KEY', 'ce4wp_instance_uuid');
29
  define('CE4WP_INSTANCE_HANDSHAKE_TOKEN', 'ce4wp_handshake_token');
30
  define('CE4WP_INSTANCE_HANDSHAKE_EXPIRATION', 'ce4wp_handshake_expiration');
41
  define('CE4WP_APP_GATEWAY_URL', 'https://app-gateway.creativemail.com/');
42
  define('CE4WP_APP_URL', 'https://app.creativemail.com/');
43
  define('CE4WP_ENVIRONMENT', 'PRODUCTION');
44
+ define('CE4WP_BUILD_NUMBER', '975');
45
  define('CE4WP_BATCH_SIZE', 500);
46
  define('CE4WP_WC_API_KEY_ID', 'ce4wp_woocommerce_api_key_id');
47
  define('CE4WP_WC_API_CONSUMER_KEY', 'ce4wp_woocommerce_consumer_key');
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: Constant Contact
3
  Tags: email, marketing, newsletter, subscribe, contact form, constant contact, crm, automations, ecommerce, promotion, offers, retargeting
4
  Requires at least: 4.6
5
  Tested up to: 5.6
6
- Stable tag: 1.3.0
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
  Requires PHP: 5.6
@@ -93,6 +93,7 @@ Creative Mail by Constant Contact [Privacy Notice](https://www.endurance.com/pri
93
  6. Enhance your brand with logomaker
94
 
95
  == Changelog ==
 
96
  * 1.3.0 - Support for abandoned cart emails
97
  * 1.2.4 - Introduces a 'Reset' button on the settings page for accounts that are stuck.
98
  * 1.2.3 - Fixes an issue where the banner would show up again after being dismissed.
3
  Tags: email, marketing, newsletter, subscribe, contact form, constant contact, crm, automations, ecommerce, promotion, offers, retargeting
4
  Requires at least: 4.6
5
  Tested up to: 5.6
6
+ Stable tag: 1.3.1
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
  Requires PHP: 5.6
93
  6. Enhance your brand with logomaker
94
 
95
  == Changelog ==
96
+ * 1.3.1 - Add the ability to show the amount of recovered revenue via abandoned carts.
97
  * 1.3.0 - Support for abandoned cart emails
98
  * 1.2.4 - Introduces a 'Reset' button on the settings page for accounts that are stuck.
99
  * 1.2.3 - Fixes an issue where the banner would show up again after being dismissed.
src/managers/CheckoutManager.php CHANGED
@@ -27,6 +27,7 @@ class CheckoutManager
27
 
28
  const UPDATE_CHECKOUT_DATA = 'update_checkout_data';
29
  const META_CHECKOUT_UUID = 'ce4wp_checkout_uuid';
 
30
  const CHECKOUT_UUID = 'checkout_uuid';
31
  const NONCE = 'nonce';
32
  const EMAIL = 'email';
@@ -44,6 +45,7 @@ class CheckoutManager
44
  const USER_EMAIL = 'user_email';
45
  const PRODUCTS = 'products';
46
  const CUSTOMER = 'customer';
 
47
 
48
  /**
49
  * Add hooks
@@ -162,20 +164,20 @@ class CheckoutManager
162
  return;
163
  }
164
  // check if order had checkout uuid
165
- $uuid = $order->get_meta( self::META_CHECKOUT_UUID);
166
  // check if order is created with checkout meta
167
  if (empty($uuid)) {
168
  return;
169
  }
170
- // get the recovery date if recovered
171
- $recovery_date = $this->get_checkout_recovery_date($uuid);
172
- // Remote post to ce4wp marking checkout as completed
173
  $requestItem = new stdClass();
174
  $requestItem->uuid = $uuid;
175
  $requestItem->order_id = $order->get_id();
176
  $requestItem->order_total = $order->get_total();
177
  $requestItem->order_currency = $order->get_currency();
178
- $requestItem->recovery_date = $recovery_date;
179
  $endpoint = EnvironmentHelper::get_app_gateway_url('wordpress') . $endpoint;
180
  // call remote endpoint to update
181
  $this->ce4wp_remote_post($requestItem, $endpoint);
@@ -524,6 +526,13 @@ class CheckoutManager
524
  }
525
 
526
  $order->update_meta_data( self::META_CHECKOUT_UUID, $checkout_id );
 
 
 
 
 
 
 
527
  CreativeMail::get_instance()->get_database_manager()->remove_checkout_data($checkout_id);
528
  WC()->session->__unset( self::CHECKOUT_UUID );
529
  }
27
 
28
  const UPDATE_CHECKOUT_DATA = 'update_checkout_data';
29
  const META_CHECKOUT_UUID = 'ce4wp_checkout_uuid';
30
+ const META_CHECKOUT_RECOVERED = 'ce4wp_checkout_recovered';
31
  const CHECKOUT_UUID = 'checkout_uuid';
32
  const NONCE = 'nonce';
33
  const EMAIL = 'email';
45
  const USER_EMAIL = 'user_email';
46
  const PRODUCTS = 'products';
47
  const CUSTOMER = 'customer';
48
+ const DATETIME_ZERO = "0000-00-00 00:00:00";
49
 
50
  /**
51
  * Add hooks
164
  return;
165
  }
166
  // check if order had checkout uuid
167
+ $uuid = $order->get_meta( self::META_CHECKOUT_UUID, true);
168
  // check if order is created with checkout meta
169
  if (empty($uuid)) {
170
  return;
171
  }
172
+ // try find recovery date from order meta data
173
+ $recovery_date = $order->get_meta( self::META_CHECKOUT_RECOVERED, true);
174
+ // Remote post to ce4wp marking checkout as completed/created
175
  $requestItem = new stdClass();
176
  $requestItem->uuid = $uuid;
177
  $requestItem->order_id = $order->get_id();
178
  $requestItem->order_total = $order->get_total();
179
  $requestItem->order_currency = $order->get_currency();
180
+ $requestItem->recovery_date = (empty($recovery_date) || $recovery_date === self::DATETIME_ZERO) ? null : $recovery_date;
181
  $endpoint = EnvironmentHelper::get_app_gateway_url('wordpress') . $endpoint;
182
  // call remote endpoint to update
183
  $this->ce4wp_remote_post($requestItem, $endpoint);
526
  }
527
 
528
  $order->update_meta_data( self::META_CHECKOUT_UUID, $checkout_id );
529
+
530
+ // get the recovery date if recovered
531
+ $recovery_date = $this->get_checkout_recovery_date($checkout_id);
532
+ if (!empty($recovery_date) && $recovery_date !== self::DATETIME_ZERO)
533
+ {
534
+ $order->update_meta_data(self::META_CHECKOUT_RECOVERED, $recovery_date);
535
+ }
536
  CreativeMail::get_instance()->get_database_manager()->remove_checkout_data($checkout_id);
537
  WC()->session->__unset( self::CHECKOUT_UUID );
538
  }
src/views/consent.php DELETED
@@ -1,78 +0,0 @@
1
- <?php
2
-
3
- use CreativeMail\Helpers\EnvironmentHelper;
4
- use CreativeMail\Helpers\OptionsHelper;
5
-
6
- if ($_SERVER['REQUEST_METHOD'] === 'POST') {
7
- if($_POST['action'] === 'consent') {
8
- OptionsHelper::set_did_accept_consent();
9
- include 'onboarding.php';
10
- exit;
11
- }
12
- }
13
-
14
- ?>
15
-
16
- <div class="ce4wp-admin-wrapper">
17
- <header class="ce4wp-swoosh-header"></header>
18
-
19
- <div class="ce4wp-swoosh-container">
20
- <div style="margin-top: 0px;">
21
- <div class="ce4wp-backdrop">
22
- <div class="ce4wp-backdrop-container">
23
- <div class="ce4wp-backdrop-header">
24
- <div class="ce4wp-logo-poppins"></div>
25
- <div>
26
- <img src="<?php echo CE4WP_PLUGIN_URL . 'assets/images/airplane.svg'; ?>" class="ce4wp-airplane" alt="Paper airplane decoration">
27
- </div>
28
- </div>
29
-
30
- <div class="ce4wp-card">
31
- <div class="ce4wp-px-4 ce4wp-pt-4">
32
- <h1 class="ce4wp-typography-root ce4wp-typography-h1">
33
- <?= __( 'Intelligent email marketing for', 'ce4wp') ?><br /><?= __( 'WordPress and WooCommerce', 'ce4wp') ?>
34
- </h1>
35
- <h6 class="ce4wp-typography-root ce4wp-typography-h6 ce4wp-mt-4 ce4wp-mb-2">
36
- <?= __( 'With Creative Mail your blog posts, store promotions, announcements, event updates and more can be delivered straight into the inbox of your customers and prospects.', 'ce4wp') ?>
37
- </h6>
38
- <h6 class="ce4wp-typography-root ce4wp-typography-h6 ce4wp-mt-4 ce4wp-mb-2">
39
- <?= __( 'The fine print:', 'ce4wp') ?>
40
- </h6>
41
- <ul class="ce4wp-list-root pb-4 ce4wp-list-padding">
42
- <li class="ce4wp-list-item-root" style="max-width: 550px;">
43
- <div class="ce4wp-list-item-icon-root ce4wp-pr-3 ce4wp-mt-2">
44
- <svg class="ce4wp-svg-icon-root ce4wp-svg-icon-color" focusable="false" viewBox="0 0 24 24" aria-hidden="true">
45
- <path d="M4.75 8.12891L12.6953 0.183594L13.75 1.23828L4.75 10.2383L0.566406 6.05469L1.62109 5L4.75 8.12891Z" fill="#7A5CBD"/>
46
- </svg>
47
- </div>
48
- <div class="ce4wp-list-item-text-root ce4wp-d-flex ce4wp-flex-column ce4wp-m-0">
49
- <p class="ce4wp-typography-root ce4wp-body2" style="color: rgba(0, 0, 0, 0.6);">
50
- <?= __( 'By using Creative Mail you’ll share basic information about your site (including your site name and URL) with Constant Contact so that we can retrieve your blog posts, media files and store products for use in your emails;', 'ce4wp') ?>
51
- </p>
52
- </div>
53
- </li>
54
- <li class="ce4wp-list-item-root" style="max-width: 550px;">
55
- <div class="ce4wp-list-item-icon-root ce4wp-pr-3 ce4wp-mt-2">
56
- <svg class="ce4wp-svg-icon-root ce4wp-svg-icon-color" focusable="false" viewBox="0 0 24 24" aria-hidden="true">
57
- <path d="M4.75 8.12891L12.6953 0.183594L13.75 1.23828L4.75 10.2383L0.566406 6.05469L1.62109 5L4.75 8.12891Z" fill="#7A5CBD"/>
58
- </svg>
59
- </div>
60
- <div class="ce4wp-list-item-text-root ce4wp-d-flex ce4wp-flex-column ce4wp-m-0">
61
- <p class="ce4wp-typography-root ce4wp-body2" style="color: rgba(0, 0, 0, 0.6);">
62
- <?= __( 'Creative Mail uses tools, including cookies, to improve the performance and experience of the product. For more information you can read our', 'ce4wp') ?> <a href="https://www.endurance.com/privacy/privacy" target="_blank"><?= __( 'privacy notice', 'ce4wp') ?></a>.
63
- </p>
64
- </div>
65
- </li>
66
- </ul>
67
-
68
- <form name="disconnect" action="" method="post">
69
- <input type="hidden" name="action" value="consent" />
70
- <input name="disconnect_button" type="submit" class="ce4wp-button-base-root ce4wp-button-root ce4wp-button-contained ce4wp-button-contained-primary ce4wp-mb-4 ce4wp-mt-2" id="disconnect-instance" value="I Agree and let's get started!" />
71
- </form>
72
- </div>
73
- </div>
74
- </div>
75
- </div>
76
- </div>
77
- </div>
78
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit5218f9aec364198b823da642da7b30b2::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit9589a65f05c6dc7695e2164c69abdbad::getLoader();
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit5218f9aec364198b823da642da7b30b2
6
  {
7
  private static $loader;
8
 
@@ -22,15 +22,15 @@ class ComposerAutoloaderInit5218f9aec364198b823da642da7b30b2
22
  return self::$loader;
23
  }
24
 
25
- spl_autoload_register(array('ComposerAutoloaderInit5218f9aec364198b823da642da7b30b2', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
27
- spl_autoload_unregister(array('ComposerAutoloaderInit5218f9aec364198b823da642da7b30b2', 'loadClassLoader'));
28
 
29
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
30
  if ($useStaticLoader) {
31
  require_once __DIR__ . '/autoload_static.php';
32
 
33
- call_user_func(\Composer\Autoload\ComposerStaticInit5218f9aec364198b823da642da7b30b2::getInitializer($loader));
34
  } else {
35
  $map = require __DIR__ . '/autoload_namespaces.php';
36
  foreach ($map as $namespace => $path) {
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInit9589a65f05c6dc7695e2164c69abdbad
6
  {
7
  private static $loader;
8
 
22
  return self::$loader;
23
  }
24
 
25
+ spl_autoload_register(array('ComposerAutoloaderInit9589a65f05c6dc7695e2164c69abdbad', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
27
+ spl_autoload_unregister(array('ComposerAutoloaderInit9589a65f05c6dc7695e2164c69abdbad', 'loadClassLoader'));
28
 
29
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
30
  if ($useStaticLoader) {
31
  require_once __DIR__ . '/autoload_static.php';
32
 
33
+ call_user_func(\Composer\Autoload\ComposerStaticInit9589a65f05c6dc7695e2164c69abdbad::getInitializer($loader));
34
  } else {
35
  $map = require __DIR__ . '/autoload_namespaces.php';
36
  foreach ($map as $namespace => $path) {
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInit5218f9aec364198b823da642da7b30b2
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'F' =>
@@ -130,9 +130,9 @@ class ComposerStaticInit5218f9aec364198b823da642da7b30b2
130
  public static function getInitializer(ClassLoader $loader)
131
  {
132
  return \Closure::bind(function () use ($loader) {
133
- $loader->prefixLengthsPsr4 = ComposerStaticInit5218f9aec364198b823da642da7b30b2::$prefixLengthsPsr4;
134
- $loader->prefixDirsPsr4 = ComposerStaticInit5218f9aec364198b823da642da7b30b2::$prefixDirsPsr4;
135
- $loader->classMap = ComposerStaticInit5218f9aec364198b823da642da7b30b2::$classMap;
136
 
137
  }, null, ClassLoader::class);
138
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInit9589a65f05c6dc7695e2164c69abdbad
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'F' =>
130
  public static function getInitializer(ClassLoader $loader)
131
  {
132
  return \Closure::bind(function () use ($loader) {
133
+ $loader->prefixLengthsPsr4 = ComposerStaticInit9589a65f05c6dc7695e2164c69abdbad::$prefixLengthsPsr4;
134
+ $loader->prefixDirsPsr4 = ComposerStaticInit9589a65f05c6dc7695e2164c69abdbad::$prefixDirsPsr4;
135
+ $loader->classMap = ComposerStaticInit9589a65f05c6dc7695e2164c69abdbad::$classMap;
136
 
137
  }, null, ClassLoader::class);
138
  }