Customer Notifications for Cancelled or Failed Orders WordPress Function
What it does?
-
Listens to status changes: Runs whenever an order transitions to cancelled or failed.
-
Validates recipient: Uses the order’s billing email only if it’s a valid address.
-
Triggers native templates: Sends WooCommerce’s built-in Cancelled Order or Failed Order customer emails.
-
Prevents duplicates: Marks the order after sending and skips any repeat attempts.
Why it’s useful?
-
Clear, timely communication: Customers are notified immediately about payment issues or cancellations.
-
Less support friction: Fewer “what happened to my order?” tickets.
-
Consistent branding: Reuses your WooCommerce email templates and settings.
-
Safe by design: Guardrails avoid double-sending and noisy inboxes.
