0
私はカスタムメール用にこのコードを統合しました。それは動作しますが、私はすべての注文の詳細を送信したいと思います。それは可能ですか?カスタムメール通知
add_action("woocommerce_order_status_changed", "my_awesome_publication_notification");
function my_awesome_publication_notification($order_id, $checkout=null) {
global $woocommerce;
$order = new WC_Order($order_id);
$first_name = $order->billing_first_name;
if($order->status === 'processing') {
// Create a mailer
$mailer = $woocommerce->mailer();
$message_body = "<p>$first_name</p>";
$message_body .= '<p>hat sich angemeldet für:</p>';
$message_body .= '<p>Elisabeth Zangerle<br/>Koordinatorin FoBU</p>';
$message = $mailer->wrap_message(
// Message head and message body.
sprintf(__('Fortbildung im Bezirk'), $order->get_order_number()),
$message_body);
// Cliente email, email subject and message.
$mailer->send($order->billing_company, sprintf(__('Fortbildung im Bezirk'),
$order->get_order_number()), $message);
}
}
はい、。 :-( –
管理者の注文はどういう意味ですか? –
管理者は注文メールを受け取ります。このメールには価格などの注文があります。これは正確に表示することができます。 –