From 75e5f6e319d5d36f3076fe2eb449bb089b8ce3da Mon Sep 17 00:00:00 2001 From: Yehuda Hassine Date: Thu, 2 May 2019 07:42:15 +0300 Subject: small issues --- Postman/Phpmailer/PostsmtpMailer.php | 1 + .../Postman-Email-Log/PostmanEmailLogController.php | 2 ++ Postman/Postman.php | 20 +++++++++++++------- Postman/extra/donation.php | 2 +- 4 files changed, 17 insertions(+), 8 deletions(-) diff --git a/Postman/Phpmailer/PostsmtpMailer.php b/Postman/Phpmailer/PostsmtpMailer.php index b41b43c..82527d2 100644 --- a/Postman/Phpmailer/PostsmtpMailer.php +++ b/Postman/Phpmailer/PostsmtpMailer.php @@ -77,6 +77,7 @@ class PostsmtpMailer extends PHPMailer { public function postman_wp_mail_result() { $result = [ + 'time' => '', 'exception' => $this->error, 'transcript' => '', ]; diff --git a/Postman/Postman-Email-Log/PostmanEmailLogController.php b/Postman/Postman-Email-Log/PostmanEmailLogController.php index 2845967..79751f3 100644 --- a/Postman/Postman-Email-Log/PostmanEmailLogController.php +++ b/Postman/Postman-Email-Log/PostmanEmailLogController.php @@ -351,6 +351,8 @@ class PostmanEmailLogController { /* Translators where (%s) is the name of the plugin */ echo sprintf( __( '%s Email Log', 'post-smtp' ), __( 'Post SMTP', 'post-smtp' ) )?> + +

wpMailBinder = PostmanWpMailBinder::getInstance(); $this->logger->trace( 'SMTP Mailer: ' . PostmanOptions::getInstance()->getSmtpMailer() ); - PostmanWpMailBinder::getInstance()->bound = true; + if ( PostmanOptions::getInstance()->getTransportType() == 'smtp' && PostmanOptions::getInstance()->getSmtpMailer() !== 'phpmailer') { @@ -104,6 +104,8 @@ class Postman { // this design allows other plugins to register a Postman transport and call bind() // bind may be called more than once $this->wpMailBinder->bind(); + } else { + PostmanWpMailBinder::getInstance()->bound = true; } // registers the custom post type for all callers @@ -422,12 +424,16 @@ class Postman { * @param mixed $pluginData */ private function registerTransports( $rootPluginFilenameAndPath ) { - PostmanTransportRegistry::getInstance()->registerTransport( new PostmanDefaultModuleTransport( $rootPluginFilenameAndPath ) ); - PostmanTransportRegistry::getInstance()->registerTransport( new PostmanSmtpModuleTransport( $rootPluginFilenameAndPath ) ); - PostmanTransportRegistry::getInstance()->registerTransport( new PostmanGmailApiModuleTransport( $rootPluginFilenameAndPath ) ); - PostmanTransportRegistry::getInstance()->registerTransport( new PostmanMandrillTransport( $rootPluginFilenameAndPath ) ); - PostmanTransportRegistry::getInstance()->registerTransport( new PostmanSendGridTransport( $rootPluginFilenameAndPath ) ); - PostmanTransportRegistry::getInstance()->registerTransport( new PostmanMailgunTransport( $rootPluginFilenameAndPath ) ); + $postman_transport_registry = PostmanTransportRegistry::getInstance(); + + $postman_transport_registry->registerTransport( new PostmanDefaultModuleTransport( $rootPluginFilenameAndPath ) ); + $postman_transport_registry->registerTransport( new PostmanSmtpModuleTransport( $rootPluginFilenameAndPath ) ); + $postman_transport_registry->registerTransport( new PostmanGmailApiModuleTransport( $rootPluginFilenameAndPath ) ); + $postman_transport_registry->registerTransport( new PostmanMandrillTransport( $rootPluginFilenameAndPath ) ); + $postman_transport_registry->registerTransport( new PostmanSendGridTransport( $rootPluginFilenameAndPath ) ); + $postman_transport_registry->registerTransport( new PostmanMailgunTransport( $rootPluginFilenameAndPath ) ); + + do_action( 'postsmtp_register_transport', $postman_transport_registry ); } /** diff --git a/Postman/extra/donation.php b/Postman/extra/donation.php index bee1980..61fc3a9 100644 --- a/Postman/extra/donation.php +++ b/Postman/extra/donation.php @@ -1,7 +1,7 @@ +if ( empty( $postman_dismiss_donation ) || isset( $in_wizard ) ) : ?>

It is hard to continue development and support for this free plugin without contributions from users like you.
If you enjoy using Post SMTP and find it useful, please consider making a donation.
-- cgit v1.2.3