SendinBlue Subscribe Form And WP SMTP - Version 3.1.20

Version Description

  • Fixing issue with plugin deactivation on update.
Download this release

Release Info

Developer amarsib
Plugin Icon 128x128 SendinBlue Subscribe Form And WP SMTP
Version 3.1.20
Comparing to
See all releases

Code changes from version 3.1.16 to 3.1.20

Files changed (3) hide show
  1. inc/SendinblueApiClient.php +1 -1
  2. readme.txt +14 -337
  3. sendinblue.php +23 -4
inc/SendinblueApiClient.php CHANGED
@@ -14,7 +14,7 @@ class SendinblueApiClient
14
  const RESPONSE_CODE_CREATED = 201;
15
  const RESPONSE_CODE_ACCEPTED = 202;
16
  const RESPONSE_CODE_UNAUTHORIZED = 401;
17
- const PLUGIN_VERSION = '3.1.19';
18
  const USER_AGENT = 'sendinblue_plugins/wordpress';
19
 
20
  private $apiKey;
14
  const RESPONSE_CODE_CREATED = 201;
15
  const RESPONSE_CODE_ACCEPTED = 202;
16
  const RESPONSE_CODE_UNAUTHORIZED = 401;
17
+ const PLUGIN_VERSION = '3.1.20';
18
  const USER_AGENT = 'sendinblue_plugins/wordpress';
19
 
20
  private $apiKey;
readme.txt CHANGED
@@ -1,6 +1,6 @@
1
  === Newsletter, SMTP, Email marketing and Subscribe forms by Sendinblue ===
2
  Contributors: neeraj_slit
3
- Tags: sendinblue, marketing automation, email marketing, email campaign, newsletter, wordpress smtp, subscription form, phpmailer, SMTP, wp_mail, massive email, sendmail, ssl, tls, wp-phpmailer, mail smtp, mailchimp, newsletters, email plugin, signup form, email widget, widget, plugin, sidebar, shortcode
4
  Requires at least: 4.4
5
  Tested up to: 5.8
6
  Requires PHP: 5.6
@@ -116,6 +116,19 @@ In order to create a signup form, you need to:
116
 
117
  == Changelog ==
118
 
 
 
 
 
 
 
 
 
 
 
 
 
 
119
  = 3.1.16 =
120
  * Enhanced the plugins to be compatible upto PHP version 8
121
  * Enhanced the plugin to be compatible upto Wordpress version 5.8
@@ -263,340 +276,4 @@ In order to create a signup form, you need to:
263
  * [More details] New version has only 3 tabs: Home, Forms, Statistics
264
  * [More details] Tabs with iframe (lists, campaigns) were removed
265
 
