-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
With WP_Debug on, you'll see a notice in 5.5 about deprecated PHP Mailer issues.
For reference, Here's how the Delicious Brains team is handling calling that class now, which includes backward compatibility:
/**
* Gets the PHP Mailer instance.
*
* Backwards-compatibility for pre-5.5 versions of WordPress.
*
* @return PHPMailer
*/
public function get_PHPMailer() {
if ( file_exists( ABSPATH . WPINC . '/PHPMailer/PHPMailer.php' ) ) {
require_once ABSPATH . WPINC . '/PHPMailer/PHPMailer.php';
require_once ABSPATH . WPINC . '/PHPMailer/Exception.php';
$PHPMailer = new \PHPMailer\PHPMailer\PHPMailer();
} else {
require_once ABSPATH . WPINC . '/class-phpmailer.php';
$PHPMailer = new \PHPMailer( true );
}
return $PHPMailer;
}
I briefly tried to fork this plugin and make a PR for that change, but it kept breaking. Hopefully this is enough rails to run on for you to resolve this!
I use email cop on lots of test sites, and love it!
ashfame
Metadata
Metadata
Assignees
Labels
No labels