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

Follow-up to [48033], [48530].

Props oellin, greatsaltlake, audrasjb.
Fixes #52369. See #50716, #41750.

git-svn-id: https://develop.svn.wordpress.org/trunk@50022 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2021-01-26 13:44:42 +00:00
parent f8829b3a8d
commit 37f0f960ef

View File

@ -10,6 +10,6 @@ _deprecated_file(
__( 'The SMTP class has been moved to the wp-includes/PHPMailer subdirectory and now uses the PHPMailer\PHPMailer namespace.' )
);
require __DIR__ . '/PHPMailer/SMTP.php';
require_once __DIR__ . '/PHPMailer/SMTP.php';
class_alias( PHPMailer\PHPMailer\SMTP::class, 'SMTP' );