266
- = 2.9.18 =
267
- * Bug and Security fix
268
-
269
- = 2.9.17 =
270
- * Plugin page css conflict design issue fixed
271
- * Multiple V2 Google recaptcha for same page issue fixed
272
- * updated regex for test email
273
-
274
- = 2.9.16 =
275
- * Fixed date invalid format issue of form
276
- * fixed terms and condition not working with invisible captcha bug
277
-
278
- = 2.9.15 =
279
- * Sib_security token issue has been fixed
280
-
281
- = 2.9.14 =
282
- * Form submission -1 issue and mailin class conflict issue has been fixed
283
-
284
- = 2.9.13 =
285
- * Added feature that allows to map WP boolean attributes to Sendinblue contacts
286
-
287
- = 2.9.12 =
288
- * Updated company description
289
-
290
- = 2.9.11 =
291
- * Add Validation on required fields when invisible captcha is enabled on Forms
292
- * New Sender not Updated issue fixed
293
-
294
- = 2.9.10 =
295
- * new branding changes
296
-
297
- = 2.9.9 =
298
- * campaign and list page url issue fixed
299
-
300
- = 2.9.8 =
301
- * notation and variable issue fixed
302
-
303
- = 2.9.7 =
304
- * redirection issue fixed
305
-
306
- = 2.9.6 =
307
- * Fr translations fixes
308
- * Small improvements related to Query Monitor, Form Redirection etc.
309
-
310
-
311
- = 2.9.5 =
312
- * Fix fr translation issue.
313
-
314
- = 2.9.4 =
315
- * Fix the doubleoptin issue for NTL
316
- * update Sendinblue registration link
317
- * Update translation
318
-
319
- = 2.9.3 =
320
- * Fix the issue that request ajax call on every page
321
- * Fix sms field issue
322
- * add required field alert message
323
-
324
- = 2.9.2 =
325
- * Add compliance note block to forms
326
- * Add multi list subscription option
327
- * fix Sendinblue account info display issue.
328
-
329
- = 2.9.1 =
330
- * fix "reply-to" email address issue
331
- * fix the issue that doesn't sync "user role" attribute
332
-
333
- = 2.9.0 =
334
- * add country code prefix to sms field.
335
- * send final confirmation email in Double Opt_in form
336
- * change email validation rule
337
-
338
- = 2.8.3 =
339
- * fix compatible issue with old forms
340
-
341
- = 2.8.2 =
342
- * fix missing alt text for loading gif image
343
- * update user attributes when user already exists in contact list
344
- * Allow to use google recaptcha v2 and invisible recaptcha
345
- * Change MA automation script
346
-
347
- = 2.8.1 =
348
- * fix double opt_in issue
349
- * fix language support notice issue
350
-
351
- = 2.8.0 =
352
- * add compatibility with wpml plugin
353
- * add invisible google captcha feature
354
- * fix several security issues
355
- * fix date format issue
356
-
357
- = 2.7.3 =
358
- * add independence between Sendinblue plugins
359
-
360
- = 2.7.2 =
361
- * add some note on plugin forms page
362
- * fix responsive issue on plugin home page
363
- * change the tutorial link
364
-
365
- = 2.7.1 =
366
- * fix version upgrade issue
367
-
368
- = 2.7.0 =
369
- * Integrate a term acceptance checkbox
370
- * Change redirection for campaigns on plugin home page
371
- * fix re-subscription issue for unsubscribed users
372
-
373
- = 2.6.13 =
374
- * Fix sendinblue dev url to prod url in list page
375
- * Change google captcha function
376
-
377
- = 2.6.12 =
378
- * Sync users for all user roles such as forum role
379
- * fix some typo in plugin homepage
380
-
381
- = 2.6.11 =
382
- * fix forms disappeared issue in v2.6.10
383
-
384
- = 2.6.10 =
385
- * fix google captcha issue in form preview
386
- * add prefix to the custom tables
387
-
388
- = 2.6.9 =
389
- * fix conflict with other plugin's google Captcha
390
-
391
- = 2.6.8 =
392
- * add google Captcha box on the form
393
- * fix MA automation issue
394
- = 2.6.7 =
395
- * Fix some browser compatibility issue for safari
396
-
397
- = 2.6.6 =
398
- * Fix browser compatibility issue for safari
399
-
400
- = 2.6.5 =
401
- * Add new feature to sync old your users to the desired list
402
- * Fix email validation issue
403
- * Fix warning issue of active_ma
404
- * Use wordpress function for CURL request
405
- * Add apply_filter() to the wp_mail() function
406
-
407
- = 2.6.4 =
408
- * Fix pre tag issue
409
- * Fix unsubscribe link in email template
410
-
411
- = 2.6.3 =
412
- * Fix warning issue by WP_Error
413
- * Fix p tag issue in javascript
414
-
415
- = 2.6.2 =
416
- * Fix set_magic_quotes_runtime() error
417
- * Fix subscribe form issue
418
-
419
- = 2.6.1 =
420
- * Fix some language issues
421
- * Fix attachement in confirmation email
422
- * Apply nl2br on text/plain only
423
-
424
- = 2.6.0 =
425
- * Integrate Marketing Automation
426
- * Update to use multi forms
427
-
428
- = 2.5.5 =
429
- * Fix send email issue
430
-
431
- = 2.5.4 =
432
- * Fix warning issue by get sender detail
433
-
434
- = 2.5.3 =
435
- * Fix some warning issue to send email
436
-
437
- = 2.5.2 =
438
- * Fix send email issue on php 7.0
439
-
440
- = 2.5.1 =
441
- * Fix sender list issue
442
- * Fix attachment issue in transactional email
443
- * Update form ajax process
444
-
445
- = 2.5.0 =
446
- * Improvement the sender list
447
-
448
- = 2.4.15 =
449
- * Fix transactional email issue
450
-
451
- = 2.4.14 =
452
- * Fix SMTP issue using wp_mail
453
- * Fix some warning issue
454
-
455
- = 2.4.13 =
456
- * Fix some warning issue
457
-
458
- = 2.4.12 =
459
- * Fix issue for double optin redirection
460
-
461
- = 2.4.11 =
462
- * Fix some errors related to SSL certificate
463
-
464
- = 2.4.10 =
465
- * Fix page reload problem on submitting form data
466
-
467
- = 2.4.9 =
468
- * Improve transaction template with tags
469
- * Improve subscriber's ip attribute
470
- * Fix some warning issue
471
-
472
- = 2.4.8 =
473
- * Update email credits.
474
- * Fix language issue in iframe
475
-
476
- = 2.4.7 =
477
- * Fix exception functionality of curl.
478
-
479
- = 2.4.6 =
480
- * Fix some issue of curl request.
481
- * Improve subscriber's attributes for double optin.
482
-
483
- = 2.4.5 =
484
- * Fix some warning issue and translation
485
-
486
- = 2.4.4 =
487
- * Update sendinblue API library into V2.0
488
-
489
- = 2.4.3 =
490
- * Fix some warning issue
491
-
492
- = 2.4.2 =
493
- * Fix sender issue
494
-
495
- = 2.4.1 =
496
- * Fix ajax warning bug
497
-
498
- = 2.4.0 =
499
- * Security update to prevent XSS attack.
500
- * Improve transaction template with personalize data.
501
- * Improve widget.
502
-
503
- = 2.3.13 =
504
- * No changes in "Settings" after update.
505
-
506
- = 2.3.12 =
507
- * Improve validation process.
508
-
509
- = 2.3.11 =
510
- * Update validation process.
511
- * Improve error message.
512
-
513
- = 2.3.10 =
514
- * Add the functionality to integrate the category attributes of sendinblue.
515
- * Improve loading of setting page.
516
-
517
- = 2.3.9 =
518
- * Change iframe url.
519
-
520
- = 2.3.7 =
521
- * Update the process for help message.
522
-
523
- = 2.3.6 =
524
- * Update the process for blacklisted contact.
525
-
526
- = 2.3.5 =
527
- * Improve the function that send template for confirm & double optin.
528
- * Update the process for blacklisted contact.
529
- * Fix the issue of wrong subject in selected template.
530
-
531
- = 2.3.4 =
532
- * Fix the issue that user can't send selected template for confirm & double optin.
533
- * Fix the error if user don't have any sender on his setting.
534
-
535
- = 2.3.3 =
536
- * Improvement help message.
537
-
538
- = 2.3.2 =
539
- * Check with wordpress version 4.1.
540
- * Add function to select mail template for double optin.
541
- * Improvement help message.
542
- * Fix padding issue of subscribe form.
543
- * Update the state of smtp activation automatically.
544
-
545
- = 2.3.1 =
546
- * Update sender setting.
547
-
548
- = 2.3.0 =
549
- * Updated sendinblue api into v2.0.
550
- Please use the Access Key of API 2.0 in setting of plugin after update plugin.
551
-
552
- = 2.2.5 =
553
- * Add exception functionality.
554
-
555
- = 2.2.4 =
556
- * Fix some warning issues.
557
-
558
- = 2.2.3 =
559
- * Fix sender's details when send email by using wp_mail().
560
-
561
- = 2.2.2 =
562
- * Fixed some issue of curl request.
563
-
564
- = 2.2.1 =
565
- * Update the french encoding.
566
- * Fixed multi-language issue
567
-
568
- = 2.2.0 =
569
- * Update the feautre of smtp activation
570
-
571
- = 2.1.2 =
572
- * Update button UI CSS of subscription form
573
-
574
- = 2.1.1 =
575
- * Fix login issue
576
- * Test on Wordpress 4.0
577
-
578
- = 2.1.0 =
579
- * Update the default form UI
580
- * Update french translation
581
- * Add functionality to remove "white space" when input api info for login.
582
-
583
- = 2.0.4 =
584
- * Add security functionality
585
-
586
- = 2.0.3 =
587
- * Fix the encode error of French language
588
- * Add the translation of some text
589
- * Fix the Button size at French
590
-
591
- = 2.0.2 =
592
- * Fix the error of account detail
593
-
594
- = 2.0.1 =
595
- * Fix compatible error
596
-
597
- = 2.0 =
598
- * update sendinblue api
599
- * Add functionality (List,Contact,Stat,Form Management)
600
- * Update UI user-friendly
601
-
602
 
