MailChimp for WooCommerce - Version 2.5.3

Version Description

Download this release

Release Info

Developer ryanhungate
Plugin Icon wp plugin MailChimp for WooCommerce
Version 2.5.3
Comparing to
See all releases

Code changes from version 2.5.2 to 2.5.3

CHANGELOG.txt CHANGED
@@ -1,4 +1,6 @@
1
  == Changelog ==
 
 
2
  = 2.5.2 =
3
  * cache gdpr fields for performance
4
  * force a currency code when not present
1
  == Changelog ==
2
+ = 2.5.3 =
3
+ * remove order_total and total_spent from customer submission
4
  = 2.5.2 =
5
  * cache gdpr fields for performance
6
  * force a currency code when not present
README.txt CHANGED
@@ -4,10 +4,10 @@ Tags: ecommerce,email,workflows,mailchimp
4
  Donate link: https://mailchimp.com
5
  Requires at least: 4.9
6
  Tested up to: 5.8
7
- Stable tag: 2.5.2
8
  Requires PHP: 7.0
9
  WC requires at least: 3.5
10
- WC tested up to: 5.5
11
  License: GPLv2 or later
12
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
13
  Connect your store to your Mailchimp audience to track sales, create targeted emails, send abandoned cart emails, and more.
@@ -25,6 +25,7 @@ Join the 17 million customers who use Mailchimp, the world's largest marketing a
25
  - Automatically embed a pop-up form that converts your website visitors to subscribers.
26
  - Add discount codes created in WooCommerce to your emails and automations with a Promo Code content block
27
  - Create beautiful landing pages that make it easy to highlight your products, promote a sale or giveaway, and grow your audience.
 
28
  ###Important Notes
29
  This plugin supports our most powerful API 3.0 features, and is intended for users who have not yet integrated their WooCommerce stores with Mailchimp.
30
  You can run this new integration at the same time as your current WooCommerce integration for Mailchimp. However, data from the older integration will display separately in subscriber profiles, and can’t be used with e-commerce features that require API 3.0.
@@ -77,10 +78,8 @@ At this time, the synchronization of product categories from WooCommerce to Mail
77
  If you are unable to sync or connect with Mailchimp, you can open a ticket on our [Github plugin page](https://github.com/mailchimp/mc-woocommerce/issues). Please provide the version of the plugin and PHP you're using, any fatal errors in the WooCommerce logs (WooCommerce -> Status -> Logs) you're seeing, along with relevant information to the problem you're experiencing.
78
 
79
  == Changelog ==
80
- = 2.5.2 =
81
- * cache gdpr fields for performance
82
- * force a currency code when not present
83
- * allow admins to see a newsletter checkbox if configured
84
 
85
  [Historical Changelog](https://raw.githubusercontent.com/mailchimp/mc-woocommerce/master/CHANGELOG.txt)
86
 
4
  Donate link: https://mailchimp.com
5
  Requires at least: 4.9
6
  Tested up to: 5.8
7
+ Stable tag: 2.5.3
8
  Requires PHP: 7.0
9
  WC requires at least: 3.5
10
+ WC tested up to: 5.7
11
  License: GPLv2 or later
12
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
13
  Connect your store to your Mailchimp audience to track sales, create targeted emails, send abandoned cart emails, and more.
25
  - Automatically embed a pop-up form that converts your website visitors to subscribers.
26
  - Add discount codes created in WooCommerce to your emails and automations with a Promo Code content block
27
  - Create beautiful landing pages that make it easy to highlight your products, promote a sale or giveaway, and grow your audience.
28
+ - This plugin is [WPML compatible](https://wpml.org/plugin/mailchimp-for-woocommerce/)
29
  ###Important Notes
30
  This plugin supports our most powerful API 3.0 features, and is intended for users who have not yet integrated their WooCommerce stores with Mailchimp.
31
  You can run this new integration at the same time as your current WooCommerce integration for Mailchimp. However, data from the older integration will display separately in subscriber profiles, and can’t be used with e-commerce features that require API 3.0.
78
  If you are unable to sync or connect with Mailchimp, you can open a ticket on our [Github plugin page](https://github.com/mailchimp/mc-woocommerce/issues). Please provide the version of the plugin and PHP you're using, any fatal errors in the WooCommerce logs (WooCommerce -> Status -> Logs) you're seeing, along with relevant information to the problem you're experiencing.
79
 
80
  == Changelog ==
81
+ = 2.5.3 =
82
+ * remove order_total and total_spent from customer submission
 
 
83
 
84
  [Historical Changelog](https://raw.githubusercontent.com/mailchimp/mc-woocommerce/master/CHANGELOG.txt)
85
 
bootstrap.php CHANGED
@@ -87,7 +87,7 @@ function mailchimp_environment_variables() {
87
  return (object) array(
88
  'repo' => 'master',
89
  'environment' => 'production', // staging or production
90
- 'version' => '2.5.2',
91
  'php_version' => phpversion(),
92
  'wp_version' => (empty($wp_version) ? 'Unknown' : $wp_version),
93
  'wc_version' => function_exists('WC') ? WC()->version : null,
87
  return (object) array(
88
  'repo' => 'master',
89
  'environment' => 'production', // staging or production
90
+ 'version' => '2.5.3',
91
  'php_version' => phpversion(),
92
  'wp_version' => (empty($wp_version) ? 'Unknown' : $wp_version),
93
  'wc_version' => function_exists('WC') ? WC()->version : null,
includes/api/assets/class-mailchimp-customer.php CHANGED
@@ -35,8 +35,8 @@ class MailChimp_WooCommerce_Customer
35
  'company' => 'string',
36
  'first_name' => 'string',
37
  'last_name' => 'string',
38
- 'orders_count' => 'integer',
39
- 'total_spent' => 'integer',
40
  );
41
  }
42
 
@@ -306,8 +306,8 @@ class MailChimp_WooCommerce_Customer
306
  'company' => (string) $this->getCompany(),
307
  'first_name' => (string) $this->getFirstName(),
308
  'last_name' => (string) $this->getLastName(),
309
- 'orders_count' => (int) $this->getOrdersCount(),
310
- 'total_spent' => floatval(number_format($this->getTotalSpent(), 2, '.', '')),
311
  'address' => (empty($address) ? null : $address),
312
  ));
313
  }
35
  'company' => 'string',
36
  'first_name' => 'string',
37
  'last_name' => 'string',
38
+ //'orders_count' => 'integer',
39
+ //'total_spent' => 'integer',
40
  );
41
  }
42
 
306
  'company' => (string) $this->getCompany(),
307
  'first_name' => (string) $this->getFirstName(),
308
  'last_name' => (string) $this->getLastName(),
309
+ //'orders_count' => (int) $this->getOrdersCount(),
310
+ //'total_spent' => floatval(number_format($this->getTotalSpent(), 2, '.', '')),
311
  'address' => (empty($address) ? null : $address),
312
  ));
