Easy Forms for MailChimp - Version 6.3.23

Version Description

Download this release

Release Info

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

Code changes from version 6.3.22 to 6.3.23

admin/partials/menu/manage-forms.php CHANGED
@@ -185,21 +185,21 @@ if( $this->is_user_mc_api_valid_form( false ) == 'valid' ) {
185
  <td class="column-columnname num stat-container">
186
  <?php
187
  if( $impressions != 0 ) {
188
- $conversion_rate = '%' . ( round( $form['submissions'] / $form['impressions'] , 2 ) * 100 );
189
- if( $conversion_rate >= '%15' ) {
190
  $conversion_color = '#00cc00'; // green (unicorn!)
191
- } else if( $conversion_rate < '%15' && $conversion_rate >= '%10' ) {
192
  $conversion_color = '#0080FF'; // light blue (good)
193
- } else if( $conversion_rate < '%10' && $conversion_rate >= '%5' ) {
194
  $conversion_color = '#FFFF32'; // yellow (ok)
195
  } else {
196
  $conversion_color = '#FF0000'; // red (no bueno)
197
  }
198
  } else {
199
- $conversion_rate = '%0';
200
  $conversion_color = '#333333';
201
  }
202
- echo '<span style="color:' . esc_attr( $conversion_color ) . ';" title="' . esc_attr__( 'Conversion Rate' , 'yikes-inc-easy-mailchimp-extender' ) . '">' . $conversion_rate . '</span>';
203
  ?>
204
  </td>
205
  <!-- shortcode -->
185
  <td class="column-columnname num stat-container">
186
  <?php
187
  if( $impressions != 0 ) {
188
+ $conversion_rate = ( round( $form['submissions'] / $form['impressions'] , 2 ) * 100 );
189
+ if( $conversion_rate >= '15' ) {
190
  $conversion_color = '#00cc00'; // green (unicorn!)
191
+ } else if( $conversion_rate < '15' && $conversion_rate >= '10' ) {
192
  $conversion_color = '#0080FF'; // light blue (good)
193
+ } else if( $conversion_rate < '10' && $conversion_rate >= '5' ) {
194
  $conversion_color = '#FFFF32'; // yellow (ok)
195
  } else {
196
  $conversion_color = '#FF0000'; // red (no bueno)
197
  }
198
  } else {
199
+ $conversion_rate = '0';
200
  $conversion_color = '#333333';
201
  }
202
+ echo '<span style="color:' . esc_attr( $conversion_color ) . ';" title="' . esc_attr__( 'Conversion Rate' , 'yikes-inc-easy-mailchimp-extender' ) . '">' . $conversion_rate . '%</span>';
203
  ?>
204
  </td>
205
  <!-- shortcode -->
public/classes/checkbox-integrations/class.woocommerce_checkout_form-checkbox.php CHANGED
@@ -43,9 +43,10 @@ class Yikes_Easy_MC_WooCommerce_Checkbox_Class extends Yikes_Easy_MC_Checkbox_In
43
  public function add_checkout_field( $fields ) {
44
 
45
  // get checkbox data
46
- $checkbox_options = get_option( 'optin-checkbox-init' , '' );
 
47
  // only display the field if a list is set
48
- if( isset( $checkbox_options ) && $checkbox_options[$this->type]['associated-list'] != '-' ) {
49
  if( $this->is_user_already_subscribed( $this->type ) ) {
50
  return $fields;
51
  }
43
  public function add_checkout_field( $fields ) {
44
 
45
  // get checkbox data
46
+ $checkbox_options = get_option( 'optin-checkbox-init' , array() );
47
+
48
  // only display the field if a list is set
49
+ if( isset( $checkbox_options[$this->type] ) && isset( $checkbox_options[$this->type]['associated-list'] ) && $checkbox_options[$this->type]['associated-list'] != '-' ) {
50
  if( $this->is_user_already_subscribed( $this->type ) ) {
51
  return $fields;
52
  }
public/classes/process/class.process_form_submission_handler.php CHANGED
@@ -759,7 +759,7 @@ class Yikes_Inc_Easy_MailChimp_Extender_Process_Submission_Handler {
759
  * @param string | $form_id | The ID of the current form being subscribed to
760
  * @param array | $page_data | An array of data related to the page the form is on
761
  */
762
- $redirect_url = apply_filters( 'yikes-mailchimp-redirect-url', esc_url( $redirect_url ), $this->form_id, $page_data );
763
 
764
  /**
765
  * yikes-mailchimp-redirect-timer
@@ -772,7 +772,6 @@ class Yikes_Inc_Easy_MailChimp_Extender_Process_Submission_Handler {
772
 
773
  $redirect_array['redirect_timer'] = $redirect_timer;
774
 
775
- // Well this definitely has to change... why are we writing JavaScript in PHP?
776
  $redirect_array['redirect'] = $redirect_url;
777
  }
778
 
@@ -1281,8 +1280,10 @@ class Yikes_Inc_Easy_MailChimp_Extender_Process_Submission_Handler {
1281
 
1282
  case 'general-error':
1283
 
 
 
1284
  if ( isset( $this->error_messages['general-error'] ) && ! empty( $this->error_messages['general-error'] ) ) {
1285
- $response_text = $this->error_messages['general-error'];
1286
  }
1287
 
1288
  /**
@@ -1290,11 +1291,13 @@ class Yikes_Inc_Easy_MailChimp_Extender_Process_Submission_Handler {
1290
  *
1291
  * Filter the error message displayed to the user
1292
  *
1293
- * @param string | $response_text | The response message that will be shown to the user
1294
- * @param string | $form_id | The form ID
 
1295
  *
 
1296
  */
1297
- $response_text = apply_filters( 'yikes-mailchimp-general-error-response', $response_text, $this->form_id );
1298
 
1299
  return $response_text;
1300
  break;
759
  * @param string | $form_id | The ID of the current form being subscribed to
760
  * @param array | $page_data | An array of data related to the page the form is on
761
  */
762
+ $redirect_url = apply_filters( 'yikes-mailchimp-redirect-url', $redirect_url, $this->form_id, $page_data );
763
 
764
  /**
765
  * yikes-mailchimp-redirect-timer
772
 
773
  $redirect_array['redirect_timer'] = $redirect_timer;
774
 
 
775
  $redirect_array['redirect'] = $redirect_url;
776
  }
777
 
1280
 
1281
  case 'general-error':
1282
 
1283
+ $original_response_text = $response_text;
1284
+
1285
  if ( isset( $this->error_messages['general-error'] ) && ! empty( $this->error_messages['general-error'] ) ) {
1286
+ $user_defined_response_text = $this->error_messages['general-error'];
1287
  }
1288
 
1289
  /**
1291
  *
1292
  * Filter the error message displayed to the user
1293
  *
1294
+ * @param string | $original_response_text | The original response message returned from the API
1295
+ * @param string | $user_defined_response_text | The response message defined by the user
1296
+ * @param string | $form_id | The form ID
1297
  *
1298
+ * @return string | $response_text | The message that will be shown to the user
1299
  */
1300
+ $response_text = apply_filters( 'yikes-mailchimp-general-error-response', $original_response_text, $user_defined_response_text, $this->form_id );
1301
 
1302
  return $response_text;
1303
  break;
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: yikesinc, eherman24, liljimmi, hiwhatsup, JPry, yikesitskevin
3
  Donate link: https://yikesplugins.com/?utm_source=wp_plugin_repo&utm_medium=donate_link&utm_campaign=easy_forms_for_mailchimp
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
7
- Stable tag: 6.3.22
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -268,6 +268,8 @@ Below you'll find a complete list of the hooks and filters available in Easy For
268
 
269
  == Changelog ==
270
 
 
 
271
 
272
  = Easy Forms for MailChimp 6.3.22 - June 23rd, 2017 =
273
  * Fixed an issue with comment integration subscriptions - comments will now be spam checked correctly
3
  Donate link: https://yikesplugins.com/?utm_source=wp_plugin_repo&utm_medium=donate_link&utm_campaign=easy_forms_for_mailchimp
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
 
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
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.22
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.22' );
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.23
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.23' );
47
  }
48
 
49
  /**