WooCommerce MailChimp - Version 2.0.4

Version Description

Download this release

Release Info

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

Code changes from version 2.0.3 to 2.0.4

includes/class-ss-wc-mailchimp-handler.php CHANGED
@@ -83,12 +83,12 @@ if ( ! class_exists( 'SS_WC_MailChimp_Handler' ) ) {
83
  }
84
 
85
  /**
86
- * list function.
87
  *
88
  * @access public
89
  * @return string MailChimp list ID
90
  */
91
- public function list() {
92
  return $this->get_option( 'list' );
93
  }
94
 
@@ -159,7 +159,7 @@ if ( ! class_exists( 'SS_WC_MailChimp_Handler' ) ) {
159
  * @return boolean
160
  */
161
  public function has_list() {
162
- if ( $this->list() ) {
163
  return true;
164
  }
165
  return false;
@@ -214,10 +214,10 @@ if ( ! class_exists( 'SS_WC_MailChimp_Handler' ) ) {
214
  // or the 'ss_wc_mailchimp_opt_in' is yes, subscriber the customer
215
  if ( ! $subscribe_customer || empty( $subscribe_customer ) || 'yes' === $subscribe_customer ) {
216
  // log
217
- $this->log( sprintf( __( __METHOD__ . '(): Subscribing customer (%s) to list %s', 'woocommerce-mailchimp' ), $order->billing_email, $this->list() ) );
218
 
219
  // subscribe
220
- $this->subscribe( $order->id, $order->billing_first_name, $order->billing_last_name, $order->billing_email, $this->list() );
221
  }
222
  }
223
  }
@@ -436,7 +436,7 @@ if ( ! class_exists( 'SS_WC_MailChimp_Handler' ) ) {
436
  }
437
 
438
  if ( 'false' == $list_id ) {
439
- $list_id = $this->list();
440
  }
441
 
442
  $merge_tags = array(
83
  }
84
 
85
  /**
86
+ * get_list function.
87
  *
88
  * @access public
89
  * @return string MailChimp list ID
90
  */
91
+ public function get_list() {
92
  return $this->get_option( 'list' );
93
  }
94
 
159
  * @return boolean
160
  */
161
  public function has_list() {
162
+ if ( $this->get_list() ) {
163
  return true;
164
  }
165
  return false;
214
  // or the 'ss_wc_mailchimp_opt_in' is yes, subscriber the customer
215
  if ( ! $subscribe_customer || empty( $subscribe_customer ) || 'yes' === $subscribe_customer ) {
216
  // log
217
+ $this->log( sprintf( __( __METHOD__ . '(): Subscribing customer (%s) to list %s', 'woocommerce-mailchimp' ), $order->billing_email, $this->get_list() ) );
218
 
219
  // subscribe
220
+ $this->subscribe( $order->id, $order->billing_first_name, $order->billing_last_name, $order->billing_email, $this->get_list() );
221
  }
222
  }
223
  }
436
  }
437
 
438
  if ( 'false' == $list_id ) {
439
+ $list_id = $this->get_list();
440
  }
441
 