313
  }
includes/api/assets/class-mailchimp-order.php CHANGED
@@ -138,8 +138,8 @@ class MailChimp_WooCommerce_Order
138
  */
139
  public function setId($id)
140
  {
141
- $this->id = preg_replace('/[^0-9]/i','', $id);
142
-
143
  return $this;
144
  }
145
 
138
  */
139
  public function setId($id)
140
  {
141
+ // old regex preg_replace('/[^0-9]/i','', $id);
142
+ $this->id = preg_replace('/[^a-zA-Z\d\-_]/', '', $id);
143
  return $this;
144
  }
145
 
includes/api/class-mailchimp-woocommerce-transform-orders-wc3.php CHANGED
@@ -239,12 +239,13 @@ class MailChimp_WooCommerce_Transform_Orders
239
  $customer->setLastName($order->get_billing_last_name());
240
  $customer->setAddress($this->transformBillingAddress($order));
241
 
242
- if (!($stats = $this->getCustomerOrderTotals($order))) {
243
- $stats = (object) array('count' => 0, 'total' => 0);
244
- }
245
-
246
- $customer->setOrdersCount($stats->count);
247
- $customer->setTotalSpent($stats->total);
 
248
 
249
  // we now hold this data inside the customer object for usage in the order handler class
250
  // we only update the subscriber status on a member IF they were subscribed.
239
  $customer->setLastName($order->get_billing_last_name());
240
  $customer->setAddress($this->transformBillingAddress($order));
241
 
242
+ // removing this because it's causing issues with the order counts
243
+ // if (!($stats = $this->getCustomerOrderTotals($order))) {
244
+ // $stats = (object) array('count' => 0, 'total' => 0);
245
+ // }
246
+ //
247
+ // $customer->setOrdersCount($stats->count);
248
+ // $customer->setTotalSpent($stats->total);
249
 
250
  // we now hold this data inside the customer object for usage in the order handler class
251
  // we only update the subscriber status on a member IF they were subscribed.
mailchimp-woocommerce.php CHANGED
@@ -16,7 +16,7 @@
16
  * Plugin Name: Mailchimp for WooCommerce
17
  * Plugin URI: https://mailchimp.com/connect-your-store/
18
  * Description: Connects WooCommerce to Mailchimp to sync your store data, send targeted campaigns to your customers, and sell more stuff.
19
- * Version: 2.5.2
20
  * Author: Mailchimp
21
  * Author URI: https://mailchimp.com
22
  * License: GPL-2.0+
@@ -24,9 +24,9 @@
24
  * Text Domain: mailchimp-for-woocommerce
25
  * Domain Path: /languages
26
  * Requires at least: 4.9
27
- * Tested up to: 5.7
28
  * WC requires at least: 3.5
29
- * WC tested up to: 5.1
30
  */
31
 
32
  // If this file is called directly, abort.
16
  * Plugin Name: Mailchimp for WooCommerce
17
  * Plugin URI: https://mailchimp.com/connect-your-store/
18
  * Description: Connects WooCommerce to Mailchimp to sync your store data, send targeted campaigns to your customers, and sell more stuff.
19
+ * Version: 2.5.3
20
  * Author: Mailchimp
21
  * Author URI: https://mailchimp.com
22
  * License: GPL-2.0+
24
  * Text Domain: mailchimp-for-woocommerce
25
  * Domain Path: /languages
26
  * Requires at least: 4.9
27
+ * Tested up to: 5.8
28
  * WC requires at least: 3.5
29
+ * WC tested up to: 5.7
30
  */
31
 
32
  // If this file is called directly, abort.