1
votes

In WooCommerce, when a customer goes to checkout from cart and submit the order, my woocommerce is set to place order on-hold until authorized by the admin, but right now if the order is set to "on-hold" the Admin doesn't received any email about.

I would like to send an email to Admin when a customer places a new order on hold. How can I do it?

1

1 Answers

1
votes

The following will send the new order email notification to admin, when an order status is on-hold:

add_action('woocommerce_order_status_on-hold', 'email_on_hold_order_admin_notification', 10, 2 );
function email_on_hold_order_admin_notification( $order_id, $order ) {
    WC()->mailer()->get_emails()['WC_Email_New_Order']->trigger( $order_id );
}

Code goes in function.php file of your active child theme (or active theme). Tested and works

Note: The "new order" email notification need to be enabled in Woocommerce admin settings.


Since WooCommerce 5+: Allow re-sending New Order Notification in WooCommerce 5+