1
  === Newsletter, SMTP, Email marketing and Subscribe forms by Sendinblue ===
2
  Contributors: neeraj_slit
3
+ Tags: Email Marketing, Newsletter, Sendinblue, Forms, smtp, marketing automation, email campaign, WordPress smtp, subscription form, email, marketing, signup form
4
  Requires at least: 4.4
5
  Tested up to: 5.8
6
  Requires PHP: 5.6
116
 
117
  == Changelog ==
118
 
119
+ = 3.1.20 =
120
+ * Fixing issue with plugin deactivation on update.
121
+
122
+ = 3.1.19 =
123
+ * Fixing issue with plugin deactivation on update.
124
+
125
+ = 3.1.18 =
126
+ * Modified permissions of mailin.php.
127
+
128
+ = 3.1.17 =
129
+ * Fixed some reported bugs related to internationalization (i18n)
130
+ * Fixed an issue with DOI email and confirmation email sent at the same time.
131
+
132
  = 3.1.16 =
133
  * Enhanced the plugins to be compatible upto PHP version 8
134
  * Enhanced the plugin to be compatible upto Wordpress version 5.8
276
  * [More details] New version has only 3 tabs: Home, Forms, Statistics
277
  * [More details] Tabs with iframe (lists, campaigns) were removed
