MailPoet Newsletters (New) - Version 3.29.0

Version Description

  • 2019-06-18 =
  • Fixed: improved timing of subscribing via the WP registration form to reject subscribers rejected by WP registration protection. Special thanks to customer David for helping troubleshoot this issue.
Download this release

Release Info

Developer wysija
Plugin Icon 128x128 MailPoet Newsletters (New)
Version 3.29.0
Comparing to
See all releases

Code changes from version 3.28.0 to 3.29.0

lang/mailpoet-ar.mo CHANGED
Binary file
lang/mailpoet-ca.mo CHANGED
Binary file
lang/mailpoet-cs_CZ.mo CHANGED
Binary file
lang/mailpoet-da_DK.mo CHANGED
Binary file
lang/mailpoet-de_DE.mo CHANGED
Binary file
lang/mailpoet-el.mo CHANGED
Binary file
lang/mailpoet-es_ES.mo CHANGED
Binary file
lang/mailpoet-es_MX.mo CHANGED
Binary file
lang/mailpoet-fr_CA.mo CHANGED
Binary file
lang/mailpoet-fr_FR.mo CHANGED
Binary file
lang/mailpoet-hu_HU.mo CHANGED
Binary file
lang/mailpoet-it_IT.mo CHANGED
Binary file
lang/mailpoet-ja.mo CHANGED
Binary file
lang/mailpoet-nb_NO.mo CHANGED
Binary file
lang/mailpoet-nl_NL.mo CHANGED
Binary file
lang/mailpoet-pt_BR.mo CHANGED
Binary file
lang/mailpoet-pt_PT.mo CHANGED
Binary file
lang/mailpoet-ro_RO.mo CHANGED
Binary file
lang/mailpoet-ru_RU.mo CHANGED
Binary file
lang/mailpoet-sq.mo CHANGED
Binary file
lang/mailpoet-sr_RS.mo CHANGED
Binary file
lang/mailpoet-sv_SE.mo CHANGED
Binary file
lang/mailpoet-tr_TR.mo CHANGED
Binary file
lang/mailpoet-zh_CN.mo CHANGED
Binary file
lang/mailpoet.pot CHANGED
@@ -4,7 +4,7 @@ msgid ""
4
  msgstr ""
5
  "Project-Id-Version: \n"
6
  "Report-Msgid-Bugs-To: http://support.mailpoet.com/\n"
7
- "POT-Creation-Date: 2019-06-04 09:43:39+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -210,7 +210,7 @@ msgstr ""
210
  #: lib/API/JSON/v1/Subscribers.php:78 lib/API/JSON/v1/Subscribers.php:301
211
  #: lib/API/JSON/v1/Subscribers.php:319 lib/API/JSON/v1/Subscribers.php:332
212
  #: lib/API/MP/v1/API.php:124 lib/API/MP/v1/API.php:199
213
- #: lib/API/MP/v1/API.php:346
214
  msgid "This subscriber does not exist."
215
  msgstr ""
216
 
@@ -270,19 +270,19 @@ msgstr[1] ""
270
  msgid "Subscriber email address is required."
271
  msgstr ""
272
 
273
- #: lib/API/MP/v1/API.php:255
274
  msgid "This subscriber already exists."
275
  msgstr ""
276
 
277
- #: lib/API/MP/v1/API.php:309
278
  msgid "List name is required."
279
  msgstr ""
280
 
281
- #: lib/API/MP/v1/API.php:316
282
  msgid "This list already exists."
283
  msgstr ""
284
 
285
- #: lib/API/MP/v1/API.php:336
286
  msgid "Failed to add list"
287
  msgstr ""
288
 
@@ -319,7 +319,7 @@ msgstr ""
319
  msgid "MailPoet"
320
  msgstr ""
321
 
322
- #: lib/Config/Hooks.php:275
323
  msgid "MailPoet Newsletter"
324
  msgstr ""
325
 
@@ -1343,47 +1343,47 @@ msgid ""
1343
  "please contact us and report this issue."
1344
  msgstr ""
1345
 
1346
- #: lib/CustomFields/ApiDataSanitizer.php:23
1347
  msgid "Mandatory argument \"%s\" is missing"
1348
  msgstr ""
1349
 
1350
- #: lib/CustomFields/ApiDataSanitizer.php:26
1351
  msgid "Mandatory argument \"%s\" has to be string"
1352
  msgstr ""
1353
 
1354
- #: lib/CustomFields/ApiDataSanitizer.php:32
1355
  msgid "Params has to be array"
1356
  msgstr ""
1357
 
1358
- #: lib/CustomFields/ApiDataSanitizer.php:77
1359
  msgid "Invalid type \"%s\""
1360
  msgstr ""
1361
 
1362
- #: lib/CustomFields/ApiDataSanitizer.php:86
1363
  msgid "Validate parameter is not valid"
1364
  msgstr ""
1365
 
1366
- #: lib/CustomFields/ApiDataSanitizer.php:93
1367
  msgid "You need to pass exactly one value for checkbox"
1368
  msgstr ""
1369
 
1370
- #: lib/CustomFields/ApiDataSanitizer.php:112
1371
  msgid "Invalid date_format for year_month_day"
1372
  msgstr ""
1373
 
1374
- #: lib/CustomFields/ApiDataSanitizer.php:118
1375
  msgid "Invalid date_format for year_month"
1376
  msgstr ""
1377
 
1378
- #: lib/CustomFields/ApiDataSanitizer.php:132
1379
  msgid "Invalid value for date_type"
1380
  msgstr ""
1381
 
1382
- #: lib/CustomFields/ApiDataSanitizer.php:142
1383
  msgid "You need to pass some values for this type"
1384
  msgstr ""
1385
 
1386
- #: lib/CustomFields/ApiDataSanitizer.php:153
1387
  msgid "Value cannot be empty"
1388
  msgstr ""
1389
 
4
  msgstr ""
5
  "Project-Id-Version: \n"
6
  "Report-Msgid-Bugs-To: http://support.mailpoet.com/\n"
7
+ "POT-Creation-Date: 2019-06-18 07:30:24+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
210
  #: lib/API/JSON/v1/Subscribers.php:78 lib/API/JSON/v1/Subscribers.php:301
