WooCommerce MailChimp - Version 2.0.18

Version Description

Download this release

Release Info

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

Code changes from version 2.0.17 to 2.0.18

includes/class-ss-wc-mailchimp-plugin.php CHANGED
@@ -9,7 +9,7 @@ final class SS_WC_MailChimp_Plugin {
9
  * Plugin version
10
  * @var string
11
  */
12
- private static $version = '2.0.17';
13
 
14
  /**
15
  * Plugin singleton instance
9
  * Plugin version
10
  * @var string
11
  */
12
+ private static $version = '2.0.18';
13
 
14
  /**
15
  * Plugin singleton instance
includes/migrations/class-ss-wc-migration-from-1.3.X-to-2.0.php CHANGED
@@ -2,6 +2,8 @@
2
 
3
  final class SS_WC_MailChimp_Migration_From_1_3_X_To_2_0 extends SS_WC_MailChimp_Migration {
4
 
 
 
5
  public function __construct( $current_version, $target_version ) {
6
  parent::__construct( $current_version, $target_version );
7
  }
@@ -20,16 +22,14 @@ final class SS_WC_MailChimp_Migration_From_1_3_X_To_2_0 extends SS_WC_MailChimp_
20
  if ( !array_key_exists( $interest_groupings_key, $this->settings ) || !array_key_exists( $groups_key, $this->settings ) ) return;
21
 
22
  $list = $this->settings['list'];
23
- $interest_groupings = $this->settings[$interest_groupings_key];
24
  $groups = $this->settings[$groups_key];
25
 
26
- if ( empty( $interest_groupings ) || empty( $groups ) || empty( $list ) ) return;
27
 
28
  $interest_categories = $this->mailchimp->get_interest_categories( $list );
29
 
30
- $selected_interest_category = array_filter( $interest_categories, function($v) use($interest_groupings) {
31
- return $v == $interest_groupings;
32
- } );
33
 
34
  $selected_interest_category_id = key( $selected_interest_category );
35
 
@@ -59,6 +59,10 @@ final class SS_WC_MailChimp_Migration_From_1_3_X_To_2_0 extends SS_WC_MailChimp_
59
 
60
  }
61
 
 
 
 
 
62
  /**
63
  * [down description]
64
  * @return [type] [description]
@@ -69,4 +73,4 @@ final class SS_WC_MailChimp_Migration_From_1_3_X_To_2_0 extends SS_WC_MailChimp_
69
 
70
  }
71
 
72
- }
2
 
3
  final class SS_WC_MailChimp_Migration_From_1_3_X_To_2_0 extends SS_WC_MailChimp_Migration {
4
 
5
+ protected $interest_groupings;
6
+
7
  public function __construct( $current_version, $target_version ) {
8
  parent::__construct( $current_version, $target_version );
9
  }
22
  if ( !array_key_exists( $interest_groupings_key, $this->settings ) || !array_key_exists( $groups_key, $this->settings ) ) return;
23
 
24
  $list = $this->settings['list'];
25
+ $this->interest_groupings = $this->settings[$interest_groupings_key];
26
  $groups = $this->settings[$groups_key];
27
 
28
+ if ( empty( $this->interest_groupings ) || empty( $groups ) || empty( $list ) ) return;
29
 
30
  $interest_categories = $this->mailchimp->get_interest_categories( $list );
31
 
32
+ $selected_interest_category = array_filter( $interest_categories, array( $this, 'filter_interest_groups' ) );
 
 
33
 
34
  $selected_interest_category_id = key( $selected_interest_category );
35
 
59
 
60
  }
61
 
62
+ public function filter_interest_groups( $interest_group ) {
63
+ return $interest_group == $this->interest_groupings;
64
+ }
65
+
66
  /**
67
  * [down description]
68
  * @return [type] [description]
73
 
74
  }
75
 
76
+ }
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://ssms.us/hVdk
4
  Tags: woocommerce, mailchimp
5
  Requires at least: 3.5.1
6
  Tested up to: 4.6.1
7
- Stable tag: 2.0.17
8
  License: GPLv3
9
 
10
  Simple and flexible MailChimp integration for WooCommerce.
@@ -115,6 +115,10 @@ Also, if you enjoy using the software [we'd love it if you could give us a revie
115
 
116
  **IMPORTANT:** You must upgrade to version 2.X by December 31, 2016 as prior versions of the MailChimp API will stop working at that point.
117
 
 
 
 
 
118
  #### 2.0.15 - 2.0.17 - September 22, 2016
119
 
120
  - Fix for activation error running migrations.
4
  Tags: woocommerce, mailchimp
5
  Requires at least: 3.5.1
6
  Tested up to: 4.6.1
7
+ Stable tag: 2.0.18
8
  License: GPLv3
9
 
10
  Simple and flexible MailChimp integration for WooCommerce.
115
 
116
  **IMPORTANT:** You must upgrade to version 2.X by December 31, 2016 as prior versions of the MailChimp API will stop working at that point.
117
 
118
+ #### 2.0.18 - September 23, 2016
119
+
120
+ - Fix for array_filter not working with lamda for some users.
121
+
122
  #### 2.0.15 - 2.0.17 - September 22, 2016
123
 
124
  - Fix for activation error running migrations.
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.17
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.18
9
  * Text Domain: woocommerce-mailchimp
10
  * Domain Path: languages
11
  *