Easy Forms for MailChimp - Version 6.3.24

Version Description

Download this release

Release Info

Developer yikesitskevin
Plugin Icon 128x128 Easy Forms for MailChimp
Version 6.3.24
Comparing to
See all releases

Code changes from version 6.3.23 to 6.3.24

public/partials/shortcodes/process/process_form_submission.php CHANGED
@@ -155,7 +155,6 @@ $member_data = array(
155
  'email_address' => $sanitized_email,
156
  'merge_fields' => $merge_variables,
157
  'timestamp_opt' => current_time( 'Y-m-d H:i:s', 1 ),
158
- 'status' => 'subscribed'
159
  );
160
 
161
  // Only add groups if they exist
@@ -164,10 +163,15 @@ if ( ! empty( $groups ) ) {
164
  }
165
 
166
  // Check if this member already exists
167
- $member_exists = $list_handler->get_member( $list_id, md5( strtolower( $sanitized_email ) ), $use_transient = true );
168
 
169
  // If this member does not exist, then we need to add the status_if_new flag and set our $new_subscriber variable
170
- if ( is_wp_error( $member_exists ) ) {
 
 
 
 
 
171
  $new_subscriber = true;
172
 
173
  // Check the opt-in value - is it double or single?
@@ -178,17 +182,21 @@ if ( is_wp_error( $member_exists ) ) {
178
 
179
  // Double opt-in
180
  $member_data['status_if_new'] = 'pending';
 
181
  } else {
182
 
183
  // Single opt-in
184
  $member_data['status_if_new'] = 'subscribed';
 
185
  }
 
186
  } else {
187
 
188
  // If this member already exists, then we need to go through our optin settings and run some more logic
189
 
190
- // But first let's set our flag
191
  $new_subscriber = false;
 
192
 
193
  // Check our update_existing_user optin setting
194
  $update_existing_user = ( $optin_settings['update_existing_user'] === '1' ) ? true : false;
@@ -260,4 +268,5 @@ if ( $new_subscriber === true ) {
260
  // End execution
261
  return;
262
 
263
- // That's all folks.
 
155
  'email_address' => $sanitized_email,
156
  'merge_fields' => $merge_variables,
157
  'timestamp_opt' => current_time( 'Y-m-d H:i:s', 1 ),
 
158
  );
159
 
160
  // Only add groups if they exist
163
  }
164
 
165
  // Check if this member already exists
166
+ $member_exists = $list_handler->get_member( $list_id, md5( strtolower( $sanitized_email ) ), $use_transient = false );
167
 
168
  // If this member does not exist, then we need to add the status_if_new flag and set our $new_subscriber variable
169
+ // Likewise, if this member exists but their status is 'pending' it means we're dealing with a double opt-in list and they never confirmed
170
+ // Or, if this member but their status is 'unsubscribed' it means we're dealing with someone who unsubscribed and they need to re-subscribe
171
+ // Continue as if they're a new member to force another double opt-in email
172
+ $double_optin_resubscribe = is_array( $member_exists ) && isset( $member_exists['status'] ) && ( $member_exists['status'] === 'pending' || $member_exists['status'] === 'unsubscribed' ) ? true : false;
173
+
174
+ if ( is_wp_error( $member_exists ) || $double_optin_resubscribe === true ) {
175
  $new_subscriber = true;
176
 
177
  // Check the opt-in value - is it double or single?
182
 
183
  // Double opt-in
184
  $member_data['status_if_new'] = 'pending';
185
+ $member_data['status'] = 'pending';
186
  } else {
187
 
188
  // Single opt-in
189
  $member_data['status_if_new'] = 'subscribed';
190
+ $member_data['status'] = 'subscribed';
191
  }
