WooCommerce MailChimp - Version 1.1.3

Version Description

  • Minor action hook change since order meta (needed for MailChimp API call) is not yet available on 'woocommerce_new_order' hook
Download this release

Release Info

Developer anderly
Plugin Icon 128x128 WooCommerce MailChimp
Version 1.1.3
Comparing to
See all releases

Code changes from version 1.1.2 to 1.1.3

README.md CHANGED
@@ -53,6 +53,9 @@ Thanks in advance for your help on any translation efforts!
53
 
54
  ### Changelog
55
 
 
 
 
56
  ##### 1.1.2
57
  * Update to REALLY address issue with subscriptions not occurring on order create "pending"
58
 
53
 
54
  ### Changelog
55
 
56
+ ##### 1.1.3
57
+ * Minor action hook change since order meta (needed for MailChimp API call) is not yet available on 'woocommerce_new_order' hook
58
+
59
  ##### 1.1.2
60
  * Update to REALLY address issue with subscriptions not occurring on order create "pending"
61
 
classes/class-ss-wc-integration-mailchimp.php CHANGED
@@ -9,7 +9,7 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
9
  *
10
  * @class SS_WC_Integration_MailChimp
11
  * @extends WC_Integration
12
- * @version 1.1.1
13
  * @package WooCommerce MailChimp
14
  * @author Saint Systems
15
  */
@@ -54,8 +54,11 @@ class SS_WC_Integration_MailChimp extends WC_Integration {
54
  add_action( 'woocommerce_update_options_integration', array( $this, 'process_admin_options') );
55
  add_action( 'woocommerce_update_options_integration_' . $this->id, array( $this, 'process_admin_options') );
56
 
 
 
 
 
57
  // hook into woocommerce order status changed hook to handle the desired subscription event trigger
58
- add_action( 'woocommerce_new_order', array( &$this, 'order_status_changed' ), 10, 1 );
59
  add_action( 'woocommerce_order_status_changed', array( &$this, 'order_status_changed' ), 10, 3 );
60
 
61
  // Maybe add an "opt-in" field to the checkout
@@ -165,10 +168,10 @@ class SS_WC_Integration_MailChimp extends WC_Integration {
165
  'title' => __( 'Subscribe Event', 'ss_wc_mailchimp' ),
166
  'type' => 'select',
167
  'description' => __( 'When should customers be subscribed to lists?', 'ss_wc_mailchimp' ),
168
- 'default' => 'completed',
169
  'options' => array(
170
- 'completed' => __( 'Order Completed', 'ss_wc_mailchimp' ),
171
  'pending' => __( 'Order Created', 'ss_wc_mailchimp' ),
 
172
  ),
173
  ),
174
  'api_key' => array(
9
  *
10
  * @class SS_WC_Integration_MailChimp
11
  * @extends WC_Integration
12
+ * @version 1.1.3
13
  * @package WooCommerce MailChimp
14
  * @author Saint Systems
15
  */
54
  add_action( 'woocommerce_update_options_integration', array( $this, 'process_admin_options') );
55
  add_action( 'woocommerce_update_options_integration_' . $this->id, array( $this, 'process_admin_options') );
56
 
57
+ // We would use the 'woocommerce_new_order' action but first name, last name and email address (order meta) is not yet available,
58
+ // so instead we use the 'woocommerce_checkout_update_order_meta' action hook which fires at the end of the checkout process after the order meta has been saved
59
+ add_action( 'woocommerce_checkout_update_order_meta', array( &$this, 'order_status_changed' ), 10, 1 );
60
+
61
  // hook into woocommerce order status changed hook to handle the desired subscription event trigger
 
62
  add_action( 'woocommerce_order_status_changed', array( &$this, 'order_status_changed' ), 10, 3 );
63
 
64
  // Maybe add an "opt-in" field to the checkout
168
  'title' => __( 'Subscribe Event', 'ss_wc_mailchimp' ),
169
  'type' => 'select',
170
  'description' => __( 'When should customers be subscribed to lists?', 'ss_wc_mailchimp' ),
171
+ 'default' => 'pending',
172
  'options' => array(
 
173
  'pending' => __( 'Order Created', 'ss_wc_mailchimp' ),
174
+ 'completed' => __( 'Order Completed', 'ss_wc_mailchimp' ),
175
  ),
176
  ),
177
  'api_key' => array(
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: anderly, saintsystems
3
  Tags: woocommerce, mailchimp
4
  Requires at least: 3.6
5
  Tested up to: 3.8
6
- Stable tag: 1.1.2
7
  License: GPLv3
8
 
9
  Simple MailChimp integration for WooCommerce.
@@ -67,6 +67,9 @@ Thanks in advance for your help on any translation efforts!
67
 
68
  == Changelog ==
69
 
 
 
 
70
  = 1.1.2 =
71
  * Update to REALLY address issue with subscriptions not occurring on order create "pending"
72
 
3
  Tags: woocommerce, mailchimp
4
  Requires at least: 3.6
5
  Tested up to: 3.8
6
+ Stable tag: 1.1.3
7
  License: GPLv3
8
 
9
  Simple MailChimp integration for WooCommerce.
67
 
68
  == Changelog ==
69
 
70
+ = 1.1.3 =
71
+ * Minor action hook change since order meta (needed for MailChimp API call) is not yet available on 'woocommerce_new_order' hook
72
+
73
  = 1.1.2 =
74
  * Update to REALLY address issue with subscriptions not occurring on order create "pending"
75
 
woocommerce-mailchimp.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: WooCommerce MailChimp
4
  Plugin URI: http://anderly.com/woocommerce-mailchimp
5
  Description: WooCommerce MailChimp provides simple MailChimp integration for WooCommerce.
6
- Version: 1.1.2
7
  Author: Adam Anderly
8
  Author URI: http://anderly.com
9
 
3
  Plugin Name: WooCommerce MailChimp
4
  Plugin URI: http://anderly.com/woocommerce-mailchimp
5
  Description: WooCommerce MailChimp provides simple MailChimp integration for WooCommerce.
6
+ Version: 1.1.3
7
  Author: Adam Anderly
8
  Author URI: http://anderly.com
9