211
  #: lib/API/JSON/v1/Subscribers.php:319 lib/API/JSON/v1/Subscribers.php:332
212
  #: lib/API/MP/v1/API.php:124 lib/API/MP/v1/API.php:199
213
+ #: lib/API/MP/v1/API.php:352
214
  msgid "This subscriber does not exist."
215
  msgstr ""
216
 
270
  msgid "Subscriber email address is required."
271
  msgstr ""
272
 
273
+ #: lib/API/MP/v1/API.php:256
274
  msgid "This subscriber already exists."
275
  msgstr ""
276
 
277
+ #: lib/API/MP/v1/API.php:312
278
  msgid "List name is required."
279
  msgstr ""
280
 
281
+ #: lib/API/MP/v1/API.php:320
282
  msgid "This list already exists."
283
  msgstr ""
284
 
285
+ #: lib/API/MP/v1/API.php:342
286
  msgid "Failed to add list"
287
  msgstr ""
288
 
319
  msgid "MailPoet"
320
  msgstr ""
321
 
322
+ #: lib/Config/Hooks.php:279
323
  msgid "MailPoet Newsletter"
324
  msgstr ""
325
 
1343
  "please contact us and report this issue."
1344
  msgstr ""
1345
 
1346
+ #: lib/CustomFields/ApiDataSanitizer.php:34
1347
  msgid "Mandatory argument \"%s\" is missing"
1348
  msgstr ""
1349
 
1350
+ #: lib/CustomFields/ApiDataSanitizer.php:37
1351
  msgid "Mandatory argument \"%s\" has to be string"
1352
  msgstr ""
1353
 
1354
+ #: lib/CustomFields/ApiDataSanitizer.php:43
1355
  msgid "Params has to be array"
1356
  msgstr ""
1357
 
1358
+ #: lib/CustomFields/ApiDataSanitizer.php:88
1359
  msgid "Invalid type \"%s\""
1360
  msgstr ""
1361
 
1362
+ #: lib/CustomFields/ApiDataSanitizer.php:97
1363
  msgid "Validate parameter is not valid"
1364
  msgstr ""
1365
 
1366
+ #: lib/CustomFields/ApiDataSanitizer.php:104
1367
  msgid "You need to pass exactly one value for checkbox"
1368
  msgstr ""
1369
 
1370
+ #: lib/CustomFields/ApiDataSanitizer.php:123
1371
  msgid "Invalid date_format for year_month_day"
1372
  msgstr ""
1373
 
1374
+ #: lib/CustomFields/ApiDataSanitizer.php:129
1375
  msgid "Invalid date_format for year_month"
1376
  msgstr ""
1377
 
1378
+ #: lib/CustomFields/ApiDataSanitizer.php:143
1379
  msgid "Invalid value for date_type"
1380
  msgstr ""
1381
 
1382
+ #: lib/CustomFields/ApiDataSanitizer.php:153
1383
  msgid "You need to pass some values for this type"
1384
  msgstr ""
1385
 
1386
+ #: lib/CustomFields/ApiDataSanitizer.php:164
1387
  msgid "Value cannot be empty"
1388
  msgstr ""
1389
 
lib/API/MP/v1/API.php CHANGED
@@ -93,15 +93,15 @@ class API {
93
  $custom_field = CustomField::createOrUpdate($this->custom_fields_data_sanitizer->sanitize($data));
94
  $errors = $custom_field->getErrors();
95
  if (!empty($errors)) {
96
- throw new \Exception('Failed to save a new subscriber field');
97
  }
98
  $custom_field = CustomField::findOne($custom_field->id);
99
  if (!$custom_field instanceof CustomField) {
100
- throw new \Exception('Failed to create a new subscriber field');
101
  }
102
  return $custom_field->asArray();
103
  } catch (\InvalidArgumentException $e) {
104
- throw new \Exception($e->getMessage(), $e->getCode(), $e);
105
  }
106
  }
107
 
@@ -115,33 +115,33 @@ class API {
115
  $skip_subscriber_notification = (isset($options['skip_subscriber_notification']) && $options['skip_subscriber_notification'] === true) ? true : false;
116
 
117
  if (empty($list_ids)) {
118
- throw new \Exception(__('At least one segment ID is required.', 'mailpoet'));
119
  }
120
 
121
  // throw exception when subscriber does not exist
122
  $subscriber = Subscriber::findOne($subscriber_id);
123
  if (!$subscriber) {
124
- throw new \Exception(__('This subscriber does not exist.', 'mailpoet'));
125
  }
126
 
127
  // throw exception when none of the segments exist
128
  $found_segments = Segment::whereIn('id', $list_ids)->findMany();
129
  if (!$found_segments) {
130
  $exception = WPFunctions::get()->_n('This list does not exist.', 'These lists do not exist.', count($list_ids), 'mailpoet');
131
- throw new \Exception($exception);
132
  }
133
 
134
  // throw exception when trying to subscribe to WP Users or WooCommerce Customers segments
135
  $found_segments_ids = [];
136
  foreach ($found_segments as $found_segment) {
137
  if ($found_segment->type === Segment::TYPE_WP_USERS) {
138
- throw new \Exception(__(sprintf("Can't subscribe to a WordPress Users list with ID %d.", $found_segment->id), 'mailpoet'));
139
  }
140
  if ($found_segment->type === Segment::TYPE_WC_USERS) {
141
- throw new \Exception(__(sprintf("Can't subscribe to a WooCommerce Customers list with ID %d.", $found_segment->id), 'mailpoet'));
142
  }
143
  if ($found_segment->type !== Segment::TYPE_DEFAULT) {
144
- throw new \Exception(__(sprintf("Can't subscribe to a list with ID %d.", $found_segment->id), 'mailpoet'));
145
  }
146
  $found_segments_ids[] = $found_segment->id;
147
  }
@@ -153,7 +153,7 @@ class API {
153
  WPFunctions::get()->_n('List with ID %s does not exist.', 'Lists with IDs %s do not exist.', count($missing_ids), 'mailpoet'),
154
  implode(', ', $missing_ids)
155
  );
156
- throw new \Exception(sprintf($exception, implode(', ', $missing_ids)));
157
  }