192
+
193
  } else {
194
 
195
  // If this member already exists, then we need to go through our optin settings and run some more logic
196
 
197
+ // But first let's set our flag, and set the MailChimp status flag
198
  $new_subscriber = false;
199
+ $member_data['status'] = 'subscribed';
200
 
201
  // Check our update_existing_user optin setting
202
  $update_existing_user = ( $optin_settings['update_existing_user'] === '1' ) ? true : false;
268
  // End execution
269
  return;
270
 
271
+ // That's all folks.
272
+ // :)
public/partials/shortcodes/process/process_form_submission_ajax.php CHANGED
@@ -117,7 +117,6 @@ $member_data = array(
117
  'email_address' => $sanitized_email,
118
  'merge_fields' => $merge_variables,
119
  'timestamp_opt' => current_time( 'Y-m-d H:i:s', 1 ),
120
- 'status' => 'subscribed'
121
  );
122
 
123
  // Only add groups if they exist
@@ -126,10 +125,15 @@ if ( ! empty( $groups ) ) {
126
  }
127
 
128
  // Check if this member already exists
129
- $member_exists = $list_handler->get_member( $list_id, md5( strtolower( $sanitized_email ) ), $use_transient = true );
130
 
131
  // If this member does not exist, then we need to add the status_if_new flag and set our $new_subscriber variable
132
- if ( is_wp_error( $member_exists ) ) {
 
 
 
 
 
133
 
134
  $new_subscriber = true;
135
 
@@ -141,18 +145,21 @@ if ( is_wp_error( $member_exists ) ) {
141
 
142
  // Double opt-in
143
  $member_data['status_if_new'] = 'pending';
 
144
  } else {
145
 
146
  // Single opt-in
147
  $member_data['status_if_new'] = 'subscribed';
 
148
  }
149
 
150
  } else {
151
 
152
  // If this member already exists, then we need to go through our optin settings and run some more logic
153
 
154
- // But first let's set our flag
155
  $new_subscriber = false;
 
156
 
157
  // Check our update_existing_user optin setting
158
  $update_existing_user = ( $optin_settings['update_existing_user'] === '1' ) ? true : false;
@@ -196,4 +203,5 @@ if ( is_wp_error( $subscribe_response ) ) {
196
  $submission_handler->handle_submission_response_success( $submission_settings, $page_data, $merge_variables, $notifications, $optin_settings, $new_subscriber );
197
  }
198
 
199
- // That's all folks.
 
117
  'email_address' => $sanitized_email,
118
  'merge_fields' => $merge_variables,
119
  'timestamp_opt' => current_time( 'Y-m-d H:i:s', 1 ),
 
120
  );
121
 
122
  // Only add groups if they exist
125
  }
126
 
127
  // Check if this member already exists
128
+ $member_exists = $list_handler->get_member( $list_id, md5( strtolower( $sanitized_email ) ), $use_transient = false );
129
 
130
  // If this member does not exist, then we need to add the status_if_new flag and set our $new_subscriber variable
131
+ // Likewise, if this member exists but their status is 'pending' it means we're dealing with a double opt-in list and they never confirmed
132
+ // Or, if this member but their status is 'unsubscribed' it means we're dealing with someone who unsubscribed and they need to re-subscribe
133
+ // Continue as if they're a new member to force another double opt-in email
134
+ $double_optin_resubscribe = is_array( $member_exists ) && isset( $member_exists['status'] ) && ( $member_exists['status'] === 'pending' || $member_exists['status'] === 'unsubscribed' ) ? true : false;
135
+
136
+ if ( is_wp_error( $member_exists ) || $double_optin_resubscribe === true ) {
137
 
138
  $new_subscriber = true;
139
 
145
 
146
  // Double opt-in
147
  $member_data['status_if_new'] = 'pending';
148
+ $member_data['status'] = 'pending';
149
  } else {
150
 
151
  // Single opt-in
152
  $member_data['status_if_new'] = 'subscribed';
153
+ $member_data['status'] = 'subscribed';
154
  }
155
 
156
  } else {
157
 
158
  // If this member already exists, then we need to go through our optin settings and run some more logic
159
 
160
+ // But first let's set our flag, and set the MailChimp status flag
161
  $new_subscriber = false;
162
+ $member_data['status'] = 'subscribed';
163
 
164
  // Check our update_existing_user optin setting
165
  $update_existing_user = ( $optin_settings['update_existing_user'] === '1' ) ? true : false;
203
  $submission_handler->handle_submission_response_success( $submission_settings, $page_data, $merge_variables, $notifications, $optin_settings, $new_subscriber );
204
  }
205
 
