WordPress at a glance
function is not described

PHPMailer\PHPMailer

PHPMailer::clearAttachments() public WP 1.0

Clear all filesystem, string, and binary attachments.

{} It's a method of the class: PHPMailer{}

No Hooks.

Return

null. Nothing.

Usage

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

Code of PHPMailer::clearAttachments() WP 5.7.2

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