我有一个自定义电子邮件模板(由Booster插件制作),希望通过条件逻辑发送给客户。这是一个函数:
function tt_foreign_bank_notice_email ( $order_id ) {
$order = new WC_Order( $order_id );
$order_data = $order->get_data();
$payment_method = $order->get_payment_method();
$order_billing_country = $order_data['billing']['country'];
if ( $order_billing_country != 'LV' && $payment_method == 'bacs' ) {
// NEED TO SEND EMAIL TEMPLATE wc_email_wcj_custom_8 TO CUSTOMER
}
}
add_action( 'woocommerce_new_order','tt_foreign_bank_notice_email' );
在我的功能中,如何致电发送此电子邮件?