WP Mail SMTP by WPForms - Version 1.6.2

Version Description

  • 2019-09-02 =
  • Fixed: Race condition when loading with certain plugins, that send emails very early. Makes email delivery more reliable.
Download this release

Release Info

Developer slaFFik
Plugin Icon 128x128 WP Mail SMTP by WPForms
Version 1.6.2
Comparing to
See all releases

Code changes from version 1.6.0 to 1.6.2

assets/languages/wp-mail-smtp.pot CHANGED
@@ -1,13 +1,13 @@
1
  msgid ""
2
  msgstr ""
3
- "Project-Id-Version: WP Mail SMTP 1.6.0\n"
4
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wp-mail-smtp\n"
5
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
6
  "Language-Team: LANGUAGE <LL@li.org>\n"
7
  "MIME-Version: 1.0\n"
8
  "Content-Type: text/plain; charset=UTF-8\n"
9
  "Content-Transfer-Encoding: 8bit\n"
10
- "POT-Creation-Date: 2019-08-21T11:54:11+03:00\n"
11
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12
  "X-Generator: WP-CLI 2.2.0\n"
13
  "X-Domain: wp-mail-smtp\n"
@@ -1138,25 +1138,25 @@ msgid "<strong>Note:</strong> WP Mail SMTP plugin is disabled on your site until
1138
  msgstr ""
1139
 
1140
  #. translators: %1$s - WP Mail SMTP plugin name; %2$s - WPForms.com URL to a related doc.
1141
- #: src/Core.php:366
1142
  msgid "Your site is running an outdated version of PHP that is no longer supported and may cause issues with %1$s. <a href=\"%2$s\" target=\"_blank\" rel=\"noopener noreferrer\">Read more</a> for additional information."
1143
  msgstr ""
1144
 
1145
- #: src/Core.php:380
1146
  msgid "<strong>Please Note:</strong> Support for PHP 5.3-5.5 will be discontinued in 2019. After this, if no further action is taken, WP Mail SMTP functionality will be disabled."
1147
  msgstr ""
1148
 
1149
  #. translators: %1$s - plugin name and its version, %2$s - plugin Misc settings page.
1150
- #: src/Core.php:420
1151
  msgid "<strong>EMAILING DISABLED:</strong> The %1$s is currently blocking all emails from being sent. To send emails, go to plugin <a href=\"%2$s\">Misc settings</a> and disable the \"Do Not Send\" option."
1152
  msgstr ""
1153
 
1154
  #. translators: %s - plugin name and its version.
1155
- #: src/Core.php:451
1156
  msgid "<strong>EMAIL DELIVERY ERROR:</strong> the plugin %s logged this error during the last time it tried to send an email:"
1157
  msgstr ""
1158
 
1159
- #: src/Core.php:481
1160
  msgid "Consider running an email test after fixing it."
1161
  msgstr ""
1162
 
1
  msgid ""
2
  msgstr ""
3
+ "Project-Id-Version: WP Mail SMTP 1.6.2\n"
4
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wp-mail-smtp\n"
5
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
6
  "Language-Team: LANGUAGE <LL@li.org>\n"
7
  "MIME-Version: 1.0\n"
8
  "Content-Type: text/plain; charset=UTF-8\n"
9
  "Content-Transfer-Encoding: 8bit\n"
10
+ "POT-Creation-Date: 2019-09-02T17:20:06+03:00\n"
11
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12
  "X-Generator: WP-CLI 2.2.0\n"
13
  "X-Domain: wp-mail-smtp\n"
1138
  msgstr ""
1139
 
1140
  #. translators: %1$s - WP Mail SMTP plugin name; %2$s - WPForms.com URL to a related doc.
1141
+ #: src/Core.php:380
1142
  msgid "Your site is running an outdated version of PHP that is no longer supported and may cause issues with %1$s. <a href=\"%2$s\" target=\"_blank\" rel=\"noopener noreferrer\">Read more</a> for additional information."
