Mailgun for WordPress - Version 1.5.12.2

Version Description

(2018-08-09): = - Fix plugin not saving after update

Download this release

Release Info

Developer Mailgun
Plugin Icon 128x128 Mailgun for WordPress
Version 1.5.12.2
Comparing to
See all releases

Code changes from version 1.5.12.1 to 1.5.12.2

Files changed (4) hide show
  1. CHANGELOG.md +3 -0
  2. includes/wp-mail-api.php +2 -7
  3. mailgun.php +2 -6
  4. readme.txt +6 -3
CHANGELOG.md CHANGED
@@ -1,6 +1,9 @@
1
  Changelog
2
  =========
3
 
 
 
 
4
  1.5.12.1 (2018-08-06)
5
  - Fix for backwards compatibility
6
 
1
  Changelog
2
  =========
3
 
4
+ 1.5.12.2 (2018-08-09)
5
+ - Fix plugin not saving after update
6
+
7
  1.5.12.1 (2018-08-06)
8
  - Fix for backwards compatibility
9
 
includes/wp-mail-api.php CHANGED
@@ -359,13 +359,8 @@ function wp_mail($to, $subject, $message, $headers = '', $attachments = array())
359
  );
360
 
361
  $endpoint = mg_detect_region($getRegion);
362
- if ($getRegion === 'us') {
363
- $url = $endpoint."{$domain}/messages";
364
- }
365
-
366
- if ($getRegion === 'eu') {
367
- $url = $endpoint."{$domain}/messages";
368
- }
369
 
370
  // TODO: Mailgun only supports 1000 recipients per request, since we are
371
  // overriding this function, let's add looping here to handle that
359
  );
360
 
361
  $endpoint = mg_detect_region($getRegion);
362
+ $endpoint = ($endpoint) ? $endpoint : 'https://api.mailgun.net/v3/';
363
+ $url = $endpoint."{$domain}/messages";
 
 
 
 
 
364
 
365
  // TODO: Mailgun only supports 1000 recipients per request, since we are
366
  // overriding this function, let's add looping here to handle that
mailgun.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: Mailgun
5
  * Plugin URI: http://wordpress.org/extend/plugins/mailgun/
6
  * Description: Mailgun integration for WordPress
7
- * Version: 1.5.12.1
8
  * Author: Mailgun
9
  * Author URI: http://www.mailgun.com/
10
  * License: GPLv2 or later
@@ -169,11 +169,7 @@ class Mailgun
169
  $domain = (defined('MAILGUN_DOMAIN') && MAILGUN_DOMAIN) ? MAILGUN_DOMAIN : $options['domain'];
170
 
171
  $region = mg_detect_region($getRegion);
172
- if (!$region) {
173
- mg_api_last_error(__("Region has not been selected", "mailgun"));
174
- } else {
175
- $this->api_endpoint = $region;
176
- }
177
 
178
  $time = time();
179
  $url = $this->api_endpoint.$uri;
4
  * Plugin Name: Mailgun
5
  * Plugin URI: http://wordpress.org/extend/plugins/mailgun/
6
  * Description: Mailgun integration for WordPress
7
+ * Version: 1.5.12.2
8
  * Author: Mailgun
9
  * Author URI: http://www.mailgun.com/
10
  * License: GPLv2 or later
169
  $domain = (defined('MAILGUN_DOMAIN') && MAILGUN_DOMAIN) ? MAILGUN_DOMAIN : $options['domain'];
170
 
171
  $region = mg_detect_region($getRegion);
172
+ $this->api_endpoint = ($region) ? $region : 'https://api.mailgun.net/v3/';
 
 
 
 
173
 
174
  $time = time();
175
  $url = $this->api_endpoint.$uri;
readme.txt CHANGED
@@ -5,7 +5,7 @@ Contributors: Mailgun, sivel, lookahead.io, m35dev
5
  Tags: mailgun, smtp, http, api, mail, email
6
  Requires at least: 3.3
7
  Tested up to: 4.9.7
8
- Stable tag: 1.5.12.1
9
  License: GPLv2 or later
10
 
11
 
@@ -128,10 +128,13 @@ MAILGUN_FROM_ADDRESS Type: string
128
 
129
  == Changelog ==
130
 
131
- = 1.5.12.1 (2018-08-06)
 
 
 
132
  - Fix for backwards compatibility
133
 
134
- = 1.5.12 (2018-08-02)
135
  - Add EU endpoint for Mailgun HTTP API
136
  - Fix broken logo image on Lists page
137
  - Test plugin up to Wordpress 4.9.7
5
  Tags: mailgun, smtp, http, api, mail, email
6
  Requires at least: 3.3
7
  Tested up to: 4.9.7
8
+ Stable tag: 1.5.12.2
9
  License: GPLv2 or later
10
 
11
 
128
 
129
  == Changelog ==
130
 
131
+ = 1.5.12.2 (2018-08-09): =
132
+ - Fix plugin not saving after update
133
+
134
+ = 1.5.12.1 (2018-08-06): =
135
  - Fix for backwards compatibility
136
 
137
+ = 1.5.12 (2018-08-02): =
138
  - Add EU endpoint for Mailgun HTTP API
139
  - Fix broken logo image on Lists page
140
  - Test plugin up to Wordpress 4.9.7