WooCommerce MailChimp - Version 1.3.3

Version Description

  • Fix for transient key length. Tested with WordPress 4.1
Download this release

Release Info

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

Code changes from version 1.3.2 to 1.3.3

README.md CHANGED
@@ -1,6 +1,9 @@
1
  ## WooCommerce MailChimp ##
2
- [![WordPress Plugin version](http://img.shields.io/badge/plugin-v1.3.2-blue.svg?style=flat)](https://wordpress.org/plugins/woocommerce-mailchimp/)
3
- [![License](http://img.shields.io/badge/license-GPLv3-red.svg?style=flat)](http://opensource.org/licenses/GPL-3.0)
 
 
 
4
 
5
  WooCommerce MailChimp provides simple and flexible MailChimp integration for WooCommerce.
6
 
@@ -66,6 +69,9 @@ If you need help, have problems, want to leave feedback or want to provide const
66
 
67
  ### Changelog
68
 
 
 
 
69
  #### 1.3.2
70
  * Fix for headers already sent message. Tested with WordPress 4.0 and WooCommerce 2.2.*
71
 
1
  ## WooCommerce MailChimp ##
2
+ [![WordPress tested](http://img.shields.io/wordpress/v/woocommerce-mailchimp.svg?style=flat-square)](https://wordpress.org/plugins/woocommerce-mailchimp/)
3
+ [![WordPress Plugin version](http://img.shields.io/wordpress/plugin/v/woocommerce-mailchimp.svg?style=flat-square)](https://wordpress.org/plugins/woocommerce-mailchimp/)
4
+ [![WordPress Plugin Downloads](http://img.shields.io/wordpress/plugin/dt/woocommerce-mailchimp.svg?style=flat-square)](https://wordpress.org/plugins/woocommerce-mailchimp/)
5
+ [![WordPress Plugin Rating](http://img.shields.io/wordpress/plugin/r/woocommerce-mailchimp.svg?style=flat-square)](https://wordpress.org/plugins/woocommerce-mailchimp/)
6
+ [![License](http://img.shields.io/badge/license-GPLv3-red.svg?style=flat-square)](http://opensource.org/licenses/GPL-3.0)
7
 
8
  WooCommerce MailChimp provides simple and flexible MailChimp integration for WooCommerce.
9
 
69
 
70
  ### Changelog
71
 
72
+ #### 1.3.3
73
+ * Fix for transient key length. Tested with WordPress 4.1
74
+
75
  #### 1.3.2
76
  * Fix for headers already sent message. Tested with WordPress 4.0 and WooCommerce 2.2.*
77
 
classes/class-ss-wc-integration-mailchimp.php CHANGED
@@ -9,7 +9,7 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
9
  *
10
  * @class SS_WC_Integration_MailChimp
11
  * @extends WC_Integration
12
- * @version 1.3.2
13
  * @package WooCommerce MailChimp
14
  * @author Saint Systems
15
  */
@@ -296,7 +296,7 @@ class SS_WC_Integration_MailChimp extends WC_Integration {
296
  * @return void
297
  */
298
  public function get_lists() {
299
- if ( ! $mailchimp_lists = get_transient( 'ss_wc_mailchimp_list_' . md5( $this->api_key ) ) ) {
300
 
301
  $mailchimp_lists = array();
302
  $retval = $this->mailchimp->lists();
@@ -312,7 +312,7 @@ class SS_WC_Integration_MailChimp extends WC_Integration {
312
  $mailchimp_lists[ $list['id'] ] = $list['name'];
313
 
314
  if ( sizeof( $mailchimp_lists ) > 0 )
315
- set_transient( 'ss_wc_mailchimp_list_' . md5( $this->api_key ), $mailchimp_lists, 60*60*1 );
316
  }
317
  }
318
 
@@ -436,11 +436,19 @@ class SS_WC_Integration_MailChimp extends WC_Integration {
436
  if ( $api->errorCode && $api->errorCode != 214 ) {
437
  self::log( 'WooCommerce MailChimp subscription failed: (' . $api->errorCode . ') ' . $api->errorMessage );
438
 
 
439
  do_action( 'ss_wc_mailchimp_subscribed', $email );
440
 
 
 
 
441
  // Email admin
442
  wp_mail( get_option('admin_email'), __( 'WooCommerce MailChimp subscription failed', 'ss_wc_mailchimp' ), '(' . $api->errorCode . ') ' . $api->errorMessage );
443
  }
 
 
 
 
444
  }
445
 
446
  /**
9
  *
10
  * @class SS_WC_Integration_MailChimp
11
  * @extends WC_Integration
12
+ * @version 1.3.3
13
  * @package WooCommerce MailChimp
14
  * @author Saint Systems
15
  */
296
  * @return void
297
  */
298
  public function get_lists() {
299
+ if ( ! $mailchimp_lists = get_transient( 'sswcmclist_' . md5( $this->api_key ) ) ) {
300
 
301
  $mailchimp_lists = array();
302
  $retval = $this->mailchimp->lists();
312
  $mailchimp_lists[ $list['id'] ] = $list['name'];
313
 
314
  if ( sizeof( $mailchimp_lists ) > 0 )
315
+ set_transient( 'sswcmclist_' . md5( $this->api_key ), $mailchimp_lists, 60*60*1 );
316
  }
317
  }
318
 
436
  if ( $api->errorCode && $api->errorCode != 214 ) {
437
  self::log( 'WooCommerce MailChimp subscription failed: (' . $api->errorCode . ') ' . $api->errorMessage );
438
 
439
+ // Compability to old hook
440
  do_action( 'ss_wc_mailchimp_subscribed', $email );
441
 
442
+ // New hook for failing operations
443
+ do_action( 'ss_wc_mailchimp_subscription_failed', $email, array( 'list_id' => $listid, 'order_id' => $order_id ) );
444
+
445
  // Email admin
446
  wp_mail( get_option('admin_email'), __( 'WooCommerce MailChimp subscription failed', 'ss_wc_mailchimp' ), '(' . $api->errorCode . ') ' . $api->errorMessage );
447
  }
448
+ else {
449
+ // Hook on success
450
+ do_action( 'ss_wc_mailchimp_subscription_success', $email, array( 'list_id' => $listid, 'order_id' => $order_id ) );
451
+ }
452
  }
453
 
454
  /**
languages/woocommerce-mailchimp.pot CHANGED
@@ -1,19 +1,19 @@
1
- # Copyright (C) 2014 WooCommerce MailChimp
2
  # This file is distributed under the same license as the WooCommerce MailChimp package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: WooCommerce MailChimp 1.1.3\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/woocommerce-mailchimp\n"
7
- "POT-Creation-Date: 2014-01-03 23:17:55+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
11
- "PO-Revision-Date: 2014-MO-DA HO:MI+ZONE\n"
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
14
 
15
  #: classes/class-ss-wc-integration-mailchimp.php:31
16
- #: classes/class-ss-wc-integration-mailchimp.php:350
17
  msgid "MailChimp"
18
  msgstr ""
19
 
@@ -21,137 +21,175 @@ msgstr ""
21
  msgid "MailChimp is a popular email marketing service."
22
  msgstr ""
23
 
24
- #: classes/class-ss-wc-integration-mailchimp.php:82
25
- msgid "MailChimp error: Please enter your api key <a href=\"%s\">here</a>"
 
 
26
  msgstr ""
27
 
28
- #: classes/class-ss-wc-integration-mailchimp.php:156
29
  msgid "Select a list..."
30
  msgstr ""
31
 
32
- #: classes/class-ss-wc-integration-mailchimp.php:156
33
  msgid "Enter your key and save to see your lists"
34
  msgstr ""
35
 
36
- #: classes/class-ss-wc-integration-mailchimp.php:161
37
  msgid "Enable/Disable"
38
  msgstr ""
39
 
40
- #: classes/class-ss-wc-integration-mailchimp.php:162
41
  msgid "Enable MailChimp"
42
  msgstr ""
43
 
44
- #: classes/class-ss-wc-integration-mailchimp.php:168
45
  msgid "Subscribe Event"
46
  msgstr ""
47
 
48
- #: classes/class-ss-wc-integration-mailchimp.php:170
49
  msgid "When should customers be subscribed to lists?"
50
  msgstr ""
51
 
52
- #: classes/class-ss-wc-integration-mailchimp.php:173
53
  msgid "Order Created"
54
  msgstr ""
55
 
56
- #: classes/class-ss-wc-integration-mailchimp.php:174
57
  msgid "Order Completed"
58
  msgstr ""
59
 
60
- #: classes/class-ss-wc-integration-mailchimp.php:178
61
  msgid "API Key"
62
  msgstr ""
63
 
64
- #: classes/class-ss-wc-integration-mailchimp.php:180
65
  msgid ""
66
  "<a href=\"https://us2.admin.mailchimp.com/account/api/\" target=\"_blank"
67
  "\">Login to mailchimp</a> to look up your api key."
68
  msgstr ""
69
 
70
- #: classes/class-ss-wc-integration-mailchimp.php:184
71
  msgid "Main List"
72
  msgstr ""
73
 
74
- #: classes/class-ss-wc-integration-mailchimp.php:186
75
  msgid "All customers will be added to this list."
76
  msgstr ""
77
 
78
- #: classes/class-ss-wc-integration-mailchimp.php:191
79
  msgid "Group Name"
80
  msgstr ""
81
 
82
- #: classes/class-ss-wc-integration-mailchimp.php:193
83
  msgid ""
84
  "Optional: Enter the name of the group. Learn more about <a href=\"http://"
85
  "mailchimp.com/features/groups\" target=\"_blank\">Groups</a>"
86
  msgstr ""
87
 
88
- #: classes/class-ss-wc-integration-mailchimp.php:197
89
  msgid "Groups"
90
  msgstr ""
91
 
92
- #: classes/class-ss-wc-integration-mailchimp.php:199
93
- msgid "Optional: Comma delimited list of interest groups to add the email to."
 
 
94
  msgstr ""
95
 
96
- #: classes/class-ss-wc-integration-mailchimp.php:203
97
  msgid "Double Opt-In"
98
  msgstr ""
99
 
100
- #: classes/class-ss-wc-integration-mailchimp.php:204
101
  msgid "Enable Double Opt-In"
102
  msgstr ""
103
 
104
- #: classes/class-ss-wc-integration-mailchimp.php:206
105
  msgid ""
106
  "If enabled, customers will receive an email prompting them to confirm their "
107
  "subscription to the list above."
108
  msgstr ""
109
 
110
- #: classes/class-ss-wc-integration-mailchimp.php:210
111
  msgid "Display Opt-In Field"
112
  msgstr ""
113
 
114
- #: classes/class-ss-wc-integration-mailchimp.php:211
115
  msgid "Display an Opt-In Field on Checkout"
116
  msgstr ""
117
 
118
- #: classes/class-ss-wc-integration-mailchimp.php:213
119
  msgid ""
120
  "If enabled, customers will be presented with a \"Opt-in\" checkbox during "
121
  "checkout and will only be added to the list above if they opt-in."
122
  msgstr ""
123
 
124
- #: classes/class-ss-wc-integration-mailchimp.php:217
125
  msgid "Opt-In Field Label"
126
  msgstr ""
127
 
128
- #: classes/class-ss-wc-integration-mailchimp.php:219
129
  msgid "Optional: customize the label displayed next to the opt-in checkbox."
130
  msgstr ""
131
 
132
- #: classes/class-ss-wc-integration-mailchimp.php:220
133
  msgid "Add me to the newsletter (we will never share your email)."
134
  msgstr ""
135
 
 
 
 
 
 
 
 
 
 
 
 
 
136
  #: classes/class-ss-wc-integration-mailchimp.php:243
137
- msgid "Unable to load lists() from MailChimp: (%s) %s"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
138
  msgstr ""
139
 
140
- #: classes/class-ss-wc-integration-mailchimp.php:279
141
  msgid "Unable to load listInterestGroupings() from MailChimp: (%s) %s"
142
  msgstr ""
143
 
144
- #: classes/class-ss-wc-integration-mailchimp.php:341
145
- msgid "Email subscription failed (Mailchimp)"
146
  msgstr ""
147
 
148
- #: classes/class-ss-wc-integration-mailchimp.php:351
149
  msgid ""
150
  "Enter your MailChimp settings below to control how WooCommerce integrates "
151
  "with your MailChimp lists."
152
  msgstr ""
153
 
154
- #: woocommerce-mailchimp.php:41
155
  msgid "Settings"
156
  msgstr ""
157
 
1
+ # Copyright (C) 2015 WooCommerce MailChimp
2
  # This file is distributed under the same license as the WooCommerce MailChimp package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: WooCommerce MailChimp 1.3.2\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/woocommerce-mailchimp\n"
7
+ "POT-Creation-Date: 2015-01-16 15:51:13+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
11
+ "PO-Revision-Date: 2015-MO-DA HO:MI+ZONE\n"
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
14
 
15
  #: classes/class-ss-wc-integration-mailchimp.php:31
16
+ #: classes/class-ss-wc-integration-mailchimp.php:451
17
  msgid "MailChimp"
18
  msgstr ""
19
 
21
  msgid "MailChimp is a popular email marketing service."
22
  msgstr ""
23
 
24
+ #: classes/class-ss-wc-integration-mailchimp.php:86
25
+ msgid ""
26
+ "WooCommerce MailChimp error: Plugin is enabled but no api key provided. "
27
+ "Please enter your api key <a href=\"%s\">here</a>."
28
  msgstr ""
29
 
30
+ #: classes/class-ss-wc-integration-mailchimp.php:172
31
  msgid "Select a list..."
32
  msgstr ""
33
 
34
+ #: classes/class-ss-wc-integration-mailchimp.php:172
35
  msgid "Enter your key and save to see your lists"
36
  msgstr ""
37
 
38
+ #: classes/class-ss-wc-integration-mailchimp.php:177
39
  msgid "Enable/Disable"
40
  msgstr ""
41
 
42
+ #: classes/class-ss-wc-integration-mailchimp.php:178
43
  msgid "Enable MailChimp"
44
  msgstr ""
45
 
46
+ #: classes/class-ss-wc-integration-mailchimp.php:184
47
  msgid "Subscribe Event"
48
  msgstr ""
49
 
50
+ #: classes/class-ss-wc-integration-mailchimp.php:186
51
  msgid "When should customers be subscribed to lists?"
52
  msgstr ""
53
 
54
+ #: classes/class-ss-wc-integration-mailchimp.php:189
55
  msgid "Order Created"
56
  msgstr ""
57
 
58
+ #: classes/class-ss-wc-integration-mailchimp.php:190
59
  msgid "Order Completed"
60
  msgstr ""
61
 
62
+ #: classes/class-ss-wc-integration-mailchimp.php:194
63
  msgid "API Key"
64
  msgstr ""
65
 
66
+ #: classes/class-ss-wc-integration-mailchimp.php:196
67
  msgid ""
68
  "<a href=\"https://us2.admin.mailchimp.com/account/api/\" target=\"_blank"
69
  "\">Login to mailchimp</a> to look up your api key."
70
  msgstr ""
71
 
72
+ #: classes/class-ss-wc-integration-mailchimp.php:200
73
  msgid "Main List"
74
  msgstr ""
75
 
76
+ #: classes/class-ss-wc-integration-mailchimp.php:202
77
  msgid "All customers will be added to this list."
78
  msgstr ""
79
 
80
+ #: classes/class-ss-wc-integration-mailchimp.php:207
81
  msgid "Group Name"
82
  msgstr ""
83
 
84
+ #: classes/class-ss-wc-integration-mailchimp.php:209
85
  msgid ""
86
  "Optional: Enter the name of the group. Learn more about <a href=\"http://"
87
  "mailchimp.com/features/groups\" target=\"_blank\">Groups</a>"
88
  msgstr ""
89
 
90
+ #: classes/class-ss-wc-integration-mailchimp.php:213
91
  msgid "Groups"
92
  msgstr ""
93
 
94
+ #: classes/class-ss-wc-integration-mailchimp.php:215
95
+ msgid ""
96
+ "Optional: Comma separated list of interest groups to which subscribers "
97
+ "should be added."
98
  msgstr ""
99
 
100
+ #: classes/class-ss-wc-integration-mailchimp.php:219
101
  msgid "Double Opt-In"
102
  msgstr ""
103
 
104
+ #: classes/class-ss-wc-integration-mailchimp.php:220
105
  msgid "Enable Double Opt-In"
106
  msgstr ""
107
 
108
+ #: classes/class-ss-wc-integration-mailchimp.php:222
109
  msgid ""
110
  "If enabled, customers will receive an email prompting them to confirm their "
111
  "subscription to the list above."
112
  msgstr ""
113
 
114
+ #: classes/class-ss-wc-integration-mailchimp.php:226
115
  msgid "Display Opt-In Field"
116
  msgstr ""
117
 
118
+ #: classes/class-ss-wc-integration-mailchimp.php:227
119
  msgid "Display an Opt-In Field on Checkout"
120
  msgstr ""
121
 
122
+ #: classes/class-ss-wc-integration-mailchimp.php:229
123
  msgid ""
124
  "If enabled, customers will be presented with a \"Opt-in\" checkbox during "
125
  "checkout and will only be added to the list above if they opt-in."
126
  msgstr ""
127
 
128
+ #: classes/class-ss-wc-integration-mailchimp.php:233
129
  msgid "Opt-In Field Label"
130
  msgstr ""
131
 
132
+ #: classes/class-ss-wc-integration-mailchimp.php:235
133
  msgid "Optional: customize the label displayed next to the opt-in checkbox."
134
  msgstr ""
135
 
136
+ #: classes/class-ss-wc-integration-mailchimp.php:236
137
  msgid "Add me to the newsletter (we will never share your email)."
138
  msgstr ""
139
 
140
+ #: classes/class-ss-wc-integration-mailchimp.php:239
141
+ msgid "Opt-In Checkbox Default Status"
142
+ msgstr ""
143
+
144
+ #: classes/class-ss-wc-integration-mailchimp.php:241
145
+ msgid "The default state of the opt-in checkbox."
146
+ msgstr ""
147
+
148
+ #: classes/class-ss-wc-integration-mailchimp.php:243
149
+ msgid "Checked"
150
+ msgstr ""
151
+
152
  #: classes/class-ss-wc-integration-mailchimp.php:243
153
+ msgid "Unchecked"
154
+ msgstr ""
155
+
156
+ #: classes/class-ss-wc-integration-mailchimp.php:246
157
+ msgid "Opt-In Checkbox Display Location"
158
+ msgstr ""
159
+
160
+ #: classes/class-ss-wc-integration-mailchimp.php:248
161
+ msgid ""
162
+ "Where to display the opt-in checkbox on the checkout page (under Billing "
163
+ "info or Order info)."
164
+ msgstr ""
165
+
166
+ #: classes/class-ss-wc-integration-mailchimp.php:250
167
+ msgid "Billing"
168
+ msgstr ""
169
+
170
+ #: classes/class-ss-wc-integration-mailchimp.php:250
171
+ msgid "Order"
172
+ msgstr ""
173
+
174
+ #: classes/class-ss-wc-integration-mailchimp.php:332
175
+ msgid "Unable to load lists from MailChimp: (%s) %s."
176
  msgstr ""
177
 
178
+ #: classes/class-ss-wc-integration-mailchimp.php:358
179
  msgid "Unable to load listInterestGroupings() from MailChimp: (%s) %s"
180
  msgstr ""
181
 
182
+ #: classes/class-ss-wc-integration-mailchimp.php:442
183
+ msgid "WooCommerce MailChimp subscription failed"
184
  msgstr ""
185
 
186
+ #: classes/class-ss-wc-integration-mailchimp.php:452
187
  msgid ""
188
  "Enter your MailChimp settings below to control how WooCommerce integrates "
189
  "with your MailChimp lists."
190
  msgstr ""
191
 
192
+ #: woocommerce-mailchimp.php:55
193
  msgid "Settings"
194
  msgstr ""
195
 
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: anderly, saintsystems
3
  Tags: woocommerce, mailchimp
4
  Requires at least: 3.5.1
5
- Tested up to: 4.0
6
- Stable tag: 1.3.2
7
  License: GPLv3
8
 
9
  Simple and flexible MailChimp integration for WooCommerce.
@@ -78,6 +78,9 @@ If you need help, have problems, want to leave feedback or want to provide const
78
 
79
  == Changelog ==
80
 
 
 
 
81
  = 1.3.2 =
82
  * Fix for headers already sent message. Tested with WordPress 4.0 and WooCommerce 2.2.*
83
 
2
  Contributors: anderly, saintsystems
3
  Tags: woocommerce, mailchimp
4
  Requires at least: 3.5.1
5
+ Tested up to: 4.1
6
+ Stable tag: 1.3.3
7
  License: GPLv3
8
 
9
  Simple and flexible MailChimp integration for WooCommerce.
78
 
79
  == Changelog ==
80
 
81
+ = 1.3.3 =
82
+ * Fix for transient key length. Tested with WordPress 4.1
83
+
84
  = 1.3.2 =
85
  * Fix for headers already sent message. Tested with WordPress 4.0 and WooCommerce 2.2.*
86
 
woocommerce-mailchimp.php CHANGED
@@ -5,11 +5,11 @@
5
  * Description: WooCommerce MailChimp provides simple MailChimp integration for WooCommerce.
6
  * Author: Adam Anderly
7
  * Author URI: http://anderly.com
8
- * Version: 1.3.2
9
  * Text Domain: ss_wc_mailchimp
10
  * Domain Path: languages
11
  *
12
- * Copyright: � 2014 Adam Anderly
13
  * License: GNU General Public License v3.0
14
  * License URI: http://www.gnu.org/licenses/gpl-3.0.html
15
  *
5
  * Description: WooCommerce MailChimp provides simple MailChimp integration for WooCommerce.
6
  * Author: Adam Anderly
7
  * Author URI: http://anderly.com
8
+ * Version: 1.3.3
9
  * Text Domain: ss_wc_mailchimp
10
  * Domain Path: languages
11
  *
12
+ * Copyright: � 2015 Adam Anderly
13
  * License: GNU General Public License v3.0
14
  * License URI: http://www.gnu.org/licenses/gpl-3.0.html
15
  *