PHPMailer\PHPMailer

PHPMailer::clearAttachments()publicWP 1.0

Clear all filesystem, string, and binary attachments.

Method of the class: PHPMailer{}

No Hooks.

Return

null. Nothing (null).

Usage

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

PHPMailer::clearAttachments() code WP 6.5.2

public function clearAttachments()
{
    $this->attachment = [];
}