Make WordPress Core


Ignore:
Timestamp:
06/12/2020 09:40:52 PM (5 years ago)
Author:
SergeyBiryukov
Message:

External Libraries: Add class aliases for phpmailerException and SMTP to deprecated files to account for the new namespace.

This ensures backward compatibility with plugins using the old class-phpmailer.php or class-smtp.php files.

Follow-up to [48033].

Props Otto42.
Fixes #50379. See #41750.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-smtp.php

    r48033 r48035  
    44 * The SMTP class has been moved to the wp-includes/PHPMailer subdirectory and now uses the PHPMailer\PHPMailer namespace.
    55 */
    6 _deprecated_file( basename( __FILE__ ), '5.5.0', WPINC . '/PHPMailer/SMTP.php', __( 'The SMTP class has been moved to the wp-includes/PHPMailer subdirectory and now uses the PHPMailer\PHPMailer namespace.' ) );
     6_deprecated_file(
     7    basename( __FILE__ ),
     8    '5.5.0',
     9    WPINC . '/PHPMailer/SMTP.php',
     10    __( 'The SMTP class has been moved to the wp-includes/PHPMailer subdirectory and now uses the PHPMailer\PHPMailer namespace.' )
     11);
     12
    713require __DIR__ . '/PHPMailer/SMTP.php';
     14
     15class_alias( PHPMailer\PHPMailer\SMTP::class, 'SMTP' );
Note: See TracChangeset for help on using the changeset viewer.