WooCommerce MailChimp - Version 2.4.3

Version Description

Download this release

Release Info

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

Code changes from version 2.4.2 to 2.4.3

includes/class-ss-wc-mailchimp-api.php CHANGED
@@ -171,17 +171,18 @@ class SS_WC_MailChimp_API {
171
 
172
  // print_r($url);
173
  // die();
 
174
 
175
  $raw_response = wp_remote_request( $url, $request_args );
176
 
177
  $this->last_response = $raw_response;
178
 
179
- // $this->maybe_log( $url, $method, $args, $raw_response );
180
-
181
  if ( is_wp_error( $raw_response ) ) {
182
 
183
  $this->last_error = new WP_Error( 'ss-wc-mc-api-request-error', $raw_response->get_error_message(), $this->format_error( $resource, $method, $raw_response ) );
184
 
 
 
185
  return false;
186
 
187
  } elseif ( is_array( $raw_response )
@@ -194,6 +195,8 @@ class SS_WC_MailChimp_API {
194
 
195
  $this->last_error = new WP_Error( 'ss-wc-mc-api-request-error', $error['detail'], $this->format_error( $resource, $method, $raw_response ) );
196
 
 
 
197
  return false;
198
 
199
  } else {
171
 
172
  // print_r($url);
173
  // die();
174
+ do_action( 'sswcmc_log', "MailChimp API Call RESOURCE: $url \n METHOD: $method \n BODY: " . print_r( $request_args, true ) );
175
 
176
  $raw_response = wp_remote_request( $url, $request_args );
177
 
178
  $this->last_response = $raw_response;
179
 
 
 
180
  if ( is_wp_error( $raw_response ) ) {
181
 
182
  $this->last_error = new WP_Error( 'ss-wc-mc-api-request-error', $raw_response->get_error_message(), $this->format_error( $resource, $method, $raw_response ) );
183
 
184
+ $this->maybe_log( $url, $method, $args, $raw_response );
185
+
186
  return false;
187
 
188
  } elseif ( is_array( $raw_response )
195
 
196
  $this->last_error = new WP_Error( 'ss-wc-mc-api-request-error', $error['detail'], $this->format_error( $resource, $method, $raw_response ) );
197
 
198
+ $this->maybe_log( $url, $method, $args, $raw_response );
199
+
200
  return false;
201
 
202
  } else {
includes/class-ss-wc-mailchimp-handler.php CHANGED
@@ -429,7 +429,14 @@ if ( ! class_exists( 'SS_WC_MailChimp_Handler' ) ) {
429
  $subscribe_customer = apply_filters( 'ss_wc_mailchimp_subscribe_customer', $subscribe_customer, $subscribe_options, $order_id );
430
 
431
  // Extract options into variables.
432
- extract( $options );
 
 
 
 
 
 
 
433
 
434
  // Log.
435
  $this->log( sprintf( __( '%1$s(): Maybe subscribing customer ($subscribe_customer: %2$s) to MailChimp: %3$s', 'woocommerce-mailchimp' ), __METHOD__, $subscribe_customer, print_r( $options, true ) ) );
429
  $subscribe_customer = apply_filters( 'ss_wc_mailchimp_subscribe_customer', $subscribe_customer, $subscribe_options, $order_id );
430
 
431
  // Extract options into variables.
432
+ // extract( $options );
433
+ $list_id = !empty ($options['list_id'] ) ? $options['list_id'] : null;
434
+ $email = !empty ($options['$email'] ) ? $options['$email'] : null;
435
+ $email_type = !empty ($options['$email_type'] ) ? $options['$email_type'] : null;
436
+ $merge_tags = !empty ($options['$merge_tags'] ) ? $options['$merge_tags'] : null;
437
+ $interest_groups = !empty ($options['$interest_groups'] ) ? $options['$interest_groups'] : null;
438
+ $double_opt_in = !empty ($options['$double_opt_in'] ) ? $options['$double_opt_in'] : null;
439
+ $tags = !empty ($options['$tags'] ) ? $options['$tags'] : null;
440
 
441
  // Log.
442
  $this->log( sprintf( __( '%1$s(): Maybe subscribing customer ($subscribe_customer: %2$s) to MailChimp: %3$s', 'woocommerce-mailchimp' ), __METHOD__, $subscribe_customer, print_r( $options, true ) ) );
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.4.2';
19
 
20
  /**
21
  * Plugin singleton instance
15
  *
16
  * @var string
17
  */
18
+ private static $version = '2.4.3';
19
 
20
  /**
21
  * Plugin singleton instance
readme.txt CHANGED
@@ -6,7 +6,7 @@ Requires at least: 4.7.0
6
  Tested up to: 5.7.2
7
  WC tested up to: 5.3.0
8
  Requires PHP: 5.6
9
- Stable tag: 2.4.2
10
  License: GPLv3
11
 
12
  Simple and flexible Mailchimp integration for WooCommerce.
@@ -119,6 +119,9 @@ Also, if you enjoy using the software [we'd love it if you could give us a revie
119
 
120
  == Changelog ==
121
 
 
 
 
122
  #### 2.4.2 - May 24, 2021
123
  - Tested up to WordPress 5.7.2
124
  - Tested up to WooCommerce 5.3.0
6
  Tested up to: 5.7.2
7
  WC tested up to: 5.3.0
8
  Requires PHP: 5.6
9
+ Stable tag: 2.4.3
10
  License: GPLv3
11
 
12
  Simple and flexible Mailchimp integration for WooCommerce.
119
 
120
  == Changelog ==
121
 
122
+ #### 2.4.3 - May 26, 2021
123
+ - Replace extract with explicit retrieval.
124
+
125
  #### 2.4.2 - May 24, 2021
126
  - Tested up to WordPress 5.7.2
127
  - Tested up to WooCommerce 5.3.0
woocommerce-mailchimp.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: WP WooCommerce Mailchimp provides simple and flexible Mailchimp integration for WooCommerce.
6
  * Author: Saint Systems
7
  * Author URI: https://www.saintsystems.com
8
- * Version: 2.4.2
9
  * WC tested up to: 5.3.0
10
  * Text Domain: woocommerce-mailchimp
11
  * Domain Path: languages
5
  * Description: WP WooCommerce Mailchimp provides simple and flexible Mailchimp integration for WooCommerce.
6
  * Author: Saint Systems
7
  * Author URI: https://www.saintsystems.com
8
+ * Version: 2.4.3
9
  * WC tested up to: 5.3.0
10
  * Text Domain: woocommerce-mailchimp
11
  * Domain Path: languages