Newsletter - Version 7.5.2

Version Description

  • Fixed the global newsletter styles not applied when it is regenerated
  • Fixed "title" tag not showing the value for "not specified" gender
Download this release

Release Info

Developer satollo
Plugin Icon 128x128 Newsletter
Version 7.5.2
Comparing to
See all releases

Code changes from version 7.5.1 to 7.5.2

emails/emails.php CHANGED
@@ -345,6 +345,13 @@ class NewsletterEmails extends NewsletterModule {
345
  function regenerate($email, $context = []) {
346
 
347
  $context = array_merge(['last_run' => 0, 'type' => ''], $context);
 
 
 
 
 
 
 
348
 
349
  preg_match_all('/data-json="(.*?)"/m', $email->message, $matches, PREG_PATTERN_ORDER);
350
 
@@ -362,7 +369,7 @@ class NewsletterEmails extends NewsletterModule {
362
  }
363
 
364
  ob_start();
365
- $out = $this->render_block($options['block_id'], true, $options, $context);
366
  if (is_array($out)) {
367
  if ($out['return_empty_message'] || $out['stop']) {
368
  return false;
345
  function regenerate($email, $context = []) {
346
 
347
  $context = array_merge(['last_run' => 0, 'type' => ''], $context);
348
+
349
+ $composer = [];
350
+ foreach ($email->options as $k=>$v) {
351
+ if (strpos($k, 'composer_') !== 0) continue;
352
+ $composer[substr($k, 9)] = $v;
353
+ }
354
+
355
 
356
  preg_match_all('/data-json="(.*?)"/m', $email->message, $matches, PREG_PATTERN_ORDER);
357
 
369
  }
370
 
371
  ob_start();
372
+ $out = $this->render_block($options['block_id'], true, $options, $context, $composer);
373
  if (is_array($out)) {
374
  if ($out['return_empty_message'] || $out['stop']) {
375
  return false;
includes/PHPMailerLoader.php CHANGED
@@ -1,45 +1,45 @@
1
- <?php
2
-
3
- namespace TNP\Mailer;
4
-
5
- class PHPMailerLoader {
6
-
7
- /**
8
- *
9
- */
10
- public static function load() {
11
-
12
- global $wp_version;
13
-
14
- if ( class_exists( 'PHPMailer' ) ) {
15
- return;
16
- }
17
-
18
- if ( version_compare( $wp_version, '5.5' ) >= 0 ) {
19
- require_once ABSPATH . WPINC . '/PHPMailer/PHPMailer.php';
20
- require_once ABSPATH . WPINC . '/PHPMailer/SMTP.php';
21
- require_once ABSPATH . WPINC . '/PHPMailer/Exception.php';
22
-
23
- class_alias( \PHPMailer\PHPMailer\PHPMailer::class, 'PHPMailer' );
24
- class_alias( \PHPMailer\PHPMailer\SMTP::class, 'SMTP' );
25
- class_alias( \PHPMailer\PHPMailer\Exception::class, 'phpmailerException' );
26
- } else {
27
- require_once ABSPATH . WPINC . '/class-phpmailer.php';
28
- require_once ABSPATH . WPINC . '/class-smtp.php';
29
- }
30
-
31
- }
32
-
33
- /**
34
- *
35
- * @param boolean $exceptions
36
- * @return \PHPMailer\PHPMailer\PHPMailer
37
- */
38
- public static function make_instance($exceptions = false) {
39
- self::load();
40
-
41
- return new \PHPMailer( $exceptions );
42
- }
43
-
44
-
45
- }
1
+ <?php
2
+
3
+ namespace TNP\Mailer;
4
+
5
+ class PHPMailerLoader {
6
+
7
+ /**
8
+ *
9
+ */
10
+ public static function load() {
11
+
12
+ global $wp_version;
13
+
14
+ if ( class_exists( 'PHPMailer' ) ) {
15
+ return;
16
+ }
17
+
18
+ if ( version_compare( $wp_version, '5.5' ) >= 0 ) {
19
+ require_once ABSPATH . WPINC . '/PHPMailer/PHPMailer.php';
20
+ require_once ABSPATH . WPINC . '/PHPMailer/SMTP.php';
21
+ require_once ABSPATH . WPINC . '/PHPMailer/Exception.php';
22
+
23
+ class_alias( \PHPMailer\PHPMailer\PHPMailer::class, 'PHPMailer' );
24
+ class_alias( \PHPMailer\PHPMailer\SMTP::class, 'SMTP' );
25
+ class_alias( \PHPMailer\PHPMailer\Exception::class, 'phpmailerException' );
26
+ } else {
27
+ require_once ABSPATH . WPINC . '/class-phpmailer.php';
28
+ require_once ABSPATH . WPINC . '/class-smtp.php';
29
+ }
30
+
31
+ }
32
+
33
+ /**
34
+ *
35
+ * @param boolean $exceptions
36
+ * @return \PHPMailer\PHPMailer\PHPMailer
37
+ */
38
+ public static function make_instance($exceptions = false) {
39
+ self::load();
40
+
41
+ return new \PHPMailer( $exceptions );
42
+ }
43
+
44
+
45
+ }
includes/module.php CHANGED
@@ -2073,10 +2073,11 @@ class NewsletterModule {
2073
  break;
2074
  case 'f': $text = str_replace('{title}', $options_profile['title_female'], $text);
2075
  break;
2076
- case 'n': $text = str_replace('{title}', $options_profile['title_none'], $text);
2077
- break;
2078
  default:
2079
- $text = str_replace('{title}', '', $text);
 
2080
  }
2081
 
2082
 
2073
  break;
2074
  case 'f': $text = str_replace('{title}', $options_profile['title_female'], $text);
2075
  break;
2076
+ //case 'n': $text = str_replace('{title}', $options_profile['title_none'], $text);
2077
+ // break;
2078
  default:
2079
+ $text = str_replace('{title}', $options_profile['title_none'], $text);
2080
+ //$text = str_replace('{title}', '', $text);
2081
  }
2082
 
2083
 
plugin.php CHANGED
@@ -4,7 +4,7 @@
4
  Plugin Name: Newsletter
5
  Plugin URI: https://www.thenewsletterplugin.com/plugins/newsletter
6
  Description: Newsletter is a cool plugin to create your own subscriber list, to send newsletters, to build your business. <strong>Before update give a look to <a href="https://www.thenewsletterplugin.com/category/release">this page</a> to know what's changed.</strong>
7
- Version: 7.5.1
8
  Author: Stefano Lissa & The Newsletter Team
9
  Author URI: https://www.thenewsletterplugin.com
10
  Disclaimer: Use at your own risk. No warranty expressed or implied is provided.
@@ -37,7 +37,7 @@ if (version_compare(phpversion(), '5.6', '<')) {
37
  return;
38
  }
39
 
40
- define('NEWSLETTER_VERSION', '7.5.1');
41
 
42
  global $newsletter, $wpdb;
43
 
4
  Plugin Name: Newsletter
5
  Plugin URI: https://www.thenewsletterplugin.com/plugins/newsletter
6
  Description: Newsletter is a cool plugin to create your own subscriber list, to send newsletters, to build your business. <strong>Before update give a look to <a href="https://www.thenewsletterplugin.com/category/release">this page</a> to know what's changed.</strong>
7
+ Version: 7.5.2
8
  Author: Stefano Lissa & The Newsletter Team
9
  Author URI: https://www.thenewsletterplugin.com
10
  Disclaimer: Use at your own risk. No warranty expressed or implied is provided.
37
  return;
38
  }
39
 
40
+ define('NEWSLETTER_VERSION', '7.5.2');
41
 
42
  global $newsletter, $wpdb;
43
 
readme.txt CHANGED
@@ -1,7 +1,7 @@
1
  === Newsletter - Send awesome emails from WordPress ===
2
  Tags: newsletter, email marketing, welcome email, signup forms, lead generation, marketing automation
3
  Tested up to: 6.0.1
4
- Stable tag: 7.5.1
5
  Contributors: satollo,webagile,michael-travan
6
  License: GPLv2 or later
7
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -126,6 +126,11 @@ Thank you, The Newsletter Team
126
 
127
  == Changelog ==
128
 
 
 
 
 
 
129
  = 7.5.1 =
130
 
131
  * Fixed PHPMailer loading for WP 5.4.10
1
  === Newsletter - Send awesome emails from WordPress ===
2
  Tags: newsletter, email marketing, welcome email, signup forms, lead generation, marketing automation
3
  Tested up to: 6.0.1
4
+ Stable tag: 7.5.2
5
  Contributors: satollo,webagile,michael-travan
6
  License: GPLv2 or later
7
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
126
 
127
  == Changelog ==
128
 
129
+ = 7.5.2 =
130
+
131
+ * Fixed the global newsletter styles not applied when it is regenerated
132
+ * Fixed "title" tag not showing the value for "not specified" gender
133
+
134
  = 7.5.1 =
135
 
136
  * Fixed PHPMailer loading for WP 5.4.10