2

I have a request from a client to conditionally send an admin email from woocommerce based on some conditions. She's using the WooCommerce Subscriptions plugin and would only like to have an admin email sent to customers that are paying for a subscription (she grants subscriptions to clients manually that pay for other services).

After looking through the source for Wordpress wp_mail, WooCommerce WC_Email_New_Order class, and WooCommerce Subscriptions WCS_Email_New_Renewal_Order I can't find any explicit filters/actions available for me to hook into that would affect the sending of the email.

Is there a way, either within default Wordpress, default woocommerce, or default woocommerce-subscriptions to catch those emails and cancel the wp_mail if, in my case only, the order amount is $0.00?

I don't want to modify core plugin/Wordpress files for this.

AndrewL64
  • 15,794
  • 8
  • 47
  • 79
Rebecca Dessonville
  • 600
  • 1
  • 4
  • 17

0 Answers0