158
 
159
  SubscriberSegment::subscribeToSegments($subscriber, $found_segments_ids);
@@ -171,9 +171,9 @@ class API {
171
  ) {
172
  $result = $this->_sendConfirmationEmail($subscriber);
173
  if (!$result && $subscriber->getErrors()) {
174
- throw new \Exception(
175
- WPFunctions::get()->__(sprintf('Subscriber added to lists, but confirmation email failed to send: %s', strtolower(implode(', ', $subscriber->getErrors()))), 'mailpoet')
176
- );
177
  }
178
  }
179
 
@@ -190,30 +190,30 @@ class API {
190
 
191
  function unsubscribeFromLists($subscriber_id, array $list_ids) {
192
  if (empty($list_ids)) {
193
- throw new \Exception(__('At least one segment ID is required.', 'mailpoet'));
194
  }
195
 
196
  // throw exception when subscriber does not exist
197
  $subscriber = Subscriber::findOne($subscriber_id);
198
  if (!$subscriber) {
199
- throw new \Exception(__('This subscriber does not exist.', 'mailpoet'));
200
  }
201
 
202
  // throw exception when none of the segments exist
203
  $found_segments = Segment::whereIn('id', $list_ids)->findMany();
204
  if (!$found_segments) {
205
  $exception = WPFunctions::get()->_n('This list does not exist.', 'These lists do not exist.', count($list_ids), 'mailpoet');
206
- throw new \Exception($exception);
207
  }
208
 
209
  // throw exception when trying to subscribe to WP Users or WooCommerce Customers segments
210
  $found_segments_ids = [];
211
  foreach ($found_segments as $segment) {
212
  if ($segment->type === Segment::TYPE_WP_USERS) {
213
- throw new \Exception(__(sprintf("Can't unsubscribe from a WordPress Users list with ID %d.", $segment->id), 'mailpoet'));
214
  }
215
  if ($segment->type === Segment::TYPE_WC_USERS) {
216
- throw new \Exception(__(sprintf("Can't unsubscribe from a WooCommerce Customers list with ID %d.", $segment->id), 'mailpoet'));
217
  }
218
  $found_segments_ids[] = $segment->id;
219
  }
@@ -225,7 +225,7 @@ class API {
225
  WPFunctions::get()->_n('List with ID %s does not exist.', 'Lists with IDs %s do not exist.', count($missing_ids), 'mailpoet'),
226
  implode(', ', $missing_ids)
227
  );
228
- throw new \Exception($exception);
229
  }
230
 
231
  SubscriberSegment::unsubscribeFromSegments($subscriber, $found_segments_ids);
@@ -244,15 +244,17 @@ class API {
244
 
245
  // throw exception when subscriber email is missing
246
  if (empty($subscriber['email'])) {
247
- throw new \Exception(
248
- WPFunctions::get()->__('Subscriber email address is required.', 'mailpoet')
 
249
  );
250
  }
251
 
252
  // throw exception when subscriber already exists
253
  if (Subscriber::findOne($subscriber['email'])) {
254
- throw new \Exception(
255
- WPFunctions::get()->__('This subscriber already exists.', 'mailpoet')
 
256
  );
257
  }
258
 
@@ -273,8 +275,9 @@ class API {
273
  $new_subscriber = Source::setSource($new_subscriber, Source::API);
274
  $new_subscriber->save();
275
  if ($new_subscriber->getErrors() !== false) {
276
- throw new \Exception(
277
- WPFunctions::get()->__(sprintf('Failed to add subscriber: %s', strtolower(implode(', ', $new_subscriber->getErrors()))), 'mailpoet')
 
278
  );
279
  }
280
  if (!empty($custom_fields)) {
@@ -305,15 +308,17 @@ class API {
305
  function addList(array $list) {
306
  // throw exception when list name is missing
307
  if (empty($list['name'])) {
308
- throw new \Exception(
309
- WPFunctions::get()->__('List name is required.', 'mailpoet')
 
310
  );
311
  }
312
 
313
  // throw exception when list already exists
314
  if (Segment::where('name', $list['name'])->findOne()) {
315
- throw new \Exception(
316
- WPFunctions::get()->__('This list already exists.', 'mailpoet')
 
317
  );
318
  }
319
 
@@ -325,15 +330,16 @@ class API {
325
  $new_list->hydrate($list);
326
  $new_list->save();
327
  if ($new_list->getErrors() !== false) {
328
- throw new \Exception(
329
- WPFunctions::get()->__(sprintf('Failed to add list: %s', strtolower(implode(', ', $new_list->getErrors()))), 'mailpoet')
 
330
  );
331
  }
332
 
333
  // reload list to get the saved created|updated|delete dates/other fields
334
  $new_list = Segment::findOne($new_list->id);
335
  if (!$new_list instanceof Segment) {
336
- throw new \Exception(WPFunctions::get()->__('Failed to add list', 'mailpoet'));
337
  }
338
 
339
  return $new_list->asArray();
@@ -343,7 +349,7 @@ class API {
343
  $subscriber = Subscriber::findOne($subscriber_email);
344
  // throw exception when subscriber does not exist
345
  if (!$subscriber) {
346
- throw new \Exception(__('This subscriber does not exist.', 'mailpoet'));
347
  }
348
  return $subscriber->withCustomFields()->withSubscriptions()->asArray();
349
  }
@@ -357,8 +363,9 @@ class API {
357
  if (is_array($result)) {
358
  foreach ($result as $queue) {
359
  if ($queue instanceof Sending && $queue->getErrors()) {
360
- throw new \Exception(
361
- WPFunctions::get()->__(sprintf('Subscriber added, but welcome email failed to send: %s', strtolower(implode(', ', $queue->getErrors()))), 'mailpoet')
 
362
  );
363
  }
364
  }
93
  $custom_field = CustomField::createOrUpdate($this->custom_fields_data_sanitizer->sanitize($data));
94
  $errors = $custom_field->getErrors();
95
  if (!empty($errors)) {
96
+ throw new APIException('Failed to save a new subscriber field ' . join(', ', $errors), APIException::FAILED_TO_SAVE_SUBSCRIBER_FIELD);
97
  }
98
  $custom_field = CustomField::findOne($custom_field->id);
99
  if (!$custom_field instanceof CustomField) {
100
+ throw new APIException('Failed to create a new subscriber field', APIException::FAILED_TO_SAVE_SUBSCRIBER_FIELD);
101
  }
102
  return $custom_field->asArray();
103
  } catch (\InvalidArgumentException $e) {
104
+ throw new APIException($e->getMessage(), $e->getCode(), $e);
105
  }
106
  }
107
 
115
  $skip_subscriber_notification = (isset($options['skip_subscriber_notification']) && $options['skip_subscriber_notification'] === true) ? true : false;
116
 
117
  if (empty($list_ids)) {
118
+ throw new APIException(__('At least one segment ID is required.', 'mailpoet'), APIException::SEGMENT_REQUIRED);
119
  }
120
 
121
  // throw exception when subscriber does not exist
122
  $subscriber = Subscriber::findOne($subscriber_id);
123
  if (!$subscriber) {
124
+ throw new APIException(__('This subscriber does not exist.', 'mailpoet'), APIException::SUBSCRIBER_NOT_EXISTS);
125
  }
126
 
127
  // throw exception when none of the segments exist
128
  $found_segments = Segment::whereIn('id', $list_ids)->findMany();
129
  if (!$found_segments) {
130
  $exception = WPFunctions::get()->_n('This list does not exist.', 'These lists do not exist.', count($list_ids), 'mailpoet');
131
+ throw new APIException($exception, APIException::LIST_NOT_EXISTS);
132
  }
133
 
134
  // throw exception when trying to subscribe to WP Users or WooCommerce Customers segments
135
  $found_segments_ids = [];
136
  foreach ($found_segments as $found_segment) {
137
  if ($found_segment->type === Segment::TYPE_WP_USERS) {
138
+ throw new APIException(__(sprintf("Can't subscribe to a WordPress Users list with ID %d.", $found_segment->id), 'mailpoet'), APIException::SUBSCRIBING_TO_WP_LIST_NOT_ALLOWED);
139
  }
140
  if ($found_segment->type === Segment::TYPE_WC_USERS) {
141
+ throw new APIException(__(sprintf("Can't subscribe to a WooCommerce Customers list with ID %d.", $found_segment->id), 'mailpoet'), APIException::SUBSCRIBING_TO_WC_LIST_NOT_ALLOWED);
142
  }
143
  if ($found_segment->type !== Segment::TYPE_DEFAULT) {
144
+ throw new APIException(__(sprintf("Can't subscribe to a list with ID %d.", $found_segment->id), 'mailpoet'), APIException::SUBSCRIBING_TO_LIST_NOT_ALLOWED);
145
  }
146
  $found_segments_ids[] = $found_segment->id;
147
  }
153
  WPFunctions::get()->_n('List with ID %s does not exist.', 'Lists with IDs %s do not exist.', count($missing_ids), 'mailpoet'),
154
  implode(', ', $missing_ids)
155
  );
156
+ throw new APIException(sprintf($exception, implode(', ', $missing_ids)), APIException::LIST_NOT_EXISTS);
157
  }
158
 
159
  SubscriberSegment::subscribeToSegments($subscriber, $found_segments_ids);
171
  ) {
172
  $result = $this->_sendConfirmationEmail($subscriber);
173
  if (!$result && $subscriber->getErrors()) {
174
+ throw new APIException(
175
+ WPFunctions::get()->__(sprintf('Subscriber added to lists, but confirmation email failed to send: %s', strtolower(implode(', ', $subscriber->getErrors()))), 'mailpoet'),
176
+ APIException::CONFIRMATION_FAILED_TO_SEND);
177
  }
178
  }
179
 
190
 
191
  function unsubscribeFromLists($subscriber_id, array $list_ids) {
192
  if (empty($list_ids)) {
193
+ throw new APIException(__('At least one segment ID is required.', 'mailpoet'), APIException::SEGMENT_REQUIRED);
194
  }
195
 
196
  // throw exception when subscriber does not exist
197
  $subscriber = Subscriber::findOne($subscriber_id);
198
  if (!$subscriber) {
199
+ throw new APIException(__('This subscriber does not exist.', 'mailpoet'), APIException::SUBSCRIBER_NOT_EXISTS);
200
  }
201
 
202
  // throw exception when none of the segments exist
203
  $found_segments = Segment::whereIn('id', $list_ids)->findMany();
204
  if (!$found_segments) {
205
  $exception = WPFunctions::get()->_n('This list does not exist.', 'These lists do not exist.', count($list_ids), 'mailpoet');
206
+ throw new APIException($exception, APIException::LIST_NOT_EXISTS);
207
  }
208
 
209
  // throw exception when trying to subscribe to WP Users or WooCommerce Customers segments
210
  $found_segments_ids = [];
211
  foreach ($found_segments as $segment) {
212
  if ($segment->type === Segment::TYPE_WP_USERS) {
213
+ throw new APIException(__(sprintf("Can't unsubscribe from a WordPress Users list with ID %d.", $segment->id), 'mailpoet'), APIException::SUBSCRIBING_TO_WP_LIST_NOT_ALLOWED);
214
  }
215
  if ($segment->type === Segment::TYPE_WC_USERS) {
216
+ throw new APIException(__(sprintf("Can't unsubscribe from a WooCommerce Customers list with ID %d.", $segment->id), 'mailpoet'), APIException::SUBSCRIBING_TO_WC_LIST_NOT_ALLOWED);
217
  }
218
  $found_segments_ids[] = $segment->id;
219
  }
225
  WPFunctions::get()->_n('List with ID %s does not exist.', 'Lists with IDs %s do not exist.', count($missing_ids), 'mailpoet'),
226
  implode(', ', $missing_ids)
227
  );
228
+ throw new APIException($exception, APIException::LIST_NOT_EXISTS);
229
  }
230
 
231
  SubscriberSegment::unsubscribeFromSegments($subscriber, $found_segments_ids);
244
 
245
  // throw exception when subscriber email is missing
246
  if (empty($subscriber['email'])) {
247
+ throw new APIException(
248
+ WPFunctions::get()->__('Subscriber email address is required.', 'mailpoet'),
249
+ APIException::EMAIL_ADDRESS_REQUIRED
250
  );
251
  }
252
 
253
  // throw exception when subscriber already exists
254
  if (Subscriber::findOne($subscriber['email'])) {
255
+ throw new APIException(
256
+ WPFunctions::get()->__('This subscriber already exists.', 'mailpoet'),
257
+ APIException::SUBSCRIBER_EXISTS
258
  );
259
  }
260
 
275
  $new_subscriber = Source::setSource($new_subscriber, Source::API);
276
  $new_subscriber->save();
277
  if ($new_subscriber->getErrors() !== false) {
278
+ throw new APIException(
279
+ WPFunctions::get()->__(sprintf('Failed to add subscriber: %s', strtolower(implode(', ', $new_subscriber->getErrors()))), 'mailpoet'),
280
+ APIException::FAILED_TO_SAVE_SUBSCRIBER
281
  );
282
  }
283
  if (!empty($custom_fields)) {
308
  function addList(array $list) {
309
  // throw exception when list name is missing
310
  if (empty($list['name'])) {
311
+ throw new APIException(
312
+ WPFunctions::get()->__('List name is required.', 'mailpoet'),
313
+ APIException::LIST_NAME_REQUIRED
314
  );
315
  }
316
 
317
  // throw exception when list already exists
318
  if (Segment::where('name', $list['name'])->findOne()) {
319
+ throw new APIException(
320
+ WPFunctions::get()->__('This list already exists.', 'mailpoet'),
321
+ APIException::LIST_EXISTS
322
  );
323
  }
324
 
330
  $new_list->hydrate($list);
331
  $new_list->save();
332
  if ($new_list->getErrors() !== false) {
333
+ throw new APIException(
334
+ WPFunctions::get()->__(sprintf('Failed to add list: %s', strtolower(implode(', ', $new_list->getErrors()))), 'mailpoet'),
335
+ APIException::FAILED_TO_SAVE_LIST
336
  );
337
  }
338
 
339
  // reload list to get the saved created|updated|delete dates/other fields
340
  $new_list = Segment::findOne($new_list->id);
341
  if (!$new_list instanceof Segment) {
342
+ throw new APIException(WPFunctions::get()->__('Failed to add list', 'mailpoet'), APIException::FAILED_TO_SAVE_LIST);
343
  }
344
 
345
  return $new_list->asArray();
349
  $subscriber = Subscriber::findOne($subscriber_email);
350
  // throw exception when subscriber does not exist
351
  if (!$subscriber) {
352
+ throw new APIException(__('This subscriber does not exist.', 'mailpoet'), APIException::SUBSCRIBER_NOT_EXISTS);
353
  }
354
  return $subscriber->withCustomFields()->withSubscriptions()->asArray();
355
  }
363
  if (is_array($result)) {
364
  foreach ($result as $queue) {
365
  if ($queue instanceof Sending && $queue->getErrors()) {
366
+ throw new APIException(
367
+ WPFunctions::get()->__(sprintf('Subscriber added, but welcome email failed to send: %s', strtolower(implode(', ', $queue->getErrors()))), 'mailpoet'),
368
+ APIException::WELCOME_FAILED_TO_SEND
369
  );
370
  }
371
  }
lib/API/MP/v1/APIException.php ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace MailPoet\API\MP\v1;
3
+
4
+ if (!defined('ABSPATH')) exit;
5
+
6
+ class APIException extends \Exception {
7
+ const FAILED_TO_SAVE_SUBSCRIBER_FIELD = 1;
8
+ const SEGMENT_REQUIRED = 3;
9
+ const SUBSCRIBER_NOT_EXISTS = 4;
10
+ const LIST_NOT_EXISTS = 5;
11
+ const SUBSCRIBING_TO_WP_LIST_NOT_ALLOWED = 6;
12
+ const SUBSCRIBING_TO_WC_LIST_NOT_ALLOWED = 7;
13
+ const SUBSCRIBING_TO_LIST_NOT_ALLOWED = 8;
14
+ const CONFIRMATION_FAILED_TO_SEND = 10;
15
+ const EMAIL_ADDRESS_REQUIRED = 11;
16
+ const SUBSCRIBER_EXISTS = 12;
17
+ const FAILED_TO_SAVE_SUBSCRIBER = 13;
18
+ const LIST_NAME_REQUIRED = 14;
19
+ const LIST_EXISTS = 15;
20
+ const FAILED_TO_SAVE_LIST = 16;
21
+ const WELCOME_FAILED_TO_SEND = 17;
22
+ }
lib/Config/Hooks.php CHANGED
@@ -132,8 +132,12 @@ class Hooks {
132
  'register_form',
133
  [$this->subscription_registration, 'extendForm']
134
  );
135
- $this->wp->addAction(
136
- 'register_post',
 
 
 
 
137
  [$this->subscription_registration, 'onRegister'],
138
  60,
139
  3
132
  'register_form',
133
  [$this->subscription_registration, 'extendForm']
134
  );
135
+ // we need to process new users while they are registered.
136
+ // We used `register_post` before but that is too soon
137
+ // because if registration fails during `registration_errors` we will keep the user as subscriber.
138
+ // So we are hooking to `registration_error` with a low priority.
139
+ $this->wp->addFilter(
140
+ 'registration_errors',
141
  [$this->subscription_registration, 'onRegister'],
142
  60,
143
  3
lib/CustomFields/ApiDataSanitizer.php CHANGED
@@ -7,6 +7,17 @@ use MailPoet\Models\CustomField;
7
 
8
  class ApiDataSanitizer {
9
 
 
 
 
 
 
 
 
 
 
 
 
10
  function sanitize(array $data = []) {
11
  $this->checkMandatoryStringParameter($data, 'name');
12
  $this->checkMandatoryStringParameter($data, 'type');
@@ -20,16 +31,16 @@ class ApiDataSanitizer {
20
 
21
  private function checkMandatoryStringParameter(array $data, $parameter_name) {
22
  if (empty($data[$parameter_name])) {
23
- throw new InvalidArgumentException(sprintf(__('Mandatory argument "%s" is missing', 'mailpoet'), $parameter_name));
24
  }
25
  if (!is_string($data[$parameter_name])) {
26
- throw new InvalidArgumentException(sprintf(__('Mandatory argument "%s" has to be string', 'mailpoet'), $parameter_name));
27
  }
28
  }
29
 
30
  private function checkParamsType($data) {
31
  if (isset($data['params']) && !is_array($data['params'])) {
32
- throw new InvalidArgumentException(sprintf(__('Params has to be array', 'mailpoet')));
33
  }
34
  }
35
 
@@ -74,7 +85,7 @@ class ApiDataSanitizer {
74
  return $this->getExtraParamsForDate($data['params']);
75
  }
76
 
77
- throw new InvalidArgumentException(sprintf(__('Invalid type "%s"', 'mailpoet'), $type));
78
  }
79
 
80
  private function getExtraParamsForText($params) {
@@ -83,14 +94,14 @@ class ApiDataSanitizer {
83
  if (in_array($validate, ['number', 'alphanum', 'phone'], true)) {
84
  return ['validate' => $validate];
85
  }
86
- throw new InvalidArgumentException(__('Validate parameter is not valid', 'mailpoet'));
87
  }
88
  return [];
89
  }
90
 
91
  private function getExtraParamsForCheckbox($params) {
92
  if (empty($params['values']) || count($params['values']) > 1) {
93
- throw new InvalidArgumentException(__('You need to pass exactly one value for checkbox', 'mailpoet'));
94
  }
95
  $value = reset($params['values']);
96
  return ['values' => [$this->sanitizeValue($value)]];
@@ -109,13 +120,13 @@ class ApiDataSanitizer {
109
  switch ($date_type) {
110
  case 'year_month_day':
111
  if (!in_array($input_date_format, ['MM/DD/YYYY', 'DD/MM/YYYY', 'YYYY/MM/DD'], true)) {
112
- throw new InvalidArgumentException(__('Invalid date_format for year_month_day', 'mailpoet'));
113
  }
114
  $date_format = $input_date_format;
115
  break;
116
  case 'year_month':
117
  if (!in_array($input_date_format, ['YYYY/MM', 'MM/YY'], true)) {
118
- throw new InvalidArgumentException(__('Invalid date_format for year_month', 'mailpoet'));
119
  }
120
  $date_format = $input_date_format;
121
  break;
@@ -129,7 +140,7 @@ class ApiDataSanitizer {
129
  $date_format = 'DD';
130
  break;
131
  default:
132
- throw new InvalidArgumentException(__('Invalid value for date_type', 'mailpoet'));
133
  }
134
  return [
135
  'date_type' => $date_type,
@@ -139,7 +150,7 @@ class ApiDataSanitizer {
139
 
140
  private function getExtraParamsForSelect($params) {
141
  if (empty($params['values'])) {
142
- throw new InvalidArgumentException(__('You need to pass some values for this type', 'mailpoet'));
143
  }
144
  $values = [];
145
  foreach ($params['values'] as $value) {
@@ -150,7 +161,7 @@ class ApiDataSanitizer {
150
 
151
  private function sanitizeValue($value) {
152
  if (empty($value['value'])) {
153
- throw new InvalidArgumentException(__('Value cannot be empty', 'mailpoet'));
154
  }
155
  $result = ['value' => $value['value']];
156
  if (isset($value['is_checked']) && $value['is_checked']) {
7
 
8
  class ApiDataSanitizer {
9
 
10
+ const ERROR_MANDATORY_ARGUMENT_MISSING = 1001;
11
+ const ERROR_MANDATORY_ARGUMENT_WRONG_TYPE = 1002;
12
+ const ERROR_PARAMS_WRONG_TYPE = 1003;
13
+ const ERROR_INVALID_TYPE = 1004;
14
+ const ERROR_INVALID_VALIDATE = 1005;
15
+ const ERROR_CHECKBOX_WRONG_VALUES_COUNT = 1006;
16
+ const ERROR_INVALID_DATE_FORMAT = 1007;
17
+ const ERROR_INVALID_DATE_TYPE = 1008;
18
+ const ERROR_NO_VALUES = 1009;
19
+ const ERROR_NO_VALUE = 1010;
20
+
21
  function sanitize(array $data = []) {
22
  $this->checkMandatoryStringParameter($data, 'name');
23
  $this->checkMandatoryStringParameter($data, 'type');
31
 
32
  private function checkMandatoryStringParameter(array $data, $parameter_name) {
33
  if (empty($data[$parameter_name])) {
34
+ throw new InvalidArgumentException(sprintf(__('Mandatory argument "%s" is missing', 'mailpoet'), $parameter_name), self::ERROR_MANDATORY_ARGUMENT_MISSING);
35
  }
36
  if (!is_string($data[$parameter_name])) {
37
+ throw new InvalidArgumentException(sprintf(__('Mandatory argument "%s" has to be string', 'mailpoet'), $parameter_name), self::ERROR_MANDATORY_ARGUMENT_WRONG_TYPE);
38
  }
39
  }
40
 
41
  private function checkParamsType($data) {
42
  if (isset($data['params']) && !is_array($data['params'])) {
43
+ throw new InvalidArgumentException(sprintf(__('Params has to be array', 'mailpoet')), self::ERROR_PARAMS_WRONG_TYPE);
44
  }
45
  }
46
 
85
  return $this->getExtraParamsForDate($data['params']);
86
  }
87
 
88
+ throw new InvalidArgumentException(sprintf(__('Invalid type "%s"', 'mailpoet'), $type), self::ERROR_INVALID_TYPE);
89
  }
90
 
91
  private function getExtraParamsForText($params) {
94
  if (in_array($validate, ['number', 'alphanum', 'phone'], true)) {
95
  return ['validate' => $validate];
96
  }
97
+ throw new InvalidArgumentException(__('Validate parameter is not valid', 'mailpoet'), self::ERROR_INVALID_VALIDATE);
98
  }
99
  return [];
100
  }
101
 
102
  private function getExtraParamsForCheckbox($params) {
103
  if (empty($params['values']) || count($params['values']) > 1) {
104
+ throw new InvalidArgumentException(__('You need to pass exactly one value for checkbox', 'mailpoet'), self::ERROR_CHECKBOX_WRONG_VALUES_COUNT);
105
  }
106
  $value = reset($params['values']);
107
  return ['values' => [$this->sanitizeValue($value)]];
120
  switch ($date_type) {
121
  case 'year_month_day':
122
  if (!in_array($input_date_format, ['MM/DD/YYYY', 'DD/MM/YYYY', 'YYYY/MM/DD'], true)) {
123
+ throw new InvalidArgumentException(__('Invalid date_format for year_month_day', 'mailpoet'), self::ERROR_INVALID_DATE_FORMAT);
124
  }
125
  $date_format = $input_date_format;
126
  break;
127
  case 'year_month':
128
  if (!in_array($input_date_format, ['YYYY/MM', 'MM/YY'], true)) {
129
+ throw new InvalidArgumentException(__('Invalid date_format for year_month', 'mailpoet'), self::ERROR_INVALID_DATE_FORMAT);
130
  }
131
  $date_format = $input_date_format;
132
  break;
140
  $date_format = 'DD';
141
  break;
142
  default:
143
+ throw new InvalidArgumentException(__('Invalid value for date_type', 'mailpoet'), self::ERROR_INVALID_DATE_TYPE);
144
  }
145
  return [
146
  'date_type' => $date_type,
150
 
151
  private function getExtraParamsForSelect($params) {
152
  if (empty($params['values'])) {
153
+ throw new InvalidArgumentException(__('You need to pass some values for this type', 'mailpoet'), self::ERROR_NO_VALUES);
154
  }
155
  $values = [];
156
  foreach ($params['values'] as $value) {
161
 
162
  private function sanitizeValue($value) {
163
  if (empty($value['value'])) {
164
+ throw new InvalidArgumentException(__('Value cannot be empty', 'mailpoet'), self::ERROR_NO_VALUE);
165
  }
166
  $result = ['value' => $value['value']];
167
  if (isset($value['is_checked']) && $value['is_checked']) {
lib/Features/FeaturesController.php CHANGED
@@ -9,11 +9,13 @@ class FeaturesController {
9
  // Define features below in the following form:
10
  // const FEATURE_NAME_OF_FEATURE = 'name-of-feature';
11
  const FEATURE_DISPLAY_WOOCOMMERCE_REVENUES = 'display-woocommerce-revenues'; // may also have 'display_revenues' setting
 
12
 
13
  // Define feature defaults in the array below in the following form:
14
  // self::FEATURE_NAME_OF_FEATURE => true,
15
  private $defaults = [
16
  self::FEATURE_DISPLAY_WOOCOMMERCE_REVENUES => false,
 
17
  ];
18
 
19
  /** @var array */
9
  // Define features below in the following form:
10
  // const FEATURE_NAME_OF_FEATURE = 'name-of-feature';
11
  const FEATURE_DISPLAY_WOOCOMMERCE_REVENUES = 'display-woocommerce-revenues'; // may also have 'display_revenues' setting
12
+ const FEATURE_ABANDONED_SHOPPING_CART = 'abandoned-shopping-cart';
13
 
14
  // Define feature defaults in the array below in the following form:
15
  // self::FEATURE_NAME_OF_FEATURE => true,
16
  private $defaults = [
17
  self::FEATURE_DISPLAY_WOOCOMMERCE_REVENUES => false,
18
+ self::FEATURE_ABANDONED_SHOPPING_CART => false,
19
  ];
20
 
21
  /** @var array */
lib/Subscription/Registration.php CHANGED
@@ -54,9 +54,9 @@ class Registration {
54
  }
55
 
56
  function onRegister(
 
57
  $user_login,
58
- $user_email = null,
59
- $errors = null
60
  ) {
61
  if (
62
  empty($errors->errors)
@@ -68,6 +68,7 @@ class Registration {
68
  $user_email
69
  );
70
  }
 
71
  }
72
 
73
  private function subscribeNewUser($name, $email) {
54
  }
55
 
56
  function onRegister(
57
+ $errors,
58
  $user_login,
59
+ $user_email = null
 
60
  ) {
61
  if (
62
  empty($errors->errors)
68
  $user_email
69
  );
70
  }
71
+ return $errors;
72
  }
73
 
74
  private function subscribeNewUser($name, $email) {
mailpoet.php CHANGED
@@ -4,7 +4,7 @@ if (!defined('ABSPATH')) exit;
4
 
5
  /*
6
  * Plugin Name: MailPoet 3 (New)
7
- * Version: 3.28.0
8
  * Plugin URI: http://www.mailpoet.com
9
  * Description: Create and send newsletters, post notifications and welcome emails from your WordPress.
10
  * Author: MailPoet
@@ -18,7 +18,7 @@ if (!defined('ABSPATH')) exit;
18
  */
19
 
20
  $mailpoet_plugin = array(
21
- 'version' => '3.28.0',
22
  'filename' => __FILE__,
23
  'path' => dirname(__FILE__),
24
  'autoloader' => dirname(__FILE__) . '/vendor/autoload.php',
4
 
5
  /*
6
  * Plugin Name: MailPoet 3 (New)
7
+ * Version: 3.29.0
8
  * Plugin URI: http://www.mailpoet.com
9
  * Description: Create and send newsletters, post notifications and welcome emails from your WordPress.
10
  * Author: MailPoet
18
  */
19
 
20
  $mailpoet_plugin = array(
21
+ 'version' => '3.29.0',
22
  'filename' => __FILE__,
23
  'path' => dirname(__FILE__),
24
  'autoloader' => dirname(__FILE__) . '/vendor/autoload.php',
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: mailpoet, wysija
3
  Tags: email marketing, newsletter, newsletter subscribers, email, welcome email, post notification, WooCommerce emails, newsletter builder
4
  Requires at least: 4.7
5
  Tested up to: 5.2
6
- Stable tag: 3.28.0
7
  License: GPLv3
8
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
9
 
@@ -147,6 +147,9 @@ Stop by our [support site](https://www.mailpoet.com/support).
147
 
148
  == Changelog ==
149
 
 
 
 
150
  = 3.28.0 - 2019-06-04 =
151
  * Added: enforcement for authorized sending address for automatic and scheduled emails for new users after March 5;
152
  * Improvement: authorized sending email enforcement for new users since March 5;
3
  Tags: email marketing, newsletter, newsletter subscribers, email, welcome email, post notification, WooCommerce emails, newsletter builder
4
  Requires at least: 4.7
5
  Tested up to: 5.2
6
+ Stable tag: 3.29.0
7
  License: GPLv3
8
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
9
 
147
 
148
  == Changelog ==
149
 
150
+ = 3.29.0 - 2019-06-18 =
151
+ * Fixed: improved timing of subscribing via the WP registration form to reject subscribers rejected by WP registration protection. Special thanks to customer David for helping troubleshoot this issue.
152
+
153
  = 3.28.0 - 2019-06-04 =
154
  * Added: enforcement for authorized sending address for automatic and scheduled emails for new users after March 5;
155
  * Improvement: authorized sending email enforcement for new users since March 5;
vendor-prefixed/autoload.php CHANGED
@@ -4,4 +4,4 @@ namespace MailPoetVendor;
4
 
5
  // autoload.php @generated by Composer
6
  require_once __DIR__ . '/composer/autoload_real.php';
7
- return \MailPoetVendor\ComposerAutoloaderInit2bfb01c3f8e7e64aa473eb481cd64927::getLoader();
4
 
5
  // autoload.php @generated by Composer
6
  require_once __DIR__ . '/composer/autoload_real.php';
7
+ return \MailPoetVendor\ComposerAutoloaderInit7439035fc3670b7ef1321adeec5909f1::getLoader();
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit6ce68694395dd2124a559abefa438100::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInitba24472bbcbc688fe08299370812eb07::getLoader();
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit6ce68694395dd2124a559abefa438100
6
  {
7
  private static $loader;
8
 
@@ -19,15 +19,15 @@ class ComposerAutoloaderInit6ce68694395dd2124a559abefa438100
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInit6ce68694395dd2124a559abefa438100', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInit6ce68694395dd2124a559abefa438100', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
- call_user_func(\Composer\Autoload\ComposerStaticInit6ce68694395dd2124a559abefa438100::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
@@ -48,19 +48,19 @@ class ComposerAutoloaderInit6ce68694395dd2124a559abefa438100
48
  $loader->register(true);
49
 
50
  if ($useStaticLoader) {
51
- $includeFiles = Composer\Autoload\ComposerStaticInit6ce68694395dd2124a559abefa438100::$files;
52
  } else {
53
  $includeFiles = require __DIR__ . '/autoload_files.php';
54
  }
55
  foreach ($includeFiles as $fileIdentifier => $file) {
56
- composerRequire6ce68694395dd2124a559abefa438100($fileIdentifier, $file);
57
  }
58
 
59
  return $loader;
60
  }
61
  }
62
 
63
- function composerRequire6ce68694395dd2124a559abefa438100($fileIdentifier, $file)
64
  {
65
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
66
  require $file;
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInitba24472bbcbc688fe08299370812eb07
6
  {
7
  private static $loader;
8
 
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInitba24472bbcbc688fe08299370812eb07', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInitba24472bbcbc688fe08299370812eb07', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
+ call_user_func(\Composer\Autoload\ComposerStaticInitba24472bbcbc688fe08299370812eb07::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
48
  $loader->register(true);
49
 
50
  if ($useStaticLoader) {
51
+ $includeFiles = Composer\Autoload\ComposerStaticInitba24472bbcbc688fe08299370812eb07::$files;
52
  } else {
53
  $includeFiles = require __DIR__ . '/autoload_files.php';
54
  }
55
  foreach ($includeFiles as $fileIdentifier => $file) {
56
+ composerRequireba24472bbcbc688fe08299370812eb07($fileIdentifier, $file);
57
  }
58
 
59
  return $loader;
60
  }
61
  }
62
 
63
+ function composerRequireba24472bbcbc688fe08299370812eb07($fileIdentifier, $file)
64
  {
65
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
66
  require $file;
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInit6ce68694395dd2124a559abefa438100
8
  {
9
  public static $files = array (
10
  '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
@@ -792,10 +792,10 @@ class ComposerStaticInit6ce68694395dd2124a559abefa438100
792
  public static function getInitializer(ClassLoader $loader)
793
  {
794
  return \Closure::bind(function () use ($loader) {
795
- $loader->prefixLengthsPsr4 = ComposerStaticInit6ce68694395dd2124a559abefa438100::$prefixLengthsPsr4;
796
- $loader->prefixDirsPsr4 = ComposerStaticInit6ce68694395dd2124a559abefa438100::$prefixDirsPsr4;
797
- $loader->fallbackDirsPsr4 = ComposerStaticInit6ce68694395dd2124a559abefa438100::$fallbackDirsPsr4;
798
- $loader->classMap = ComposerStaticInit6ce68694395dd2124a559abefa438100::$classMap;
799
 
800
  }, null, ClassLoader::class);
801
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInitba24472bbcbc688fe08299370812eb07
8
  {
9
  public static $files = array (
10
  '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
792
  public static function getInitializer(ClassLoader $loader)
793
  {
794
  return \Closure::bind(function () use ($loader) {
795
+ $loader->prefixLengthsPsr4 = ComposerStaticInitba24472bbcbc688fe08299370812eb07::$prefixLengthsPsr4;
796
+ $loader->prefixDirsPsr4 = ComposerStaticInitba24472bbcbc688fe08299370812eb07::$prefixDirsPsr4;
797
+ $loader->fallbackDirsPsr4 = ComposerStaticInitba24472bbcbc688fe08299370812eb07::$fallbackDirsPsr4;
798
+ $loader->classMap = ComposerStaticInitba24472bbcbc688fe08299370812eb07::$classMap;
799
 
800
  }, null, ClassLoader::class);
801
  }