278
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
279
 
sendinblue.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Newsletter, SMTP, Email marketing and Subscribe forms by Sendinblue
4
  * Plugin URI: https://www.sendinblue.com/?r=wporg
5
  * Description: Manage your contact lists, subscription forms and all email and marketing-related topics from your wp panel, within one single plugin
6
- * Version: 3.1.16
7
  * Author: Sendinblue
8
  * Author URI: https://www.sendinblue.com/?r=wporg
9
  * License: GPLv2 or later
@@ -58,7 +58,8 @@ if ( ! class_exists( 'SIB_Manager' ) ) {
58
  require_once( 'model/model-forms.php' );
59
  require_once( 'model/model-users.php' );
60
  require_once( 'model/model-lang.php' );
61
-
 
62
  /**
63
  * Class SIB_Manager
64
  */
@@ -145,7 +146,7 @@ if ( ! class_exists( 'SIB_Manager' ) ) {
145
  self::$access_key = isset( $general_settings['access_key'] ) ? $general_settings['access_key'] : '';
146
 
147
  self::$instance = $this;
148
-
149
  add_action( 'admin_init', array( &$this, 'admin_init' ), 9999 );
150
  add_action( 'admin_menu', array( &$this, 'admin_menu' ), 9999 );
151
 
@@ -194,6 +195,7 @@ if ( ! class_exists( 'SIB_Manager' ) ) {
194
  SIB_Model_Users::createTable();
195
  // add columns for old versions
196
  SIB_Forms::alterTable();
 
197
  }
198
 
199
  $use_api_version = get_option( 'sib_use_apiv2', '0' );
@@ -284,7 +286,17 @@ if ( ! class_exists( 'SIB_Manager' ) ) {
284
  }
285
  // Subscribe.
286
  if ( isset( $_GET['sib_action'] ) && ( 'subscribe' == sanitize_text_field($_GET['sib_action']) ) ) {
287
- SIB_API_Manager::subscribe();
 
 
 
 
 
 
 
 
 
 
288
  exit;
289
  }
290
  // Dismiss language notice.
@@ -771,6 +783,7 @@ if ( ! class_exists( 'SIB_Manager' ) ) {
771
  */
772
  function create_activate_code( $email, $info, $formID, $listIDs, $redirectUrl, $unlinkedLists = null ) {
773
  $data = SIB_Model_Users::get_data_by_email( $email, $formID );
 
774
  if ( $unlinkedLists != null )
775
  {
776
  $info['unlinkedLists'] = $unlinkedLists;
@@ -784,6 +797,7 @@ if ( ! class_exists( 'SIB_Manager' ) ) {
784
  'frmid' => $formID,
785
  'listIDs' => maybe_serialize( $listIDs ),
786
  'redirectUrl' => $redirectUrl,
 
787
  );
788
  SIB_Model_Users::add_record( $data );
789
  } else {
@@ -1324,6 +1338,11 @@ if ( ! class_exists( 'SIB_Manager' ) ) {
1324
 
1325
  return null;
1326
  }
 
 
 
 
 
1327
  }
1328
 
1329
  add_action( 'sendinblue_init', 'sendinblue_init' );
3
  * Plugin Name: Newsletter, SMTP, Email marketing and Subscribe forms by Sendinblue
4
  * Plugin URI: https://www.sendinblue.com/?r=wporg
5
  * Description: Manage your contact lists, subscription forms and all email and marketing-related topics from your wp panel, within one single plugin
6
+ * Version: 3.1.20
7
  * Author: Sendinblue
8
  * Author URI: https://www.sendinblue.com/?r=wporg
9
  * License: GPLv2 or later
58
  require_once( 'model/model-forms.php' );
59
  require_once( 'model/model-users.php' );
60
  require_once( 'model/model-lang.php' );
61
+ require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
62
+ require_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
63
  /**
64
  * Class SIB_Manager
65
  */
146
  self::$access_key = isset( $general_settings['access_key'] ) ? $general_settings['access_key'] : '';
147
 
148
  self::$instance = $this;
149
+ add_action( 'upgrader_process_complete', array( &$this, 'my_upgrade_function' ), 10, 2);
150
  add_action( 'admin_init', array( &$this, 'admin_init' ), 9999 );
151
  add_action( 'admin_menu', array( &$this, 'admin_menu' ), 9999 );
152
 
195
  SIB_Model_Users::createTable();
196
  // add columns for old versions
197
  SIB_Forms::alterTable();
198
+ SIB_Model_Users::add_user_added_date_column();
199
  }
200
 
201
  $use_api_version = get_option( 'sib_use_apiv2', '0' );
286
  }
287
  // Subscribe.
288
  if ( isset( $_GET['sib_action'] ) && ( 'subscribe' == sanitize_text_field($_GET['sib_action']) ) ) {
289
+ $code = isset( $_GET['code'] ) ? sanitize_text_field( $_GET['code'] ) : '';
290
+ $contact_info = SIB_Model_Users::get_data_by_code( $code );
291
+ $user_added_date = $contact_info['user_added_date'];
292
+ $current_date = gmdate( 'Y-m-d H:i:s' );
293
+ $date_diff = strtotime( $current_date ) - strtotime( $user_added_date );
294
+ if ( $date_diff > 5 ) {
295
+ SIB_API_Manager::subscribe( $contact_info );
296
+ } else {
297
+ $type = 'Bot Event';
298
+ SIB_API_Manager::template_subscribe( $type );
299
+ }
300
  exit;
301
  }
302
  // Dismiss language notice.
783
  */
784
  function create_activate_code( $email, $info, $formID, $listIDs, $redirectUrl, $unlinkedLists = null ) {
785
  $data = SIB_Model_Users::get_data_by_email( $email, $formID );
786
+ $date = gmdate( 'Y-m-d H:i:s' );
787
  if ( $unlinkedLists != null )
788
  {
789
  $info['unlinkedLists'] = $unlinkedLists;
797
  'frmid' => $formID,
798
  'listIDs' => maybe_serialize( $listIDs ),
799
  'redirectUrl' => $redirectUrl,
800
+ 'user_added_date' => $date,
801
  );
802
  SIB_Model_Users::add_record( $data );
803
  } else {
1338
 
1339
  return null;
1340
  }
1341
+
1342
+ public function my_upgrade_function() {
1343
+ $current_plugin_path_name = plugin_basename( __FILE__ );
1344
+ activate_plugin( $current_plugin_path_name );
1345
+ }
1346
  }
1347
 
1348
  add_action( 'sendinblue_init', 'sendinblue_init' );