1143
  msgstr ""
1144
 
1145
+ #: src/Core.php:394
1146
  msgid "<strong>Please Note:</strong> Support for PHP 5.3-5.5 will be discontinued in 2019. After this, if no further action is taken, WP Mail SMTP functionality will be disabled."
1147
  msgstr ""
1148
 
1149
  #. translators: %1$s - plugin name and its version, %2$s - plugin Misc settings page.
1150
+ #: src/Core.php:434
1151
  msgid "<strong>EMAILING DISABLED:</strong> The %1$s is currently blocking all emails from being sent. To send emails, go to plugin <a href=\"%2$s\">Misc settings</a> and disable the \"Do Not Send\" option."
1152
  msgstr ""
1153
 
1154
  #. translators: %s - plugin name and its version.
1155
+ #: src/Core.php:465
1156
  msgid "<strong>EMAIL DELIVERY ERROR:</strong> the plugin %s logged this error during the last time it tried to send an email:"
1157
  msgstr ""
1158
 
1159
+ #: src/Core.php:495
1160
  msgid "Consider running an email test after fixing it."
1161
  msgstr ""
1162
 
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: wpforms, jaredatch, smub, slaFFik
3
  Tags: smtp, wp mail smtp, wordpress smtp, gmail smtp, sendgrid smtp, mailgun smtp, mail, mailer, phpmailer, wp_mail, email, mailgun, sengrid, gmail, wp smtp
4
  Requires at least: 4.9
5
  Tested up to: 5.2
6
- Stable tag: 1.6.0
7
  Requires PHP: 5.3
8
 
9
  The most popular WordPress SMTP and PHP Mailer plugin. Trusted by over 1 million sites.
@@ -208,6 +208,9 @@ By all means please contact us to discuss features or options you'd like to see
208
 
209
  == Changelog ==
210
 
 
 
 
211
  = 1.6.0 - 2019-08-21 =
212
  * Added: New transactional mailer: Sendinblue.
213
  * Added: Educate users to use transactional mailers for better deliverability.
3
  Tags: smtp, wp mail smtp, wordpress smtp, gmail smtp, sendgrid smtp, mailgun smtp, mail, mailer, phpmailer, wp_mail, email, mailgun, sengrid, gmail, wp smtp
4
  Requires at least: 4.9
5
  Tested up to: 5.2
6
+ Stable tag: 1.6.2
7
  Requires PHP: 5.3
8
 
9
  The most popular WordPress SMTP and PHP Mailer plugin. Trusted by over 1 million sites.
208
 
209
  == Changelog ==
210
 
211
+ = 1.6.2 - 2019-09-02 =
212
+ * Fixed: Race condition when loading with certain plugins, that send emails very early. Makes email delivery more reliable.
213
+
214
  = 1.6.0 - 2019-08-21 =
215
  * Added: New transactional mailer: Sendinblue.
216
  * Added: Educate users to use transactional mailers for better deliverability.
src/Core.php CHANGED
@@ -163,13 +163,14 @@ class Core {
163
  add_action( 'admin_init', array( $this, 'init_notifications' ) );
164
 
165
  add_action( 'init', array( $this, 'init' ) );
 
 
166
  }
167
 
168
  /**
169
  * Initial plugin actions.
170
  *
171
  * @since 1.0.0
172
- * @since 1.5.0 Added Pro version initialization.
173
  */
174
  public function init() {
175
 
@@ -198,13 +199,6 @@ class Core {
198
  add_action( 'admin_notices', array( '\WPMailSMTP\WP', 'display_admin_notices' ) );
199
  add_action( 'admin_notices', array( $this, 'display_general_notices' ) );
200
  }
201
-
202
- /*
203
- * Should be the last thing here to be able to overwrite anything from the above.
204
- */
205
- if ( $this->is_pro_allowed() ) {
206
- $this->pro = new \WPMailSMTP\Pro\Pro();
207
- }
208
  }
209
 
