MailChimp for WooCommerce - Version 1.0.9

Version Description

  • billing and shipping address support for orders
Download this release

Release Info

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

Code changes from version 1.0.8 to 1.0.9

README.txt CHANGED
@@ -1,4 +1,4 @@
1
- === MailChimp for WooCommerce ===
2
  Contributors: ryanhungate, MailChimp
3
  Tags: ecommerce,email,workflows,mailchimp
4
  Donate link: https://mailchimp.com
@@ -21,6 +21,7 @@ You’ll have the power to:
21
  - Send product recommendations
22
  - Segment based on purchase history
23
  - View your results and measure ROI
 
24
 
25
  ###A note for current WooCommerce integration users
26
  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.
@@ -48,6 +49,9 @@ You’ll need to do a few things to connect your WooCommerce store to MailChimp.
48
  For more information on settings and configuration, please visit our Knowledge Base: [http://kb.mailchimp.com/integrations/e-commerce/connect-or-disconnect-mailchimp-for-woocommerce](http://kb.mailchimp.com/integrations/e-commerce/connect-or-disconnect-mailchimp-for-woocommerce)
49
 
50
  == Changelog ==
 
 
 
51
  = 1.0.8 =
52
  * add landing_site, financial status and discount information for orders
53
  * fix to support php 5.3
1
+ === WooCommerce MailChimp® ===
2
  Contributors: ryanhungate, MailChimp
3
  Tags: ecommerce,email,workflows,mailchimp
4
  Donate link: https://mailchimp.com
21
  - Send product recommendations
22
  - Segment based on purchase history
23
  - View your results and measure ROI
24
+ - Grow your audience and sell more stuff with Facebook Ad Campaigns in MailChimp (New)
25
 
26
  ###A note for current WooCommerce integration users
27
  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.
49
  For more information on settings and configuration, please visit our Knowledge Base: [http://kb.mailchimp.com/integrations/e-commerce/connect-or-disconnect-mailchimp-for-woocommerce](http://kb.mailchimp.com/integrations/e-commerce/connect-or-disconnect-mailchimp-for-woocommerce)
50
 
51
  == Changelog ==
52
+ = 1.0.9 =
53
+ * billing and shipping address support for orders
54
+
55
  = 1.0.8 =
56
  * add landing_site, financial status and discount information for orders
57
  * fix to support php 5.3
changelog.md CHANGED
@@ -1,3 +1,6 @@
 
 
 
1
  ** 1.0.8 **
2
  * add landing_site, financial status and discount information for orders
3
  * fix to support php 5.3
1
+ ** 1.0.9 **
2
+ * billing and shipping address support for orders
3
+
4
  ** 1.0.8 **
5
  * add landing_site, financial status and discount information for orders
6
  * fix to support php 5.3
includes/api/class-mailchimp-woocommerce-transform-orders.php CHANGED
@@ -172,7 +172,11 @@ class MailChimp_WooCommerce_Transform_Orders
172
  $address->setPostalCode($order->billing_postcode);
173
  $address->setCountry($order->billing_country);
174
  $address->setPhone($order->billing_phone);
175
- $address->setName('billing');
 
 
 
 
176
 
177
  $customer->setAddress($address);
178
 
@@ -362,7 +366,11 @@ class MailChimp_WooCommerce_Transform_Orders
362
  $billing->setPostalCode($order->billing_postcode);
363
  $billing->setCountry($order->billing_country);
364
  $billing->setPhone($order->billing_phone);
365
- $billing->setName('billing');
 
 
 
 
366
 
367
  $shipping = new MailChimp_WooCommerce_Address();
368
  $shipping->setAddress1($order->shipping_address_1);
@@ -374,7 +382,11 @@ class MailChimp_WooCommerce_Transform_Orders
374
  if (isset($order->shipping_phone)) {
375
  $shipping->setPhone($order->shipping_phone);
376
  }
377
- $shipping->setName('shipping');
 
 
 
 
378
 
379
  return (object) array('billing' => $billing, 'shipping' => $shipping);
380
  }
172
  $address->setPostalCode($order->billing_postcode);
173
  $address->setCountry($order->billing_country);
174
  $address->setPhone($order->billing_phone);
175
+
176
+ // if we have billing names set it here
177
+ if (!empty($order->billing_first_name) && !empty($order->billing_last_name)) {
178
+ $address->setName($order->billing_first_name.' '.$order->billing_last_name);
179
+ }
180
 
181
  $customer->setAddress($address);
182
 
366
  $billing->setPostalCode($order->billing_postcode);
367
  $billing->setCountry($order->billing_country);
368
  $billing->setPhone($order->billing_phone);
369
+
370
+ // if we have billing names go ahead and apply them
371
+ if (!empty($order->billing_first_name) && !empty($order->billing_last_name)) {
372
+ $billing->setName($order->billing_first_name.' '.$order->billing_last_name);
373
+ }
374
 
375
  $shipping = new MailChimp_WooCommerce_Address();
376
  $shipping->setAddress1($order->shipping_address_1);
382
  if (isset($order->shipping_phone)) {
383
  $shipping->setPhone($order->shipping_phone);
384
  }
385
+
386
+ // if we have shipping names go ahead and apply them
387
+ if (!empty($order->shipping_first_name) && !empty($order->shipping_last_name)) {
388
+ $shipping->setName($order->shipping_first_name.' '.$order->shipping_last_name);
389
+ }
390
 
391
  return (object) array('billing' => $billing, 'shipping' => $shipping);
392
  }
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: MailChimp - WooCommerce plugin
19
- * Version: 1.0.8
20
  * Author: MailChimp
21
  * Author URI: https://mailchimp.com
22
  * License: GPL-2.0+
@@ -39,7 +39,7 @@ function mailchimp_environment_variables() {
39
  return (object) array(
40
  'repo' => 'master',
41
  'environment' => 'production',
42
- 'version' => '1.0.8',
43
  'wp_version' => (empty($wp_version) ? 'Unknown' : $wp_version),
44
  );
45
  }
16
  * Plugin Name: MailChimp for WooCommerce
17
  * Plugin URI: https://mailchimp.com/connect-your-store/
18
  * Description: MailChimp - WooCommerce plugin
19
+ * Version: 1.0.9
20
  * Author: MailChimp
21
  * Author URI: https://mailchimp.com
22
  * License: GPL-2.0+
39
  return (object) array(
40
  'repo' => 'master',
41
  'environment' => 'production',
42
+ 'version' => '1.0.9',
43
  'wp_version' => (empty($wp_version) ? 'Unknown' : $wp_version),
44
  );
45
  }