Automattic\WooCommerce\Internal\OrderWithdrawal

OrderWithdrawalFormProcessor::send_customer_order_withdrawal_email │ private │ WC 1.0

Send the customer order withdrawal acknowledgement email.

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

Хуков нет.

Возвращает

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

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

// private - только в коде основоного (родительского) класса
$result = $this->send_customer_order_withdrawal_email( $data, $submitted_at ): bool;
$data(array<string,string>) (обязательный)
Form data.
$submitted_at(int) (обязательный)
Unix timestamp for the submission.

Код OrderWithdrawalFormProcessor::send_customer_order_withdrawal_email() WC 11.2.2

private function send_customer_order_withdrawal_email( array $data, int $submitted_at ): bool {
	$email = WC()->mailer()->get_emails()['WC_Email_Customer_Order_Withdrawal_Requested'] ?? include WC_ABSPATH . 'includes/emails/class-wc-email-customer-order-withdrawal-requested.php';

	if ( ! $email instanceof WC_Email_Customer_Order_Withdrawal_Requested ) {
		return false;
	}

	if ( ! $email->is_enabled() ) {
		return true;
	}

	return $email->trigger( $data, $submitted_at );
}