Version Description
Download this release
Release Info
Developer | constantcontact |
Plugin | Creative Mail – Easier WordPress & WooCommerce Email Marketing |
Version | 1.6.5 |
Comparing to | |
See all releases |
Code changes from version 1.6.4 to 1.6.5
- CHANGELOG.md +2 -0
- README.md +2 -1
- creative-mail-plugin.php +3 -3
- readme.txt +2 -1
- src/Managers/CheckoutManager.php +20 -11
- src/Managers/DatabaseManager.php +25 -4
- vendor/autoload.php +1 -1
- vendor/composer/autoload_real.php +4 -4
- vendor/composer/autoload_static.php +5 -5
CHANGELOG.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1 |
Changelog
|
2 |
=========
|
|
|
|
|
3 |
|
4 |
#### 1.6.4 - November 21st, 2022
|
5 |
- Branding refactor
|
1 |
Changelog
|
2 |
=========
|
3 |
+
#### 1.6.5 - November 30th, 2022
|
4 |
+
- Abandoned Cart improvements
|
5 |
|
6 |
#### 1.6.4 - November 21st, 2022
|
7 |
- Branding refactor
|
README.md
CHANGED
@@ -3,7 +3,7 @@ Contributors: Newfold Digital
|
|
3 |
Tags: email, marketing, newsletter, subscribe, contact form, crm, automations, campaigns, ecommerce, promotion, offers, retargeting, newfold, newfold digital, correo electronico
|
4 |
Requires at least: 4.9
|
5 |
Tested up to: 6.1
|
6 |
-
Stable tag: 1.6.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
Requires PHP: 7.2
|
@@ -92,6 +92,7 @@ Creative Mail [Privacy Notice](https://newfold.com/privacy-center)
|
|
92 |
6. Enhance your brand with LogoBuilder
|
93 |
|
94 |
== Changelog ==
|
|
|
95 |
* 1.6.4 - Branding refactor
|
96 |
* 1.6.3 - Hotfix: Fixed a bug where the plugin was not working on some servers.
|
97 |
* 1.6.2 - Security updates and removal of Unsupported Plugin (Caldera Forms)
|
3 |
Tags: email, marketing, newsletter, subscribe, contact form, crm, automations, campaigns, ecommerce, promotion, offers, retargeting, newfold, newfold digital, correo electronico
|
4 |
Requires at least: 4.9
|
5 |
Tested up to: 6.1
|
6 |
+
Stable tag: 1.6.5
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
Requires PHP: 7.2
|
92 |
6. Enhance your brand with LogoBuilder
|
93 |
|
94 |
== Changelog ==
|
95 |
+
* 1.6.5 - Abandoned Cart improvements
|
96 |
* 1.6.4 - Branding refactor
|
97 |
* 1.6.3 - Hotfix: Fixed a bug where the plugin was not working on some servers.
|
98 |
* 1.6.2 - Security updates and removal of Unsupported Plugin (Caldera Forms)
|
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 Newfold Digital’s rock solid reliability.
|
11 |
* Author: Newfold Digital
|
12 |
-
* Version: 1.6.
|
13 |
* Author URI: https://newfold.com/
|
14 |
* WC requires at least: 3.6.0
|
15 |
* WC tested up to: 6.8.2
|
@@ -20,7 +20,7 @@ use CreativeMail\Blocks\LoadBlock;
|
|
20 |
define('CE4WP_PLUGIN_DIR', __DIR__ . '/');
|
21 |
define('CE4WP_PLUGIN_URL', plugin_dir_url(__FILE__) . '/');
|
22 |
define('CE4WP_PLUGIN_FILE', __FILE__);
|
23 |
-
define('CE4WP_PLUGIN_VERSION', '1.6.
|
24 |
define('CE4WP_INSTANCE_UUID_KEY', 'ce4wp_instance_uuid');
|
25 |
define('CE4WP_INSTANCE_HANDSHAKE_TOKEN', 'ce4wp_handshake_token');
|
26 |
define('CE4WP_INSTANCE_HANDSHAKE_EXPIRATION', 'ce4wp_handshake_expiration');
|
@@ -37,7 +37,7 @@ define('CE4WP_CHECKOUT_CHECKBOX_ENABLED', 'ce4wp_checkout_checkbox_enabled');
|
|
37 |
define('CE4WP_APP_GATEWAY_URL', 'https://app-gateway.creativemail.com/');
|
38 |
define('CE4WP_APP_URL', 'https://app.creativemail.com/');
|
39 |
define('CE4WP_ENVIRONMENT', 'PRODUCTION');
|
40 |
-
define('CE4WP_BUILD_NUMBER', '
|
41 |
define('CE4WP_RAYGUN_PHP_KEY', 'Z85xL3mkgnW13Ri9DajGUg');
|
42 |
define('CE4WP_BATCH_SIZE', 500);
|
43 |
define('CE4WP_WC_API_KEY_ID', 'ce4wp_woocommerce_api_key_id');
|
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 Newfold Digital’s rock solid reliability.
|
11 |
* Author: Newfold Digital
|
12 |
+
* Version: 1.6.5
|
13 |
* Author URI: https://newfold.com/
|
14 |
* WC requires at least: 3.6.0
|
15 |
* WC tested up to: 6.8.2
|
20 |
define('CE4WP_PLUGIN_DIR', __DIR__ . '/');
|
21 |
define('CE4WP_PLUGIN_URL', plugin_dir_url(__FILE__) . '/');
|
22 |
define('CE4WP_PLUGIN_FILE', __FILE__);
|
23 |
+
define('CE4WP_PLUGIN_VERSION', '1.6.5');
|
24 |
define('CE4WP_INSTANCE_UUID_KEY', 'ce4wp_instance_uuid');
|
25 |
define('CE4WP_INSTANCE_HANDSHAKE_TOKEN', 'ce4wp_handshake_token');
|
26 |
define('CE4WP_INSTANCE_HANDSHAKE_EXPIRATION', 'ce4wp_handshake_expiration');
|
37 |
define('CE4WP_APP_GATEWAY_URL', 'https://app-gateway.creativemail.com/');
|
38 |
define('CE4WP_APP_URL', 'https://app.creativemail.com/');
|
39 |
define('CE4WP_ENVIRONMENT', 'PRODUCTION');
|
40 |
+
define('CE4WP_BUILD_NUMBER', '1987');
|
41 |
define('CE4WP_RAYGUN_PHP_KEY', 'Z85xL3mkgnW13Ri9DajGUg');
|
42 |
define('CE4WP_BATCH_SIZE', 500);
|
43 |
define('CE4WP_WC_API_KEY_ID', 'ce4wp_woocommerce_api_key_id');
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: Newfold Digital
|
|
3 |
Tags: email, marketing, newsletter, subscribe, contact form, crm, automations, campaigns, ecommerce, promotion, offers, retargeting, newfold, newfold digital, correo electronico
|
4 |
Requires at least: 4.9
|
5 |
Tested up to: 6.1
|
6 |
-
Stable tag: 1.6.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
Requires PHP: 7.2
|
@@ -101,6 +101,7 @@ Creative Mail [Privacy Notice](https://newfold.com/privacy-center)
|
|
101 |
6. Enhance your brand with LogoBuilder
|
102 |
|
103 |
== Changelog ==
|
|
|
104 |
* 1.6.4 - Branding refactor
|
105 |
* 1.6.3 - Hotfix: Fixed a bug where the plugin was not working on some servers.
|
106 |
* 1.6.2 - Security updates and removal of Unsupported Plugin (Caldera Forms)
|
3 |
Tags: email, marketing, newsletter, subscribe, contact form, crm, automations, campaigns, ecommerce, promotion, offers, retargeting, newfold, newfold digital, correo electronico
|
4 |
Requires at least: 4.9
|
5 |
Tested up to: 6.1
|
6 |
+
Stable tag: 1.6.5
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
Requires PHP: 7.2
|
101 |
6. Enhance your brand with LogoBuilder
|
102 |
|
103 |
== Changelog ==
|
104 |
+
* 1.6.5 - Abandoned Cart improvements
|
105 |
* 1.6.4 - Branding refactor
|
106 |
* 1.6.3 - Hotfix: Fixed a bug where the plugin was not working on some servers.
|
107 |
* 1.6.2 - Security updates and removal of Unsupported Plugin (Caldera Forms)
|
src/Managers/CheckoutManager.php
CHANGED
@@ -337,7 +337,6 @@ final class CheckoutManager {
|
|
337 |
* @since 1.3.0
|
338 |
*/
|
339 |
public function save_or_clear_checkout_data( string $template_name ): void {
|
340 |
-
|
341 |
// If checkout page displayed, save checkout data.
|
342 |
if ( 'checkout/form-checkout.php' === $template_name ) {
|
343 |
$this->save_checkout_data();
|
@@ -431,14 +430,24 @@ final class CheckoutManager {
|
|
431 |
|
432 |
if ( empty($billing_email) ) {
|
433 |
$billing_email = $session_billing_email;
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
438 |
}
|
439 |
}
|
440 |
}
|
441 |
|
|
|
|
|
|
|
|
|
442 |
if ( ! $is_checkout ) {
|
443 |
$is_checkout = is_checkout();
|
444 |
}
|
@@ -1047,10 +1056,10 @@ final class CheckoutManager {
|
|
1047 |
list( $src ) = ( ! is_bool($image_src) ? $image_src : array( '' ) );
|
1048 |
}
|
1049 |
|
1050 |
-
$line_subtotal = empty( $
|
1051 |
-
$line_subtotal_tax = empty( $
|
1052 |
-
$line_total = empty( $
|
1053 |
-
$line_tax = empty( $
|
1054 |
|
1055 |
return array(
|
1056 |
'name' => $product->get_name(),
|
@@ -1059,13 +1068,13 @@ final class CheckoutManager {
|
|
1059 |
'product_data' => $product_data,
|
1060 |
'sku' => ( ! is_bool($product) && ! empty($product) ? $product->get_sku() : null ),
|
1061 |
'product_url' => get_the_permalink( $product_id ),
|
1062 |
-
'variation_id' => $
|
1063 |
'subtotal' => wc_format_decimal( $line_subtotal, $decimal_point ),
|
1064 |
'subtotal_tax' => wc_format_decimal( $line_subtotal_tax, $decimal_point ),
|
1065 |
'total' => wc_format_decimal( $line_total, $decimal_point ),
|
1066 |
'total_tax' => wc_format_decimal( $line_tax, $decimal_point ),
|
1067 |
'price' => wc_format_decimal( $line_subtotal, $decimal_point ),
|
1068 |
-
'quantity' => $
|
1069 |
);
|
1070 |
}
|
1071 |
}
|
337 |
* @since 1.3.0
|
338 |
*/
|
339 |
public function save_or_clear_checkout_data( string $template_name ): void {
|
|
|
340 |
// If checkout page displayed, save checkout data.
|
341 |
if ( 'checkout/form-checkout.php' === $template_name ) {
|
342 |
$this->save_checkout_data();
|
430 |
|
431 |
if ( empty($billing_email) ) {
|
432 |
$billing_email = $session_billing_email;
|
433 |
+
}
|
434 |
+
if ( empty($billing_email) && isset($_POST['post_data']) && isset($_POST['security'])
|
435 |
+
&& wp_verify_nonce(sanitize_text_field(wp_unslash($_POST['security'])), 'update-order-review') ) {
|
436 |
+
$post_data_array = rawurldecode(sanitize_text_field(wp_unslash($_POST['post_data'])));
|
437 |
+
$post_data_array = explode('&', $post_data_array);
|
438 |
+
foreach ( $post_data_array as $post_data ) {
|
439 |
+
$post_data_value = explode('=', $post_data);
|
440 |
+
if ( 'billing_email' == $post_data_value[0] ) {
|
441 |
+
$billing_email = $post_data_value[1];
|
442 |
+
break;
|
443 |
}
|
444 |
}
|
445 |
}
|
446 |
|
447 |
+
if ( empty($billing_email) ) {
|
448 |
+
$billing_email = WC()->session->get( self::BILLING_EMAIL );
|
449 |
+
}
|
450 |
+
|
451 |
if ( ! $is_checkout ) {
|
452 |
$is_checkout = is_checkout();
|
453 |
}
|
1056 |
list( $src ) = ( ! is_bool($image_src) ? $image_src : array( '' ) );
|
1057 |
}
|
1058 |
|
1059 |
+
$line_subtotal = empty( $product_raw_data['line_subtotal'] ) ? 0 : $product_raw_data['line_subtotal'];
|
1060 |
+
$line_subtotal_tax = empty( $product_raw_data['line_subtotal_tax'] ) ? 0 : $product_raw_data['line_subtotal_tax'];
|
1061 |
+
$line_total = empty( $product_raw_data['line_total'] ) ? 0 : $product_raw_data['line_total'];
|
1062 |
+
$line_tax = empty( $product_raw_data['line_tax'] ) ? 0 : $product_raw_data['line_tax'];
|
1063 |
|
1064 |
return array(
|
1065 |
'name' => $product->get_name(),
|
1068 |
'product_data' => $product_data,
|
1069 |
'sku' => ( ! is_bool($product) && ! empty($product) ? $product->get_sku() : null ),
|
1070 |
'product_url' => get_the_permalink( $product_id ),
|
1071 |
+
'variation_id' => $product_raw_data[ self::VARIATION_ID ],
|
1072 |
'subtotal' => wc_format_decimal( $line_subtotal, $decimal_point ),
|
1073 |
'subtotal_tax' => wc_format_decimal( $line_subtotal_tax, $decimal_point ),
|
1074 |
'total' => wc_format_decimal( $line_total, $decimal_point ),
|
1075 |
'total_tax' => wc_format_decimal( $line_tax, $decimal_point ),
|
1076 |
'price' => wc_format_decimal( $line_subtotal, $decimal_point ),
|
1077 |
+
'quantity' => $product_raw_data[ self::QUANTITY ],
|
1078 |
);
|
1079 |
}
|
1080 |
}
|
src/Managers/DatabaseManager.php
CHANGED
@@ -57,6 +57,11 @@ class DatabaseManager {
|
|
57 |
*/
|
58 |
const CONTACTS_TABLE_NAME = 'ce4wp_contacts';
|
59 |
|
|
|
|
|
|
|
|
|
|
|
60 |
public function add_hooks() {
|
61 |
add_action('admin_init', array( $this, 'update_database_check' ), 10, 2);
|
62 |
}
|
@@ -278,12 +283,21 @@ class DatabaseManager {
|
|
278 |
), array( self::CHECKOUT_UUID => $checkout_uuid ));
|
279 |
}
|
280 |
|
281 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
282 |
global $wpdb;
|
283 |
|
284 |
-
$table_name
|
285 |
-
|
286 |
-
|
|
|
|
|
287 |
return '1' === $consent_value;
|
288 |
}
|
289 |
|
@@ -343,6 +357,13 @@ class DatabaseManager {
|
|
343 |
return is_string($table_name) ? $table_name : '';
|
344 |
}
|
345 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
346 |
public function insert_contact( $data ) {
|
347 |
global $wpdb;
|
348 |
|
57 |
*/
|
58 |
const CONTACTS_TABLE_NAME = 'ce4wp_contacts';
|
59 |
|
60 |
+
/**
|
61 |
+
* Add hooks.
|
62 |
+
*
|
63 |
+
* @return void
|
64 |
+
*/
|
65 |
public function add_hooks() {
|
66 |
add_action('admin_init', array( $this, 'update_database_check' ), 10, 2);
|
67 |
}
|
283 |
), array( self::CHECKOUT_UUID => $checkout_uuid ));
|
284 |
}
|
285 |
|
286 |
+
/**
|
287 |
+
* Checks if the checkout exists and has consent in the database.
|
288 |
+
*
|
289 |
+
* @param string $checkout_uuid The checkout uuid.
|
290 |
+
*
|
291 |
+
* @return bool
|
292 |
+
*/
|
293 |
+
public function has_checkout_consent( string $checkout_uuid ) {
|
294 |
global $wpdb;
|
295 |
|
296 |
+
$table_name = $this->get_table_name(self::ABANDONED_CART_TABLE_NAME);
|
297 |
+
$consent_value = $wpdb->get_var(
|
298 |
+
// phpcs:disable WordPress.DB.PreparedSQL -- Okay use of unprepared variable for table name in SQL.
|
299 |
+
$wpdb->prepare("SELECT checkout_consent FROM {$table_name} WHERE checkout_uuid = '{$checkout_uuid}'")
|
300 |
+
);
|
301 |
return '1' === $consent_value;
|
302 |
}
|
303 |
|
357 |
return is_string($table_name) ? $table_name : '';
|
358 |
}
|
359 |
|
360 |
+
/**
|
361 |
+
* Insert a new contact into the database.
|
362 |
+
*
|
363 |
+
* @param mixed $data The contact data.
|
364 |
+
*
|
365 |
+
* @return void
|
366 |
+
*/
|
367 |
public function insert_contact( $data ) {
|
368 |
global $wpdb;
|
369 |
|
vendor/autoload.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInitebbc9dc47677799e98f2198d432a27a0::getLoader();
|
vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -22,15 +22,15 @@ class ComposerAutoloaderInit291c8f239b8d6fc41e800cf0e24b998e
|
|
22 |
return self::$loader;
|
23 |
}
|
24 |
|
25 |
-
spl_autoload_register(array('
|
26 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
27 |
-
spl_autoload_unregister(array('
|
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\
|
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 ComposerAutoloaderInitebbc9dc47677799e98f2198d432a27a0
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
22 |
return self::$loader;
|
23 |
}
|
24 |
|
25 |
+
spl_autoload_register(array('ComposerAutoloaderInitebbc9dc47677799e98f2198d432a27a0', 'loadClassLoader'), true, true);
|
26 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
27 |
+
spl_autoload_unregister(array('ComposerAutoloaderInitebbc9dc47677799e98f2198d432a27a0', '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\ComposerStaticInitebbc9dc47677799e98f2198d432a27a0::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
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'F' =>
|
@@ -194,10 +194,10 @@ class ComposerStaticInit291c8f239b8d6fc41e800cf0e24b998e
|
|
194 |
public static function getInitializer(ClassLoader $loader)
|
195 |
{
|
196 |
return \Closure::bind(function () use ($loader) {
|
197 |
-
$loader->prefixLengthsPsr4 =
|
198 |
-
$loader->prefixDirsPsr4 =
|
199 |
-
$loader->prefixesPsr0 =
|
200 |
-
$loader->classMap =
|
201 |
|
202 |
}, null, ClassLoader::class);
|
203 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInitebbc9dc47677799e98f2198d432a27a0
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'F' =>
|
194 |
public static function getInitializer(ClassLoader $loader)
|
195 |
{
|
196 |
return \Closure::bind(function () use ($loader) {
|
197 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInitebbc9dc47677799e98f2198d432a27a0::$prefixLengthsPsr4;
|
198 |
+
$loader->prefixDirsPsr4 = ComposerStaticInitebbc9dc47677799e98f2198d432a27a0::$prefixDirsPsr4;
|
199 |
+
$loader->prefixesPsr0 = ComposerStaticInitebbc9dc47677799e98f2198d432a27a0::$prefixesPsr0;
|
200 |
+
$loader->classMap = ComposerStaticInitebbc9dc47677799e98f2198d432a27a0::$classMap;
|
201 |
|
202 |
}, null, ClassLoader::class);
|
203 |
}
|