PHPMailer\PHPMailer

PHPMailer::attachmentExists()publicWP 1.0

Check if an attachment (non-inline) is present.

{} Это метод класса: PHPMailer{}

Хуков нет.

Возвращает

true|false.

Использование

$PHPMailer = new PHPMailer();
$PHPMailer->attachmentExists();

Код PHPMailer::attachmentExists() WP 6.1.1

public function attachmentExists()
{
    foreach ($this->attachment as $attachment) {
        if ('attachment' === $attachment[6]) {
            return true;
        }
    }

    return false;
}