Skip to:
Content

BuddyPress.org

Changeset 12708


Ignore:
Timestamp:
08/29/2020 09:32:54 AM (4 years ago)
Author:
imath
Message:

Use the right PHPMailer version even if default mailer is overridden

Props r-a-y, dcavins

See #8347 (Trunk)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/classes/class-bp-phpmailer.php

    r12687 r12708  
    4444         * and is now using version 6.0 of PHPMailer.
    4545         */
    46         if ( file_exists( ABSPATH . WPINC . '/PHPMailer/PHPMailer.php' ) ) {
     46        if ( bp_get_major_wp_version() >= 5.5 ) {
     47            $phpmailer_is_6_0 = true;
     48
    4749            if ( ! ( $phpmailer instanceof PHPMailer\PHPMailer\PHPMailer ) ) {
    4850                if ( ! class_exists( 'PHPMailer\\PHPMailer\\PHPMailer' ) ) {
     
    5254                }
    5355
    54                 $phpmailer        = new PHPMailer\PHPMailer\PHPMailer( true );
    55                 $phpmailer_is_6_0 = true;
     56                $phpmailer = new PHPMailer\PHPMailer\PHPMailer( true );
    5657            }
    5758        } else {
Note: See TracChangeset for help on using the changeset viewer.