summaryrefslogtreecommitdiff
path: root/Postman/Postman.php
diff options
context:
space:
mode:
authorYehuda Hassine <yehuda@myinbox.in>2019-05-02 07:42:15 +0300
committerYehuda Hassine <yehuda@myinbox.in>2019-05-02 07:42:15 +0300
commit75e5f6e319d5d36f3076fe2eb449bb089b8ce3da (patch)
tree350acb4c3c39a98d2958183ef8d5156250d011fb /Postman/Postman.php
parent2418df179a32dfe20559a948e4fff10ee23e2a7c (diff)
downloadPost-SMTP-75e5f6e319d5d36f3076fe2eb449bb089b8ce3da.zip
small issues
Diffstat (limited to 'Postman/Postman.php')
-rw-r--r--Postman/Postman.php20
1 files changed, 13 insertions, 7 deletions
diff --git a/Postman/Postman.php b/Postman/Postman.php
index c832ef6..2956d44 100644
--- a/Postman/Postman.php
+++ b/Postman/Postman.php
@@ -96,7 +96,7 @@ class Postman {
$this->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 );
}
/**