442
  $merge_tags = array(
includes/class-ss-wc-mailchimp-plugin.php CHANGED
@@ -7,7 +7,7 @@ final class SS_WC_MailChimp_Plugin {
7
 
8
  private static $_instance;
9
 
10
- private static $version = '2.0.3';
11
 
12
  private static $text_domain = 'woocommerce-mailchimp';
13
 
7
 
8
  private static $_instance;
9
 
10
+ private static $version = '2.0.4';
11
 
12
  private static $text_domain = 'woocommerce-mailchimp';
13
 
includes/class-ss-wc-settings-mailchimp.php CHANGED
@@ -84,12 +84,12 @@ if ( ! class_exists( 'SS_WC_Settings_MailChimp' ) ) {
84
  }
85
 
86
  /**
87
- * list function.
88
  *
89
  * @access public
90
  * @return string MailChimp list ID
91
  */
92
- public function list() {
93
  return $this->get_option( 'list' );
94
  }
95
 
@@ -160,7 +160,7 @@ if ( ! class_exists( 'SS_WC_Settings_MailChimp' ) ) {
160
  * @return boolean
161
  */
162
  public function has_list() {
163
- if ( $this->list() ) {
164
  return true;
165
  }
166
  return false;
@@ -668,7 +668,7 @@ if ( ! class_exists( 'SS_WC_Settings_MailChimp' ) ) {
668
  public function get_interest_groups() {
669
 
670
  if ( $this->api() && $this->has_list() ) {
671
- $interest_groups = $this->api()->get_interest_categories_with_interests( $this->list() );
672
  } else {
673
  return false;
674
  }
84
  }
85
 
86
  /**
87
+ * get_list function.
88
  *
89
  * @access public
90
  * @return string MailChimp list ID
91
  */
92
+ public function get_list() {
93
  return $this->get_option( 'list' );
94
  }
95
 
160
  * @return boolean
161
  */
162
  public function has_list() {
163
+ if ( $this->get_list() ) {
164
  return true;
165
  }
166
  return false;
668
  public function get_interest_groups() {
669
 
670
  if ( $this->api() && $this->has_list() ) {
671
+ $interest_groups = $this->api()->get_interest_categories_with_interests( $this->get_list() );
672
  } else {
673
  return false;
674
  }
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: saintsystems, anderly
3
  Tags: woocommerce, mailchimp
4
  Requires at least: 3.5.1
5
  Tested up to: 4.6.1
6
- Stable tag: 2.0.3
7
  License: GPLv3
8
 
9
  Simple and flexible MailChimp integration for WooCommerce.
@@ -97,7 +97,7 @@ Also, if you enjoy using the software [we'd love it if you could give us a revie
97
 
98
  == Changelog ==
99
 
100
- #### 2.0 - 2.0.3 - September 16, 2016
101
 
102
  **WARNING:** This release contains breaking changes to the plugins action hooks and filters. If you have custom code that hooks into the plugins action hooks and filters, please review the breaking changes below to know how to update your code appropriately.
103
 
@@ -135,6 +135,7 @@ Also, if you enjoy using the software [we'd love it if you could give us a revie
135
  **Fixes**
136
 
137
  - Fixed issues with translations and text domains not loading properly.
 
138
 
139
  #### 1.3.9 - September 13, 2016
140
 
3
  Tags: woocommerce, mailchimp
4
  Requires at least: 3.5.1
5
  Tested up to: 4.6.1
6
+ Stable tag: 2.0.4
7
  License: GPLv3
8
 
9
  Simple and flexible MailChimp integration for WooCommerce.
97
 
98
  == Changelog ==
99
 
100
+ #### 2.0 - 2.0.4 - September 16, 2016
101
 
102
  **WARNING:** This release contains breaking changes to the plugins action hooks and filters. If you have custom code that hooks into the plugins action hooks and filters, please review the breaking changes below to know how to update your code appropriately.
103
 
135
  **Fixes**
136
 
137
  - Fixed issues with translations and text domains not loading properly.
138
+ - Change `list` function to `get_list` to prevent PHP error
139
 
140
  #### 1.3.9 - September 13, 2016
141
 
woocommerce-mailchimp.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: WooCommerce MailChimp provides simple MailChimp integration for WooCommerce.
6
  * Author: Saint Systems
7
  * Author URI: https://www.saintsystems.com
8
- * Version: 2.0.3
9
  * Text Domain: woocommerce-mailchimp
10
  * Domain Path: languages
11
  *
5
  * Description: WooCommerce MailChimp provides simple MailChimp integration for WooCommerce.
6
  * Author: Saint Systems
7
  * Author URI: https://www.saintsystems.com
8
+ * Version: 2.0.4
9
  * Text Domain: woocommerce-mailchimp
10
  * Domain Path: languages
11
  *