Before you look at SPF, DKIM or an SMTP plugin, open the order and read its status. WooCommerce does not send the admin “New order” notification when an order is created; it sends it when the order transitions into a paid or actionable status. The most common version of this ticket is an order sitting at pending payment or failed because the gateway callback never came back, and in that case no admin email was ever due, the mail stack is innocent, and what you have is a payment-integration incident. If the order really is at processing, on-hold or completed, the customer got their copy, and you got nothing, then the split is narrower than it looks: the notification is off or its recipient does not resolve, or wp_mail() was never called, or the message left PHP and quietly died on the way to a mailbox that happens to live on the same server that sent it.
What you’ll accomplish
- Decide in under a minute whether this is a gateway problem or a mail problem.
- Read the actual stored settings for the “New order” email instead of trusting the admin screen.
- Prove whether
wp_mail()was called at all for a specific order. - Re-send the admin notification for an existing order without asking a customer to buy again.
- Follow one message from PHP into the MTA log and out to the receiving side.
Prerequisites
WooCommerce 8.x or newer on WordPress 6.5 or later, PHP 8.1 or above. Administrator access to the store, plus shell access with WP-CLI available as wp, run as the site user from the WordPress root. Commands that touch wp wc subcommands need the WooCommerce CLI and a --user= flag naming an administrator, because the REST controllers behind them run capability checks; --user=1 is used throughout, so substitute your own admin ID.
Read access to the mail log helps: /var/log/exim_mainlog on cPanel and most WHM boxes, /var/log/mail.log or journalctl -u postfix on a plain Debian or Ubuntu host. If you have no shell access to the MTA, install a WordPress mail-logging plugin first and see what a mail log should actually record so you capture headers rather than just subjects.
The examples assume the default wp_ table prefix. Run wp config get table_prefix and substitute if yours differs. Finally, have one real order ID that reproduces the complaint. “Some orders” is not a starting point; one order number is.
How it works
WooCommerce registers each email class against specific status transition hooks, not against order creation. WC_Email_New_Order — the one whose settings screen is labelled “New order” — listens on transitions such as woocommerce_order_status_pending_to_processing_notification, pending_to_completed, pending_to_on-hold, and the equivalents starting from failed or cancelled. That list has a consequence people rarely internalise: an order that goes from pending straight to cancelled or failed fires nothing, and an order that never leaves pending fires nothing at all.
The customer copy and the admin copy branch from the same transition but are different objects with different recipients. WC_Email_Customer_Processing_Order addresses the billing email stored on the order. WC_Email_New_Order addresses whatever is in its Recipient(s) field. That is why “the customer got theirs” tells you the transition fired and wp_mail() works, and narrows the fault to the admin object or to the admin recipient.
Two details in the WooCommerce source decide most of these tickets. First, WC_Email::get_recipient() splits the field on commas, trims each entry, and then filters the list through is_email(). Anything malformed is dropped without a warning; if every entry is malformed, the method returns an empty string. Second, WC_Email_New_Order::trigger() only sends when the email is enabled and get_recipient() returns something non-empty. When either check fails, the method returns quietly. Nothing is logged, no error is raised, and wp_mail() is never reached — which is precisely why a mail log shows nothing and everyone starts blaming DNS.
A saving grace: an empty Recipient(s) field is not the same as no recipient. The setting falls back to the site’s admin_email option. So an empty field usually still sends, to whatever address WordPress thinks the admin is, which is often a developer’s mailbox from the build phase.
Step-by-step
1. Read the order status and the order notes. This is the fork in the road, and it takes one command.
wp eval 'foreach ( wc_get_orders( array( "limit" => 10, "orderby" => "date", "order" => "DESC", "return" => "ids" ) ) as $id ) { $o = wc_get_order( $id ); echo $id . " " . $o->get_status() . " " . $o->get_date_created()->date( "Y-m-d H:i" ) . " " . $o->get_payment_method_title() . "\n"; }'
12345 pending 2026-08-23 10:02 Credit card (Stripe)
12344 processing 2026-08-23 09:41 Credit card (Stripe)
12343 pending 2026-08-23 09:12 Credit card (Stripe)
wc_get_orders() reads through the WooCommerce data store, so it returns the same answer whether or not High-Performance Order Storage is active. A run of pending rows with no processing sibling means the gateway is not confirming payments and the missing email is a symptom, not the incident. Confirm with the notes on the specific order.
wp eval 'foreach ( wc_get_order_notes( array( "order_id" => 12345, "orderby" => "date_created", "order" => "ASC" ) ) as $n ) { echo $n->date_created->date( "Y-m-d H:i:s" ) . " " . str_replace( "\n", " ", $n->content ) . "\n"; }'
2026-08-23 10:02:11 Order status set to pending payment.
2026-08-23 10:02:14 Stripe payment intent pi_3PabcDEF0123 initiated.
Two notes and nothing after them means the browser left for the gateway and the callback never returned. Go and fix the webhook endpoint; the rest of this article does not apply. If instead you see a note recording an approved payment followed by a transition into processing, the transition happened and you are in the mail lane.
2. Read the stored settings for the “New order” email. The settings screen at WooCommerce > Settings > Emails is a rendering of one option row, and reading the row directly avoids caching and permissions surprises.
wp option get woocommerce_new_order_settings --format=json
{"enabled":"yes","recipient":"orders@example.com, shop@example,com","subject":"","heading":"","additional_content":"","email_type":"html"}
That output is a real failure we see more than once. shop@example,com has a comma where the dot belongs, so is_email() rejects it, the entry is dropped silently, and the store owner who reads that mailbox gets nothing forever while the other address keeps working. "enabled":"no" is the blunter version of the same fault. Check what the field resolves to after filtering rather than what is typed in it.
wp eval 'WC()->mailer(); $e = WC()->mailer()->get_emails()["WC_Email_New_Order"]; echo "enabled: " . ( $e->is_enabled() ? "yes" : "no" ) . "\nrecipient resolves to: [" . $e->get_recipient() . "]\nadmin_email fallback: " . get_option( "admin_email" ) . "\n";'
enabled: yes
recipient resolves to: [orders@example.com]
admin_email fallback: dev@agency.example
Square brackets around an empty value is your answer. Fix the field in place if needed.
wp option patch update woocommerce_new_order_settings recipient 'orders@example.com,owner@example.com'
Success: Updated 'woocommerce_new_order_settings' option.
3. Check which filters are touching the mail path. A plugin can rewrite the recipient or short-circuit the send entirely, and this is a five-second census.
wp eval 'global $wp_filter; foreach ( array( "pre_wp_mail", "wp_mail", "wp_mail_from", "phpmailer_init", "woocommerce_email_recipient_new_order" ) as $h ) { $n = isset( $wp_filter[ $h ] ) ? array_sum( array_map( "count", $wp_filter[ $h ]->callbacks ) ) : 0; echo $h . ": " . $n . " callback(s)\n"; }'
pre_wp_mail: 1 callback(s)
wp_mail: 2 callback(s)
wp_mail_from: 1 callback(s)
phpmailer_init: 1 callback(s)
woocommerce_email_recipient_new_order: 1 callback(s)
A callback on pre_wp_mail means something can return early and stop the send before PHPMailer is ever built — that is how most SMTP plugins hand delivery to an API. A callback on woocommerce_email_recipient_new_order means the recipient you read in step 2 is not necessarily the recipient used at send time.
4. Re-send the notification for an existing order and watch wp_mail() from the inside. You do not need a new purchase. From the admin, the order edit screen has an “Order actions” dropdown with “Resend new order notification”. From the shell you can do the same thing and instrument it.
wp eval '
$order_id = 12345;
add_filter( "wp_mail", function( $a ) { $to = is_array( $a["to"] ) ? implode( ",", $a["to"] ) : $a["to"]; echo "wp_mail CALLED -> " . $to . " | " . $a["subject"] . "\n"; return $a; }, 9999 );
add_action( "wp_mail_failed", function( $e ) { echo "wp_mail_failed: " . $e->get_error_message() . "\n"; } );
$mailer = WC()->mailer();
$order = wc_get_order( $order_id );
$email = $mailer->get_emails()["WC_Email_New_Order"];
do_action( "woocommerce_before_resend_order_emails", $order, "new_order" );
$email->trigger( $order_id, $order );
do_action( "woocommerce_after_resend_order_email", $order, "new_order" );
echo "done\n";
'
wp_mail CALLED -> orders@example.com | [Example Store]: New order #12345
done
That line is the whole diagnostic. If you see it, PHP handed a message off and the fault is downstream: keep going to step 5. If you see only done, trigger() bailed on the enabled-or-recipient check and the fault is entirely in step 2 — no amount of DNS work will change it. If you see wp_mail_failed, read the message; PHPMailer errors here are usually SMTP authentication or a rejected envelope sender.
5. Find that exact message in the MTA log. Run this within a minute of step 4 so the timestamps line up.
grep -F 'orders@example.com' /var/log/exim_mainlog | tail -n 10
2026-08-23 10:41:02 1sABcD-000XyZ-1a <= wordpress@example.com U=examplusr P=local S=18422 T="[Example Store]: New order #12345"
2026-08-23 10:41:03 1sABcD-000XyZ-1a => orders <orders@example.com> R=virtual_user T=virtual_userdelivery
2026-08-23 10:41:03 1sABcD-000XyZ-1a Completed
Read the router and transport names, because they answer the question nobody thinks to ask. R=virtual_user T=virtual_userdelivery means the message was delivered locally, into a mailbox on the same server, and never crossed the internet. If the store’s real mail lives at Google Workspace or Microsoft 365, that message is sitting in an abandoned local mailbox nobody has ever opened. The healthy line for an external recipient looks different.
2026-08-23 10:41:03 1sABcD-000XyZ-1a => orders@example.com R=lookuphost T=remote_smtp H=aspmx.l.google.com [142.251.1.27] X=TLS1.3 C="250 2.0.0 OK"
On a Postfix host the same investigation reads grep -F 'orders@example.com' /var/log/mail.log | tail -n 10 and you are looking for a status=sent line with the receiving MX named in it, versus status=sent (delivered to mailbox) for a local drop.
6. Fix the routing, not the message, when delivery is local. On cPanel this is WHM or cPanel > Email > Email Routing, set to Remote Mail Exchanger for the domain when the MX points elsewhere. The equivalent on Postfix is removing the domain from mydestination and virtual_alias_domains. If you cannot change routing quickly, the interim fix is to point the Recipient(s) field at an address on a domain the server does not consider local, which is often the fastest path back to a working store.
Validate it works
Re-sending proves the plumbing; only a real order proves the trigger. Create a hidden or password-protected product priced at the smallest amount your gateway will accept, then buy it yourself through the live checkout with a real card. Do not use a gateway sandbox for this test — sandbox transactions frequently take a different callback path and will not exercise the webhook you are trying to trust.
Then check three things in order. The order should show processing (or on-hold for a bank-transfer method) within seconds, not pending. The mail log should show one line per copy, with distinct recipients. And the admin address should have the message in its inbox, not its junk folder.
wp eval 'foreach ( wc_get_orders( array( "limit" => 1, "orderby" => "date", "order" => "DESC", "return" => "ids" ) ) as $id ) { $o = wc_get_order( $id ); echo $id . " => " . $o->get_status() . "\n"; }'
grep -F "New order #" /var/log/exim_mainlog | tail -n 4
12346 => processing
2026-08-23 11:07:44 1sABzZ-000Q7k-2b <= wordpress@example.com U=examplusr P=local S=18510 T="[Example Store]: New order #12346"
2026-08-23 11:07:45 1sABzZ-000Q7k-2b => orders@example.com R=lookuphost T=remote_smtp H=aspmx.l.google.com [142.251.1.27] C="250 2.0.0 OK"
Then refund the test order so your reporting stays clean, and note that a refund does not un-send the email, which is fine.
Troubleshooting
The order is not where you are looking for it. If the store has moved to High-Performance Order Storage, orders live in wc_orders, not wp_posts, and wp post list --post_type=shop_order will return an empty set on a store that is clearly taking orders. Check first, then query the right table.
wp option get woocommerce_custom_orders_table_enabled
wp db query "SELECT id, status, date_created_gmt, billing_email FROM wp_wc_orders ORDER BY id DESC LIMIT 5;"
yes
id status date_created_gmt billing_email
12346 wc-processing 2026-08-23 15:07:41 buyer@example.net
12345 wc-pending 2026-08-23 14:02:11 buyer@example.net
Statuses carry the wc- prefix in storage and come back without it from get_status(). If the store is mid-migration and running in compatibility mode, see the HPOS migration guide before drawing conclusions from either table.
Transactional emails are deferred and the background queue is stuck. Some hosts and performance plugins turn on WooCommerce’s deferred sending, which pushes emails onto a background process driven by loopback requests. If loopback requests are blocked at the firewall, the emails queue and never drain.
wp eval 'var_dump( apply_filters( "woocommerce_defer_transactional_emails", false ) );'
wp db query "SELECT option_name FROM wp_options WHERE option_name LIKE 'wp_wc_background_emailer_batch_%';"
bool(true) plus leftover batch rows is the signature. Either fix loopback or turn deferral off.
An SMTP plugin’s Force From fights the store settings. WP Mail SMTP and its relatives can force a From address on every message, overriding woocommerce_email_from_address. If the forced address is on a domain the provider is not authorised to send for, the provider rejects or the receiver quarantines. Read what the plugin actually stores rather than what its wizard showed you.
wp option get wp_mail_smtp --format=json
wp option get woocommerce_email_from_address
Pick one source of truth for the From identity. The general rules for that live in WooCommerce email delivery and are not worth repeating here.
The message arrives but the store owner swears it does not. Check the junk folder, then check the rule set. Admin notifications are high-volume, template-identical, and frequently swept into a folder by a rule someone wrote two years ago. On Microsoft 365 or Google Workspace, run a message trace on the message ID from the MTA log; a message in quarantine still counts as delivered from your side.
Only some orders notify. Compare the payment methods on the orders that notified against those that did not. Manual methods such as cheque and bank transfer land on on-hold, which does fire the New order email from pending; but some gateways create the order directly in a status the class does not listen for, or set the status from a background job in a way that skips the transition hooks. The order notes in step 1 will show which.
When this is the wrong approach
Mailbox notifications are a poor operations channel for a store past a handful of orders a day. Once staff are picking, packing and refunding, the “New order” email becomes noise that people filter, and filtered notifications are indistinguishable from missing ones. At that volume the answer is not better mail; it is an order-management integration — a fulfilment tool, an ERP connector, or a webhook into the channel your team actually watches — with the WooCommerce email left on only as a paper trail.
Equally, if the underlying problem is that store mail leaves from a shared web host IP with no reputation, stop tuning WooCommerce and move all transactional mail onto a dedicated sending provider. That is a different project with a different checklist, covered in WooCommerce transactional email.
The references worth keeping open while you work are the WooCommerce settings documentation for the Emails tab, and the WooCommerce developer portal for the email classes and status hooks named above.
Running WordPress that earns real money deserves an operator — Stack Harbor runs that stack under Enterprise WordPress; book an infrastructure consult.