facebook-for-woocommerce
facebook-for-woocommerce copied to clipboard
Disabling WooCommerce Automated Notifications for FB orders
The Order Management section of the documentation page indicates that for any orders originating from Facebook, we should disable automated email notifications sent by WooCommerce (WordPress.com site)
Any automated emails sent out to communicate order status, refunds, etc, should be disabled for all Facebook orders. Facebook will send emails to customers directly and any additional emails would be duplicative, leading to a negative customer experience.
There are, however, no steps mentioned regarding how to have this disabled. If this is a strict Facebook requirement, the plugin should suppress any order notifications from being sent from the website.
Related Forums discussion: https://wordpress.org/support/topic/disabling-transaction-emails
Continued forums dicussion: https://wordpress.org/support/topic/disabling-transaction-emails-2/
There are filters in place that are supposed to handle this.
// prevent sending emails for Commerce orders
add_action( 'woocommerce_email_enabled_customer_completed_order', array( $this, 'maybe_stop_order_email' ), 10, 2 );
add_action( 'woocommerce_email_enabled_customer_processing_order', array( $this, 'maybe_stop_order_email' ), 10, 2 );
add_action( 'woocommerce_email_enabled_customer_refunded_order', array( $this, 'maybe_stop_order_email' ), 10, 2 );
add_action( 'woocommerce_email_enabled_customer_partially_refunded_order', array( $this, 'maybe_stop_order_email' ), 10, 2 );
The function checks if it is a commerce order from facebook or instagram
https://github.com/woocommerce/facebook-for-woocommerce/blob/master/includes/Commerce/Orders.php#L108-L111
And optionally disables them.
https://github.com/woocommerce/facebook-for-woocommerce/blob/master/includes/Commerce/Orders.php#L880-L906
There is a filter that can be used to override wc_facebook_commerce_send_woocommerce_emails this.
I'd be interested in hear if anyone has actually tested that there is an issue, the docs might just need to be updated
We've dropped support for Order Sync in #2390. So I will close this issue.