MailChimp for WordPress - Version 3.0.9

Version Description

Download this release

Release Info

Developer DvanKooten
Plugin Icon 128x128 MailChimp for WordPress
Version 3.0.9
Comparing to
See all releases

Code changes from version 3.0.8 to 3.0.9

CHANGELOG.md CHANGED
@@ -1,6 +1,12 @@
1
  Changelog
2
  =========
3
 
 
 
 
 
 
 
4
  #### 3.0.8 - December 15, 2015
5
 
6
  **Fixes**
1
  Changelog
2
  =========
3
 
4
+ #### 3.0.9 - December 17, 2015
5
+
6
+ **Fixes**
7
+
8
+ Not being able to select a list when creating a new form.
9
+
10
  #### 3.0.8 - December 15, 2015
11
 
12
  **Fixes**
includes/class-api.php CHANGED
@@ -329,6 +329,23 @@ class MC4WP_API {
329
  return false;
330
  }
331
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
332
  /**
333
  * Calls the MailChimp API
334
  *
329
  return false;
330
  }
331
 
332
+ /**
333
+ * @param array $order_data
334
+ * @see https://apidocs.mailchimp.com/api/2.0/ecomm/order-add.php
335
+ * @return boolean
336
+ */
337
+ public function add_ecommerce_order( array $order_data ) {
338
+ $response = $this->call( 'ecomm/order-add', array( 'order' => $order_data ) );
339
+
340
+ if( is_object( $response ) ) {
341
+ if ( isset( $response->complete ) && $response->complete ) {
342
+ return true;
343
+ }
344
+ }
345
+
346
+ return false;
347
+ }
348
+
349
  /**
350
  * Calls the MailChimp API
351
  *
includes/forms/class-admin.php CHANGED
@@ -172,7 +172,9 @@ class MC4WP_Forms_Admin {
172
 
173
  // merge new settings with current settings to allow passing partial data
174
  $current_settings = get_post_meta( $post->ID, '_mc4wp_settings', true );
175
- $data['settings'] = array_merge( $current_settings, $data['settings'] );
 
 
176
  }
177
 
178
  $form_id = wp_insert_post( $post_data );
172
 
173
  // merge new settings with current settings to allow passing partial data
174
  $current_settings = get_post_meta( $post->ID, '_mc4wp_settings', true );
175
+ if( is_array( $current_settings ) ) {
176
+ $data['settings'] = array_merge( $current_settings, $data['settings'] );
177
+ }
178
  }
179
 
180
  $form_id = wp_insert_post( $post_data );
includes/integrations/class-admin.php CHANGED
@@ -150,18 +150,6 @@ class MC4WP_Integration_Admin {
150
  return $settings;
151
  }
152
 
153
- /**
154
- * Determine whether two integration instances are the same
155
- *
156
- * @param $a
157
- * @param $b
158
- *
159
- * @return int
160
- */
161
- public function compare_integrations( $a, $b ) {
162
- return $a->slug === $b->slug ? 0 : -1;
163
- }
164
-
165
  /**
166
  * Show the Integration Settings page
167
  *
@@ -179,7 +167,7 @@ class MC4WP_Integration_Admin {
179
 
180
  // get all integrations but remove enabled integrations from the resulting array
181
  $available_integrations = $this->integrations->get_all();
182
- $available_integrations = array_udiff( $available_integrations, $enabled_integrations, array( $this, 'compare_integrations') );
183
 
184
  require dirname( __FILE__ ) . '/views/integrations.php';
185
  }
150
  return $settings;
151
  }
152
 
 
 
 
 
 
 
 
 
 
 
 
 
153
  /**
154
  * Show the Integration Settings page
155
  *
167
 
168
  // get all integrations but remove enabled integrations from the resulting array
169
  $available_integrations = $this->integrations->get_all();
170
+ $available_integrations = array_diff( $available_integrations, $enabled_integrations );
171
 
172
  require dirname( __FILE__ ) . '/views/integrations.php';
173
  }
includes/integrations/class-integration-fixture.php CHANGED
@@ -88,4 +88,11 @@ class MC4WP_Integration_Fixture {
88
  return $this->load()->$name;
89
  }
90
 
 
 
 
 
 
 
 
91
  }
88
  return $this->load()->$name;
89
  }
90
 
91
+ /**
92
+ * @return string
93
+ */
94
+ public function __toString() {
95
+ return $this->slug;
96
+ }
97
+
98
  }
