Support » Plugin: WooCommerce » WC 3.1.1: Duplicate order notification e-mails when auto-completing orders

  • All of our products are virtual, so we implemented an auto-complete orders function

    add_action( 'woocommerce_thankyou', 'custom_woocommerce_auto_complete_order' );

    that changes orders paid by PayPal from “Processing” to “Complete.” Prior to WooCommerce 3.1.1, we would receive a single order notification e-mail for each order.

    Beginning with WooCommerce 3.1.1, we are receiving TWO order notification emails for each order: one order notification e-mail when the order status changes to “Processing” and then another order notification e-mail when the order status changes to “Complete” (changed by our function).

    Is this new behavior intentional? If so, is there a way to disable this second order notification, so that we only receive the order notification when the order status changes to “Processing?”

    Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Anonymous User 13528887

    (@anonymized-13528887)

    Hi,

    WooCommerce comes with a hook woocommerce_email which you can utilize to remove “woocommerce_order_status_pending_to_completed_notification” action.

    For more information:
    https://docs.woocommerce.com/document/unhookremove-woocommerce-emails/

    You can manage emails in the Emails tab of Woocommerce settings. Turn off notification for the event where you dont need it.

    Thread Starter deeveedee

    (@deeveedee)

    Thank you for the replies. Email notifications for “New Orders” is enabled in WooCommerce settings (it is the only enabled notification), so the removal of “woocommerce_order_status_pending_to_completed_notification” might “fix” this unwanted additional notification. Given my WooCommerce e-mail settings, I would expect only a single e-mail notification from WooCommerce.

    Since I like to understand the root cause of any website behavioral changes (to make sure it’s not something that I’ve done) and since I didn’t need to remove the extra order status notification prior to WC 3.1.1, is the additional notification something new in WC 3.1.1? I looked at the WC change log and didn’t see anything that would change this behavior.

    Thank you.

    • This reply was modified 6 years, 8 months ago by deeveedee.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘WC 3.1.1: Duplicate order notification e-mails when auto-completing orders’ is closed to new replies.