mirror of
https://github.com/WordPress/WordPress.git
synced 2024-09-27 14:53:08 +02:00
afaeaf1529
In [48033] the "class-phpmailer.php" file was deprecated. In test suites, this file is loaded before WordPress in order to setup a mock PHPMailer instance. This means that for test suites that are still loading that file, they'll experience fatal errors due to the undefined "_deprecated_file" function. This commit skips issuing the deprecated file warning if the "_deprecated_file" function is not available. Fixes #50380. Built from https://develop.svn.wordpress.org/trunk@48034 git-svn-id: http://core.svn.wordpress.org/trunk@47801 1a063a9b-81f0-0310-95a4-ce76da25c4cd
12 lines
523 B
PHP
12 lines
523 B
PHP
<?php
|
|
|
|
/**
|
|
* The PHPMailer class has been moved to the wp-includes/PHPMailer subdirectory and now uses the PHPMailer\PHPMailer namespace.
|
|
*/
|
|
if ( function_exists( '_deprecated_file' ) ) {
|
|
_deprecated_file( basename( __FILE__ ), '5.5.0', WPINC . '/PHPMailer/PHPMailer.php', __( 'The PHPMailer class has been moved to wp-includes/PHPMailer subdirectory and now uses the PHPMailer\PHPMailer namespace.' ) );
|
|
}
|
|
require __DIR__ . '/PHPMailer/PHPMailer.php';
|
|
|
|
class_alias( PHPMailer\PHPMailer\PHPMailer::class, 'PHPMailer' );
|