From feabc9fbc7aa98733974f92b7890ca2555c11c56 Mon Sep 17 00:00:00 2001 From: Oleksandr Mykhailenko Date: Mon, 26 Dec 2022 20:29:04 +0200 Subject: [PATCH] Fixed bug with not overriding `from name` for Woocommerce --- CHANGELOG.md | 3 +++ includes/mg-filter.php | 2 +- mailgun.php | 2 +- readme.md | 7 +++++-- readme.txt | 7 +++++-- 5 files changed, 15 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 35c15ce..01c0adc 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ Changelog ========= +1.8.10 (2022-12-26) +- Fixed bug with not overriding `from name` for Woocommerce + 1.8.9 (2022-12-14) - Fixed bug with removed wp_mail filter diff --git a/includes/mg-filter.php b/includes/mg-filter.php index c497192..b9272ef 100755 --- a/includes/mg-filter.php +++ b/includes/mg-filter.php @@ -93,7 +93,7 @@ function mg_detect_from_name($from_name_header = null) } $filter_from_name = null; - if (has_filter('wp_mail_from_name')) { + if ((!isset($mg_override_from) || $mg_override_from == '0') && has_filter('wp_mail_from_name')) { $filter_from_name = apply_filters( 'wp_mail_from_name', $from_name diff --git a/mailgun.php b/mailgun.php index 8f8a3ea..97bbb36 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: 1.8.9 + * Version: 1.8.10 * Tested up to: 6.1 * Author: Mailgun * Author URI: http://www.mailgun.com/ diff --git a/readme.md b/readme.md index eaf44cb..6395407 100755 --- a/readme.md +++ b/readme.md @@ -4,8 +4,8 @@ Mailgun for WordPress Contributors: mailgun, sivel, lookahead.io, m35dev Tags: mailgun, smtp, http, api, mail, email Requires at least: 3.3 -Tested up to: 6.1 -Stable tag: 1.8.9 +Tested up to: 6.1.1 +Stable tag: 1.8.10 Requires PHP: 5.6 License: GPLv2 or later @@ -130,6 +130,9 @@ MAILGUN_FROM_ADDRESS Type: string == Changelog == += 1.8.10 (2022-12-26): = +- Fixed bug with not overriding `from name` for Woocommerce + = 1.8.9 (2022-12-14): = - Fixed bug with removed wp_mail filter diff --git a/readme.txt b/readme.txt index 0d99ada..b4696e0 100755 --- a/readme.txt +++ b/readme.txt @@ -4,8 +4,8 @@ Mailgun for WordPress Contributors: mailgun, sivel, lookahead.io, m35dev Tags: mailgun, smtp, http, api, mail, email Requires at least: 4.4 -Tested up to: 6.1 -Stable tag: 1.8.9 +Tested up to: 6.1.1 +Stable tag: 1.8.10 Requires PHP: 5.6 License: GPLv2 or later @@ -128,6 +128,9 @@ MAILGUN_FROM_ADDRESS Type: string == Changelog == += 1.8.10 (2022-12-26): = +- Fixed bug with not overriding `from name` for Woocommerce + = 1.8.8 (2022-12-14): = - Fixed bug with removed wp_mail filter