Make WordPress Core


Ignore:
Timestamp:
01/08/2025 12:52:04 PM (4 months ago)
Author:
swissspidy
Message:

I18N: Mail: Make PHPMailer messages translatable.

Adds a new WP_PHPMailer class to leverage the WordPress i18n system with PHPMailer, so that any user-visible error messages can be properly translated.

Props sukhendu2002, swissspidy, audrasjb, iandunn, nacin, mark-k.
Fixes #23311.

File:
1 edited

Legend:

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

    r59578 r59592  
    252252            require_once ABSPATH . WPINC . '/PHPMailer/SMTP.php';
    253253            require_once ABSPATH . WPINC . '/PHPMailer/Exception.php';
    254             $phpmailer = new PHPMailer\PHPMailer\PHPMailer( true );
     254            require_once ABSPATH . WPINC . '/class-wp-phpmailer.php';
     255            $phpmailer = new WP_PHPMailer( true );
    255256
    256257            $phpmailer::$validator = static function ( $email ) {
Note: See TracChangeset for help on using the changeset viewer.