diff --git a/CHANGELOG.md b/CHANGELOG.md index 1eadd06..deb2bae 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ Changelog ========= +2.2.3 (2026-08-31) +- Tested and confirmed compatible with WordPress 7.1 +- Fix: settings page "Test Configuration" button now works on modern WordPress - replaced the jQuery AJAX handlers removed in jQuery 3.0 (`complete`/`success`/`error`) with `always`/`done`/`fail` +- Fix: load the plugin text domain on the `init` hook to avoid the "translation loading triggered too early" notice in WordPress 6.7+ + 2.2.2 (2026-07-17) - Security fix: replace insecure SHA-1/MD5 hash functions with SHA-256 for the API request hash, multipart boundary generation, and widget ID generation diff --git a/includes/admin.php b/includes/admin.php index 83b55f8..ad13871 100755 --- a/includes/admin.php +++ b/includes/admin.php @@ -46,8 +46,15 @@ public function __construct() { $this->init(); - // Load localizations if available - load_plugin_textdomain('mailgun', false, 'mailgun/languages'); + // Load localizations if available. Deferred to `init` because WordPress 6.7+ + // triggers a "translation loading was triggered too early" notice when a text + // domain is loaded before the `init` action. + add_action( + 'init', + static function (): void { + load_plugin_textdomain('mailgun', false, 'mailgun/languages'); + } + ); // Activation hook register_activation_hook($this->plugin_file, array( &$this, 'activation' )); @@ -163,7 +170,7 @@ public function admin_footer_js(): void { } var formModified = false - jQuery().ready(function () { + jQuery(function () { mailgunApiOrNot() jQuery('#mailgun-api').change(function () { mailgunApiOrNot() @@ -186,10 +193,10 @@ public function admin_footer_js(): void { _wpnonce: '' } ) - .complete(function () { + .always(function () { jQuery('#mailgun-test').val('') }) - .success(function (data) { + .done(function (data) { if (typeof data.message !== 'undefined' && data.message === 'Failure') { toastr.error('Mailgun ' + data.method + ' Test ' + data.message + '; status "' + data.error + '"'); @@ -198,7 +205,7 @@ public function admin_footer_js(): void { + '; status "' + data.error + '"'); } }) - .error(function () { + .fail(function () { toastr.error('Mailgun Test ') }) }) diff --git a/mailgun.php b/mailgun.php index 582f924..0a64049 100755 --- a/mailgun.php +++ b/mailgun.php @@ -3,7 +3,7 @@ * Plugin Name: Mailgun * Plugin URI: http://wordpress.org/extend/plugins/mailgun/ * Description: Mailgun integration for WordPress - * Version: 2.2.2 + * Version: 2.2.3 * Requires PHP: 7.4 * Requires at least: 5.6 * Author: Mailgun diff --git a/readme.md b/readme.md index c9cba8e..7343da2 100755 --- a/readme.md +++ b/readme.md @@ -3,8 +3,8 @@ Mailgun for WordPress Contributors: mailgun, sivel, lookahead.io, m35dev, alanfuller Tags: mailgun, smtp, http, api, mail, email -Tested up to: 7.0 -Stable tag: 2.2.2 +Tested up to: 7.1 +Stable tag: 2.2.3 Requires PHP: 7.4 License: GPLv2 or later @@ -133,6 +133,11 @@ MAILGUN_REPLY_TO_ADDRESS Type: string == Changelog == += 2.2.3 (2026-08-31): = +- Tested and confirmed compatible with WordPress 7.1 +- Fix: settings page "Test Configuration" button now works on modern WordPress - replaced the jQuery AJAX handlers removed in jQuery 3.0 (`complete`/`success`/`error`) with `always`/`done`/`fail` +- Fix: load the plugin text domain on the `init` hook to avoid the "translation loading triggered too early" notice in WordPress 6.7+ + = 2.2.2 (2026-07-17): = - Security fix: replace insecure SHA-1/MD5 hash functions with SHA-256 for the API request hash, multipart boundary generation, and widget ID generation diff --git a/readme.txt b/readme.txt index ccedada..eef52ca 100755 --- a/readme.txt +++ b/readme.txt @@ -3,8 +3,8 @@ Mailgun for WordPress Contributors: mailgun, sivel, lookahead.io, m35dev, alanfuller Tags: mailgun, smtp, http, api, mail, email -Tested up to: 7.0 -Stable tag: 2.2.2 +Tested up to: 7.1 +Stable tag: 2.2.3 Requires PHP: 7.4 License: GPLv2 or later @@ -129,6 +129,11 @@ MAILGUN_TRACK_OPENS Type: string Choices: 'yes' or 'no' == Changelog == += 2.2.3 (2026-08-31): = +- Tested and confirmed compatible with WordPress 7.1 +- Fix: settings page "Test Configuration" button now works on modern WordPress - replaced the jQuery AJAX handlers removed in jQuery 3.0 (`complete`/`success`/`error`) with `always`/`done`/`fail` +- Fix: load the plugin text domain on the `init` hook to avoid the "translation loading triggered too early" notice in WordPress 6.7+ + = 2.2.2 (2026-07-17): = - Security fix: replace insecure SHA-1/MD5 hash functions with SHA-256 for the API request hash, multipart boundary generation, and widget ID generation