206
+ // That's all folks.
207
+ // :)
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://yikesplugins.com/?utm_source=wp_plugin_repo&utm_medium=dona
4
  Tags: MailChimp, MailChimp forms, MailChimp lists, opt-in forms, sign up form, MailChimp, email, forms, mailing lists, marketing, newsletter, sign up
5
  Requires at least: 4.0
6
  Tested up to: 4.8.1
7
- Stable tag: 6.3.23
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -268,8 +268,14 @@ Below you'll find a complete list of the hooks and filters available in Easy For
268
 
269
  == Changelog ==
270
 
 
 
 
 
271
  = Easy Forms for MailChimp 6.3.23 - August 14th, 2017 =
272
  * Removed an additional `esc_url` call on the redirect URL. Redirect URLs should now be able to accept characters like ampersands without encoding them.
 
 
273
 
274
  = Easy Forms for MailChimp 6.3.22 - June 23rd, 2017 =
275
  * Fixed an issue with comment integration subscriptions - comments will now be spam checked correctly
4
  Tags: MailChimp, MailChimp forms, MailChimp lists, opt-in forms, sign up form, MailChimp, email, forms, mailing lists, marketing, newsletter, sign up
5
  Requires at least: 4.0
6
  Tested up to: 4.8.1
7
+ Stable tag: 6.3.24
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
268
 
269
  == Changelog ==
270
 
271
+ = Easy Forms for MailChimp 6.3.24 - August 28th, 2017 =
272
+ * If a subscriber has unsubscribed, the signup form will re-send them a confirmation email (double opt-in only)
273
+ * If a subscriber received the double confirmation email but never subscribed (pending status), the signup form will re-send them a confirmation email (double opt-in only)
274
+
275
  = Easy Forms for MailChimp 6.3.23 - August 14th, 2017 =
276
  * Removed an additional `esc_url` call on the redirect URL. Redirect URLs should now be able to accept characters like ampersands without encoding them.
277
+ * Fixed the way the `yikes-mailchimp-general-error-response` filter works. You can now use the original response as the first argument in the function. This should allow you to change a MailChimp response w/ str parsing.
278
+ * Some minor code cleanup
279
 
280
  = Easy Forms for MailChimp 6.3.22 - June 23rd, 2017 =
281
  * Fixed an issue with comment integration subscriptions - comments will now be spam checked correctly
yikes-inc-easy-mailchimp-extender.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Easy Forms for MailChimp
4
  * Plugin URI: https://yikesplugins.com/plugin/easy-forms-for-mailchimp/
5
  * Description: The ultimate MailChimp WordPress plugin. Easily build <strong>unlimited forms for your MailChimp lists</strong>, add them to your site and track subscriber activity. To get started, go to the settings page and enter your <a href="https://yikesplugins.com/support/knowledge-base/finding-your-mailchimp-api-key/" target="_blank">MailChimp API key</a>.
6
- * Version: 6.3.23
7
  * Author: YIKES, Inc.
8
  * Author URI: https://www.yikesplugins.com/
9
  * License: GPL-3.0+
@@ -43,7 +43,7 @@ if ( ! defined( 'WPINC' ) ) {
43
  * @since 6.1.3
44
  */
45
  if ( ! defined( 'YIKES_MC_VERSION' ) ) {
46
- define( 'YIKES_MC_VERSION' , '6.3.23' );
47
  }
48
 
49
  /**
3
  * Plugin Name: Easy Forms for MailChimp
4
  * Plugin URI: https://yikesplugins.com/plugin/easy-forms-for-mailchimp/
5
  * Description: The ultimate MailChimp WordPress plugin. Easily build <strong>unlimited forms for your MailChimp lists</strong>, add them to your site and track subscriber activity. To get started, go to the settings page and enter your <a href="https://yikesplugins.com/support/knowledge-base/finding-your-mailchimp-api-key/" target="_blank">MailChimp API key</a>.
6
+ * Version: 6.3.24
7
  * Author: YIKES, Inc.
8
  * Author URI: https://www.yikesplugins.com/
9
  * License: GPL-3.0+
43
  * @since 6.1.3
44
  */
45
  if ( ! defined( 'YIKES_MC_VERSION' ) ) {
46
+ define( 'YIKES_MC_VERSION' , '6.3.24' );
47
  }
48
 
49
  /**