includes/integrations/class-integration-manager.php CHANGED
@@ -138,6 +138,9 @@ class MC4WP_Integration_Manager {
138
  // get all enabled integrations
139
  $enabled_integrations = array_filter( $this->integrations, array( $this, 'is_enabled' ) );
140
 
 
 
 
141
  // filter out integrations which are not installed
142
  $installed_enabled_integrations = array_filter( $enabled_integrations, array( $this, 'is_installed' ) );
143
 
138
  // get all enabled integrations
139
  $enabled_integrations = array_filter( $this->integrations, array( $this, 'is_enabled' ) );
140
 
141
+ // remove duplicate values, for whatever reason..
142
+ $enabled_integrations = array_unique( $enabled_integrations );
143
+
144
  // filter out integrations which are not installed
145
  $installed_enabled_integrations = array_filter( $enabled_integrations, array( $this, 'is_installed' ) );
146
 
includes/integrations/class-integration.php CHANGED
@@ -438,4 +438,5 @@ abstract class MC4WP_Integration {
438
  $request = mc4wp('request');
439
  return $request->params->all();
440
  }
 
441
  }
438
  $request = mc4wp('request');
439
  return $request->params->all();
440
  }
441
+
442
  }
languages/mailchimp-for-wp-de_DE.mo CHANGED
Binary file
languages/mailchimp-for-wp-de_DE.po CHANGED
@@ -9,14 +9,15 @@
9
  # Jochen Gererstorfer, 2015
10
  # S L <gitter.s@gmx.de>, 2015
11
  # Stefan Oderbolz <oderbolz@gmail.com>, 2015
 
12
  # Uwe <uwe.keim@gmail.com>, 2015
13
  msgid ""
14
  msgstr ""
15
  "Project-Id-Version: MailChimp for WordPress\n"
16
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/mailchimp-for-wp\n"
17
  "POT-Creation-Date: 2015-11-30 10:15:18+00:00\n"
18
- "PO-Revision-Date: 2015-11-30 10:59+0000\n"
19
- "Last-Translator: Björn Weil <100progratis@web.de>\n"
20
  "Language-Team: German (Germany) (http://www.transifex.com/ibericode/mailchimp-for-wordpress/language/de_DE/)\n"
21
  "MIME-Version: 1.0\n"
22
  "Content-Type: text/plain; charset=UTF-8\n"
@@ -68,7 +69,7 @@ msgstr "Die angegebene E-Mail Adresse ist nicht abonniert."
68
 
69
  #: config/default-form-messages.php:33
70
  msgid "Please select at least one list."
71
- msgstr ""
72
 
73
  #: config/default-integration-options.php:5
74
  msgid "Sign me up for the newsletter!"
@@ -92,7 +93,7 @@ msgstr ""
92
  msgid ""
93
  "This is a pro-only feature. Please upgrade to the premium version to be able"
94
  " to use it."
95
- msgstr ""
96
 
97
  #: includes/admin/class-admin.php:323 includes/views/general-settings.php:28
98
  msgid "MailChimp API Settings"
@@ -158,7 +159,7 @@ msgstr ""
158
 
159
  #: includes/forms/class-admin.php:176
160
  msgid "Preview form"
161
- msgstr ""
162
 
163
  #: includes/forms/class-admin.php:279
164
  msgid "Form not found."
@@ -199,19 +200,19 @@ msgstr "Der Pfad der Seite."
199
 
200
  #: includes/forms/class-form-tags.php:82
201
  msgid "The current date. Example: %s."
202
- msgstr ""
203
 
204
  #: includes/forms/class-form-tags.php:87
205
  msgid "The current time. Example: %s."
206
- msgstr ""
207
 
208
  #: includes/forms/class-form-tags.php:92
209
  msgid "The site's language. Example: %s."
210
- msgstr ""
211
 
212
  #: includes/forms/class-form-tags.php:97
213
  msgid "The visitor's IP address. Example: %s."
214
- msgstr ""
215
 
216
  #: includes/forms/class-form-tags.php:102
217
  msgid "The property of the currently logged-in user."
9
  # Jochen Gererstorfer, 2015
10
  # S L <gitter.s@gmx.de>, 2015
11
  # Stefan Oderbolz <oderbolz@gmail.com>, 2015
12
+ # Sven B. <sven.balje@esb-stade.de>, 2015
13
  # Uwe <uwe.keim@gmail.com>, 2015
14
  msgid ""
15
  msgstr ""
16
  "Project-Id-Version: MailChimp for WordPress\n"
17
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/mailchimp-for-wp\n"
18
  "POT-Creation-Date: 2015-11-30 10:15:18+00:00\n"
19
+ "PO-Revision-Date: 2015-12-15 21:23+0000\n"
20
+ "Last-Translator: Sven B. <sven.balje@esb-stade.de>\n"
21
  "Language-Team: German (Germany) (http://www.transifex.com/ibericode/mailchimp-for-wordpress/language/de_DE/)\n"
22
  "MIME-Version: 1.0\n"
23
  "Content-Type: text/plain; charset=UTF-8\n"
69
 
70
  #: config/default-form-messages.php:33
71
  msgid "Please select at least one list."
72
+ msgstr "Bitte wähle mindestens eine Liste aus."
73
 
