WC_Email::clear_alt_body_field()privateWC 1.0

Clears the PhpMailer AltBody field, to prevent that content from leaking across emails.

Метод класса: WC_Email{}

Хуков нет.

Возвращает

null. Ничего (null).

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

// private - только в коде основоного (родительского) класса
$result = $this->clear_alt_body_field(): void;

Код WC_Email::clear_alt_body_field() WC 8.7.0

private function clear_alt_body_field(): void {
	global $phpmailer;

	if ( $phpmailer instanceof PHPMailer\PHPMailer\PHPMailer ) {
		$phpmailer->AltBody = ''; // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
	}
}