Skip to:
Content

BuddyPress.org

Changeset 12709


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

Use the right PHPMailer version even if default mailer is overridden

Props r-a-y, dcavins

Fixes #8347 (Branch 6.0)

File:
1 edited

Legend:

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

    r12688 r12709  
    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.