210
  /**
@@ -230,6 +224,26 @@ class Core {
230
  return apply_filters( 'wp_mail_smtp_core_is_pro_allowed', $is_allowed );
231
  }
232
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
233
  /**
234
  * This method allows to overwrite certain core WP functions, because it's fired:
235
  * - after `muplugins_loaded` hook,
163
  add_action( 'admin_init', array( $this, 'init_notifications' ) );
164
 
165
  add_action( 'init', array( $this, 'init' ) );
166
+
167
+ add_action( 'plugins_loaded', array( $this, 'get_pro' ) );
168
  }
169
 
170
  /**
171
  * Initial plugin actions.
172
  *
173
  * @since 1.0.0
 
174
  */
175
  public function init() {
176
 
199
  add_action( 'admin_notices', array( '\WPMailSMTP\WP', 'display_admin_notices' ) );
200
  add_action( 'admin_notices', array( $this, 'display_general_notices' ) );
201
  }
 
 
 
 
 
 
 
202
  }
203
 
204
  /**
224
  return apply_filters( 'wp_mail_smtp_core_is_pro_allowed', $is_allowed );
225
  }
226
 
227
+ /**
228
+ * Get/Load the Pro code of the plugin if it exists.
229
+ *
230
+ * @since 1.6.2
231
+ *
232
+ * @return \WPMailSMTP\Pro\Pro
233
+ */
234
+ public function get_pro() {
235
+
236
+ if ( ! $this->is_pro_allowed() ) {
237
+ return $this->pro;
238
+ }
239
+
240
+ if ( ! $this->is_pro() ) {
241
+ $this->pro = new \WPMailSMTP\Pro\Pro();
242
+ }
243
+
244
+ return $this->pro;
245
+ }
246
+
247
  /**
248
  * This method allows to overwrite certain core WP functions, because it's fired:
249
  * - after `muplugins_loaded` hook,
src/Providers/Loader.php CHANGED
@@ -61,7 +61,7 @@ class Loader {
61
  *
62
  * @param string $provider
63
  *
64
- * @return array
65
  */
66
  public function get_provider_path( $provider ) {
67
 
61
  *
62
  * @param string $provider
63
  *
64
+ * @return string|null
65
  */
66
  public function get_provider_path( $provider ) {
67
 
wp_mail_smtp.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
  * Plugin Name: WP Mail SMTP
4
- * Version: 1.6.0
5
  * Plugin URI: https://wpmailsmtp.com/
6
  * Description: Reconfigures the <code>wp_mail()</code> function to use Gmail/Mailgun/SendGrid/SMTP instead of the default <code>mail()</code> and creates an options page to manage the settings.
7
  * Author: WPForms
@@ -140,7 +140,7 @@ if ( ! function_exists( 'wp_mail_smtp_check_pro_loading_allowed' ) ) {
140
  }
141
 
142
  if ( ! defined( 'WPMS_PLUGIN_VER' ) ) {
143
- define( 'WPMS_PLUGIN_VER', '1.6.0' );
144
  }
145
  if ( ! defined( 'WPMS_PHP_VER' ) ) {
146
  define( 'WPMS_PHP_VER', '5.3.6' );
1
  <?php
2
  /**
3
  * Plugin Name: WP Mail SMTP
4
+ * Version: 1.6.2
5
  * Plugin URI: https://wpmailsmtp.com/
6
  * Description: Reconfigures the <code>wp_mail()</code> function to use Gmail/Mailgun/SendGrid/SMTP instead of the default <code>mail()</code> and creates an options page to manage the settings.
7
  * Author: WPForms
140
  }
141
 
142
  if ( ! defined( 'WPMS_PLUGIN_VER' ) ) {
143
+ define( 'WPMS_PLUGIN_VER', '1.6.2' );
144
  }
145
  if ( ! defined( 'WPMS_PHP_VER' ) ) {
146
  define( 'WPMS_PHP_VER', '5.3.6' );