我想以.ics文件格式通过程序以新顺序的电子邮件形式发送一些附件,其中包含客户信息。我的邮件发送到各个电子邮件的顺序不同。用于下订单时,并在订单电子邮件后发送发送
function iconic_processing_notification( $order_id ) {
$order = wc_get_order( $order_id );
$firstname = "John";
$lastname = "Smith";
$email = "sitetesting747@gmail.com";
$meeting_date = "2019/11/11 10:00:00"; //mysql format
$meeting_name = "Hello";
$meeting_duration = 7200;
//returns true or false
$result = sendIcalEmail($firstname,$lastname,$email,$meeting_date,$meeting_name,$meeting_duration);
//display result
IF($result) {
ECHO "Email sent successfully.";
} ELSE {
ECHO "A problem occurred sending email";
}
}
}
}
add_action( 'woocommerce_order_status_pending_to_processing_notification', 'iconic_processing_notification', 10, 1 );