Automattic\WooCommerce\Internal\OrderWithdrawal
OrderWithdrawalFormProcessor::send_customer_order_withdrawal_email
Send the customer order withdrawal acknowledgement email.
Method of the class: OrderWithdrawalFormProcessor{}
No Hooks.
Returns
null. Nothing (null).
Usage
// private - for code of main (parent) class only $result = $this->send_customer_order_withdrawal_email( $data, $submitted_at ): bool;
- $data(array<string,string>) (required)
- Form data.
- $submitted_at(int) (required)
- Unix timestamp for the submission.
OrderWithdrawalFormProcessor::send_customer_order_withdrawal_email() OrderWithdrawalFormProcessor::send customer order withdrawal email code WC 11.2.1
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 );
}