@@ -62,7 +62,9 @@ discard block |
||
| 62 | 62 | $this->to = $email['to']; |
| 63 | 63 | |
| 64 | 64 | add_action( 'phpmailer_init', function( PHPMailer $phpmailer ) { |
| 65 | - if( $phpmailer->ContentType === 'text/plain' || !empty( $phpmailer->AltBody ))return; |
|
| 65 | + if( $phpmailer->ContentType === 'text/plain' || !empty( $phpmailer->AltBody )) { |
|
| 66 | + return; |
|
| 67 | + } |
|
| 66 | 68 | $phpmailer->AltBody = $this->buildPlainTextMessage( $phpmailer->Body ); |
| 67 | 69 | }); |
| 68 | 70 | |
@@ -86,7 +88,9 @@ discard block |
||
| 86 | 88 | */ |
| 87 | 89 | public function send() |
| 88 | 90 | { |
| 89 | - if( !$this->message || !$this->subject || !$this->to )return; |
|
| 91 | + if( !$this->message || !$this->subject || !$this->to ) { |
|
| 92 | + return; |
|
| 93 | + } |
|
| 90 | 94 | |
| 91 | 95 | $sent = wp_mail( |
| 92 | 96 | $this->to, |
@@ -226,7 +230,9 @@ discard block |
||
| 226 | 230 | if( !file_exists( $file )) { |
| 227 | 231 | $file = sprintf( '%s/templates/%s.php', dirname( __DIR__ ), $templatePath ); |
| 228 | 232 | } |
| 229 | - if( !file_exists( $file ))return; |
|
| 233 | + if( !file_exists( $file )) { |
|
| 234 | + return; |
|
| 235 | + } |
|
| 230 | 236 | |
| 231 | 237 | ob_start(); |
| 232 | 238 | include $file; |