74
  #: config/default-integration-options.php:5
75
  msgid "Sign me up for the newsletter!"
93
  msgid ""
94
  "This is a pro-only feature. Please upgrade to the premium version to be able"
95
  " to use it."
96
+ msgstr "Das ist eine Pro-Funktion. Bitte führe eine Upgrade zur Premiumversion durch um diese Funktion nutzen zu können."
97
 
98
  #: includes/admin/class-admin.php:323 includes/views/general-settings.php:28
99
  msgid "MailChimp API Settings"
159
 
160
  #: includes/forms/class-admin.php:176
161
  msgid "Preview form"
162
+ msgstr "Vorschaufenster"
163
 
164
  #: includes/forms/class-admin.php:279
165
  msgid "Form not found."
200
 
201
  #: includes/forms/class-form-tags.php:82
202
  msgid "The current date. Example: %s."
203
+ msgstr "Das aktuelle Datum. Beispiel: %s."
204
 
205
  #: includes/forms/class-form-tags.php:87
206
  msgid "The current time. Example: %s."
207
+ msgstr "Die aktuelle Zeit. Beispiel: %s."
208
 
209
  #: includes/forms/class-form-tags.php:92
210
  msgid "The site's language. Example: %s."
211
+ msgstr "Die Sprache der Seite. Beispiel: %s."
212
 
213
  #: includes/forms/class-form-tags.php:97
214
  msgid "The visitor's IP address. Example: %s."
215
+ msgstr "Die IP-Adresse des Besuchers. Beispiel: %s."
216
 
217
  #: includes/forms/class-form-tags.php:102
218
  msgid "The property of the currently logged-in user."
mailchimp-for-wp.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: MailChimp for WordPress
4
  Plugin URI: https://mc4wp.com/#utm_source=wp-plugin&utm_medium=mailchimp-for-wp&utm_campaign=plugins-page
5
  Description: MailChimp for WordPress by ibericode. Adds various highly effective sign-up methods to your site.
6
- Version: 3.0.8
7
  Author: ibericode
8
  Author URI: https://ibericode.com/
9
  Text Domain: mailchimp-for-wp
@@ -47,7 +47,7 @@ function __mc4wp_load_plugin() {
47
  }
48
 
49
  // bootstrap the core plugin
50
- define( 'MC4WP_VERSION', '3.0.8' );
51
  define( 'MC4WP_PLUGIN_DIR', dirname( __FILE__ ) . '/' );
52
  define( 'MC4WP_PLUGIN_URL', plugins_url( '/' , __FILE__ ) );
53
  define( 'MC4WP_PLUGIN_FILE', __FILE__ );
3
  Plugin Name: MailChimp for WordPress
4
  Plugin URI: https://mc4wp.com/#utm_source=wp-plugin&utm_medium=mailchimp-for-wp&utm_campaign=plugins-page
5
  Description: MailChimp for WordPress by ibericode. Adds various highly effective sign-up methods to your site.
6
+ Version: 3.0.9
7
  Author: ibericode
8
  Author URI: https://ibericode.com/
9
  Text Domain: mailchimp-for-wp
47
  }
48
 
49
  // bootstrap the core plugin
50
+ define( 'MC4WP_VERSION', '3.0.9' );
51
  define( 'MC4WP_PLUGIN_DIR', dirname( __FILE__ ) . '/' );
52
  define( 'MC4WP_PLUGIN_URL', plugins_url( '/' , __FILE__ ) );
53
  define( 'MC4WP_PLUGIN_FILE', __FILE__ );
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://mc4wp.com/#utm_source=wp-plugin-repo&utm_medium=mailchimp-f
4
  Tags: mailchimp, mc4wp, email, marketing, newsletter, subscribe, widget, mc4wp, contact form 7, woocommerce, buddypress, ibericode, mail chimp
5
  Requires at least: 3.7
6
  Tested up to: 4.4
7
- Stable tag: 3.0.8
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -174,6 +174,12 @@ MailChimp for WordPress is being developed on GitHub. If you want to collaborate
174
  == Changelog ==
175
 
176
 
 
 
 
 
 
 
177
  #### 3.0.8 - December 15, 2015
178
 
179
  **Fixes**
4
  Tags: mailchimp, mc4wp, email, marketing, newsletter, subscribe, widget, mc4wp, contact form 7, woocommerce, buddypress, ibericode, mail chimp
5
  Requires at least: 3.7
6
  Tested up to: 4.4
7
+ Stable tag: 3.0.9
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
174
  == Changelog ==
175
 
176
 
177
+ #### 3.0.9 - December 17, 2015
178
+
179
+ **Fixes**
180
+
181
+ Not being able to select a list when creating a new form.
182
+
183
  #### 3.0.8 - December 15, 2015
184
 
185
  **Fixes**