Mail: Make sure the PHPMailer class is only required once if a plugin requires wp-includes/class-phpmailer.php directly.

Follow-up to [48033].

Props david.binda.
Fixes #50716. See #41750.

git-svn-id: https://develop.svn.wordpress.org/trunk@48530 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2020-07-21 12:56:40 +00:00
parent ea352ee2ab
commit 99f5b6019a

View File

@ -12,8 +12,8 @@ if ( function_exists( '_deprecated_file' ) ) {
);
}
require __DIR__ . '/PHPMailer/PHPMailer.php';
require __DIR__ . '/PHPMailer/Exception.php';
require_once __DIR__ . '/PHPMailer/PHPMailer.php';
require_once __DIR__ . '/PHPMailer/Exception.php';
class_alias( PHPMailer\PHPMailer\PHPMailer::class, 'PHPMailer' );
class_alias( PHPMailer\PHPMailer\Exception::class, 'phpmailerException' );