WooCommerce MailChimp - Version 2.1.21

Version Description

Download this release

Release Info

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

Code changes from version 2.1.20 to 2.1.21

includes/class-ss-wc-mailchimp-plugin.php CHANGED
@@ -15,7 +15,7 @@ final class SS_WC_MailChimp_Plugin {
15
  *
16
  * @var string
17
  */
18
- private static $version = '2.1.20';
19
 
20
  /**
21
  * Plugin singleton instance
15
  *
16
  * @var string
17
  */
18
+ private static $version = '2.1.21';
19
 
20
  /**
21
  * Plugin singleton instance
includes/class-ss-wc-mailchimp.php CHANGED
@@ -378,6 +378,43 @@ class SS_WC_MailChimp {
378
 
379
  } //end function get_interest_categories_with_interests
380
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
381
  /**
382
  * Returns error code from error property
383
  * @return string error code
378
 
379
  } //end function get_interest_categories_with_interests
380
 
381
+ /**
382
+ * Get interest categories with interests
383
+ *
384
+ * @access public
385
+ * @param string $list_id
386
+ * @return mixed
387
+ */
388
+ public function get_tags( $list_id ) {
389
+
390
+ if ( ! $results = get_transient( "sswcmc_{$list_id}_tags" ) ) {
391
+
392
+ $resource = "lists/$list_id/segments?type=static";
393
+
394
+ $response = $this->api->get( $resource, array( 'count' => 100 ) );
395
+
396
+ if ( ! $response ) {
397
+ return false;
398
+ }
399
+
400
+ $tags = $response['segments'];
401
+
402
+ $results = array();
403
+
404
+ foreach ( $tags as $tag ) {
405
+
406
+ $results[ $tag['id'] ] = $tag['name'];
407
+
408
+ }
409
+
410
+ set_transient( "sswcmc_{$list_id}_tags", $results, 60*15*1 );
411
+
412
+ }
413
+
414
+ return $results;
415
+
416
+ } //end function get_tags
417
+
418
  /**
419
  * Returns error code from error property
420
  * @return string error code
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: woocommerce, mailchimp
5
  Requires at least: 3.5.1
6
  Tested up to: 5.2.2
7
  WC tested up to: 3.6.5
8
- Stable tag: 2.1.20
9
  License: GPLv3
10
 
11
  Simple and flexible MailChimp integration for WooCommerce.
@@ -114,6 +114,12 @@ Also, if you enjoy using the software [we'd love it if you could give us a revie
114
 
115
  == Changelog ==
116
 
 
 
 
 
 
 
117
  #### 2.1.19 - February 15, 2019
118
  - Update styling of opt-in checkbox.
119
 
5
  Requires at least: 3.5.1
6
  Tested up to: 5.2.2
7
  WC tested up to: 3.6.5
8
+ Stable tag: 2.1.21
9
  License: GPLv3
10
 
11
  Simple and flexible MailChimp integration for WooCommerce.
114
 
115
  == Changelog ==
116
 
117
+ #### 2.1.21 - July 23, 2019
118
+ - Prep for getting list tags.
119
+
120
+ #### 2.1.20 - July 22, 2019
121
+ - Bump plugin version and min WP and WC tested versions.
122
+
123
  #### 2.1.19 - February 15, 2019
124
  - Update styling of opt-in checkbox.
125
 
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.1.20
9
  * WC tested up to: 3.6.5
10
  * Text Domain: woocommerce-mailchimp
11
  * Domain Path: languages
5
  * Description: WooCommerce MailChimp provides simple MailChimp integration for WooCommerce.
6
  * Author: Saint Systems
7
  * Author URI: https://www.saintsystems.com
8
+ * Version: 2.1.21
9
  * WC tested up to: 3.6.5
10
  * Text Domain: woocommerce-mailchimp
11
  * Domain Path: languages