Newsletter - Version 6.6.5

Version Description

  • Fixed email reference lost on double step cancellation
  • Update to support Instasend
Download this release

Release Info

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

Code changes from version 6.6.4 to 6.6.5

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: 6.6.4
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.
@@ -35,7 +35,7 @@ if (version_compare(phpversion(), '5.6', '<')) {
35
  return;
36
  }
37
 
38
- define('NEWSLETTER_VERSION', '6.6.4');
39
 
40
  global $newsletter, $wpdb;
41
 
@@ -421,6 +421,8 @@ class Newsletter extends NewsletterModule {
421
  }
422
  $this->save_options($this->options);
423
  }
 
 
424
 
425
  return true;
426
  }
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: 6.6.5
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.
35
  return;
36
  }
37
 
38
+ define('NEWSLETTER_VERSION', '6.6.5');
39
 
40
  global $newsletter, $wpdb;
41
 
421
  }
422
  $this->save_options($this->options);
423
  }
424
+
425
+ delete_transient("tnp_extensions_json");
426
 
427
  return true;
428
  }
profile/profile.php CHANGED
@@ -32,11 +32,12 @@ class NewsletterProfile extends NewsletterModule {
32
  case 'p':
33
  case 'pe':
34
  $user = $this->check_user();
 
35
  if ($user == null) {
36
  die('No subscriber found.');
37
  }
38
- $profile_url = $this->build_message_url($this->options['url'], 'profile', $user);
39
- $profile_url = apply_filters('newsletter_profile_url', $profile_url, $user);
40
 
41
  wp_redirect($profile_url);
42
  die();
@@ -46,8 +47,9 @@ class NewsletterProfile extends NewsletterModule {
46
  case 'profile-save':
47
  case 'ps':
48
  $user = $this->save_profile();
 
49
  // $user->alert is a temporary field
50
- wp_redirect($this->build_message_url($this->options['url'], 'profile', $user, null, $user->alert));
51
  die();
52
  break;
53
 
@@ -71,8 +73,8 @@ class NewsletterProfile extends NewsletterModule {
71
  *
72
  * @param stdClass $user
73
  */
74
- function get_profile_url($user) {
75
- return $this->build_action_url('profile', $user);
76
  }
77
 
78
  function hook_newsletter_replace($text, $user, $email) {
@@ -81,7 +83,7 @@ class NewsletterProfile extends NewsletterModule {
81
  }
82
 
83
  // Profile edit page URL and link
84
- $url = $this->get_profile_url($user);
85
  $text = $this->replace_url($text, 'PROFILE_URL', $url);
86
  // Profile export URL and link
87
  $url = $this->get_profile_export_url($user);
32
  case 'p':
33
  case 'pe':
34
  $user = $this->check_user();
35
+ $email = $this->get_email_from_request();
36
  if ($user == null) {
37
  die('No subscriber found.');
38
  }
39
+ $profile_url = $this->build_message_url($this->options['url'], 'profile', $user, $email);
40
+ $profile_url = apply_filters('newsletter_profile_url', $profile_url, $user, $email);
41
 
42
  wp_redirect($profile_url);
43
  die();
47
  case 'profile-save':
48
  case 'ps':
49
  $user = $this->save_profile();
50
+ $email = $this->get_email_from_request();
51
  // $user->alert is a temporary field
52
+ wp_redirect($this->build_message_url($this->options['url'], 'profile', $user, $email, $user->alert));
53
  die();
54
  break;
55
 
73
  *
74
  * @param stdClass $user
75
  */
76
+ function get_profile_url($user, $email = null) {
77
+ return $this->build_action_url('profile', $user, $email);
78
  }
79
 
80
  function hook_newsletter_replace($text, $user, $email) {
83
  }
84
 
85
  // Profile edit page URL and link
86
+ $url = $this->get_profile_url($user, $email);
87
  $text = $this->replace_url($text, 'PROFILE_URL', $url);
88
  // Profile export URL and link
89
  $url = $this->get_profile_export_url($user);
readme.txt CHANGED
@@ -2,7 +2,7 @@
2
  Tags: email, email marketing, newsletter, newsletter subscribers, welcome email, signup forms, contact, lead generation, popup, marketing automation
3
  Requires at least: 3.4.0
4
  Tested up to: 5.4.1
5
- Stable tag: 6.6.4
6
  Requires PHP: 5.6
7
  Contributors: satollo,webagile,michael-travan
8
 
@@ -109,6 +109,11 @@ Thank you, The Newsletter Team
109
 
110
  == Changelog ==
111
 
 
 
 
 
 
112
  = 6.6.4 =
113
 
114
  * Added filter on profile fields on targeting
2
  Tags: email, email marketing, newsletter, newsletter subscribers, welcome email, signup forms, contact, lead generation, popup, marketing automation
3
  Requires at least: 3.4.0
4
  Tested up to: 5.4.1
5
+ Stable tag: 6.6.5
6
  Requires PHP: 5.6
7
  Contributors: satollo,webagile,michael-travan
8
 
109
 
110
  == Changelog ==
111
 
112
+ = 6.6.5 =
113
+
114
+ * Fixed email reference lost on double step cancellation
115
+ * Update to support Instasend
116
+
117
  = 6.6.4 =
118
 
119
  * Added filter on profile fields on targeting
subscription/page.php CHANGED
@@ -21,12 +21,15 @@ if ($message_key == 'confirmation') {
21
  } else {
22
  $user = $module->get_user_from_request(true);
23
  }
 
 
 
24
  $message = apply_filters('newsletter_page_text', '', $message_key, $user);
25
  $options = $module->get_options('', $module->get_user_language($user));
26
  if (!$message) {
27
  $message = $options[$message_key . '_text'];
28
  }
29
- $message = $module->replace($message, $user);
30
 
31
  if (isset($options[$message_key . '_tracking'])) {
32
  $message .= $options[$message_key . '_tracking'];
21
  } else {
22
  $user = $module->get_user_from_request(true);
23
  }
24
+
25
+ $email = $module->get_email_from_request();
26
+
27
  $message = apply_filters('newsletter_page_text', '', $message_key, $user);
28
  $options = $module->get_options('', $module->get_user_language($user));
29
  if (!$message) {
30
  $message = $options[$message_key . '_text'];
31
  }
32
+ $message = $module->replace($message, $user, $email);
33
 
34
  if (isset($options[$message_key . '_tracking'])) {
35
  $message .= $options[$message_key . '_tracking'];
subscription/subscription.php CHANGED
@@ -1786,7 +1786,7 @@ class NewsletterSubscription extends NewsletterModule {
1786
  }
1787
  }
1788
 
1789
- $email = NewsletterSubscription::instance()->get_email_from_request();
1790
 
1791
  $message = $this->replace($message, $user, $email, 'page');
1792
 
1786
  }
1787
  }
1788
 
1789
+ $email = $this->get_email_from_request();
1790
 
1791
  $message = $this->replace($message, $user, $email, 'page');
1792
 
unsubscription/unsubscription.php CHANGED
@@ -36,7 +36,7 @@ class NewsletterUnsubscription extends NewsletterModule {
36
  if ($user == null) {
37
  $url = $this->build_message_url(null, 'unsubscription_error', $user);
38
  } else {
39
- $url = $this->build_message_url(null, 'unsubscribe', $user);
40
  }
41
  wp_redirect($url);
42
  die();
@@ -45,10 +45,11 @@ class NewsletterUnsubscription extends NewsletterModule {
45
  case 'uc':
46
  if ($this->antibot_form_check()) {
47
  $user = $this->unsubscribe();
 
48
  if ($user->status == 'E') {
49
  $url = $this->build_message_url(null, 'unsubscription_error', $user);
50
  } else {
51
- $url = $this->build_message_url(null, 'unsubscribed', $user);
52
  }
53
  wp_redirect($url);
54
  } else {
36
  if ($user == null) {
37
  $url = $this->build_message_url(null, 'unsubscription_error', $user);
38
  } else {
39
+ $url = $this->build_message_url(null, 'unsubscribe', $user, $email);
40
  }
41
  wp_redirect($url);
42
  die();
45
  case 'uc':
46
  if ($this->antibot_form_check()) {
47
  $user = $this->unsubscribe();
48
+ $email = $this->get_email_from_request();
49
  if ($user->status == 'E') {
50
  $url = $this->build_message_url(null, 'unsubscription_error', $user);
51
  } else {
52
+ $url = $this->build_message_url(null, 'unsubscribed', $user, $email);
53
  }
54
  wp_redirect($url);
55
  } else {