WC_Log_Handler_Email::send_log_email()publicWC 1.0

Send log email.

Method of the class: WC_Log_Handler_Email{}

No Hooks.

Return

true|false. True if email is successfully sent otherwise false.

Usage

$WC_Log_Handler_Email = new WC_Log_Handler_Email();
$WC_Log_Handler_Email->send_log_email();

WC_Log_Handler_Email::send_log_email() code WC 8.6.1

public function send_log_email() {
	$result = false;

	if ( ! empty( $this->logs ) ) {
		$subject = $this->get_subject();
		$body    = $this->get_body();
		$result  = wp_mail( $this->recipients, $subject, $body );
		$this->clear_logs();
	}

	return $result;
}