I am currently trying to add new custom emails to the woocommerce emails list. I have followed the instructions from this link : https://www.skyverge.com/blog/how-to-add-a-custom-woocommerce-email/
I use a custom action for this email (ch_deadline) which I trigger with this in my plugin:
add_action( 'ch_deadline_notification', array( $this, 'trigger' ) );
As I have seen in this post : WooCommerce - send custom email on custom order status change, I need to add it to the woocommerce email actions :
add_filter( 'woocommerce_email_actions', 'add_deadline_email_actions' ); // WC 2.3+
function add_deadline_email_actions( $email_actions ) {
$email_actions[] = 'ch_deadline';
return $email_actions;
}
In the front-end, it works well, it display my new email in the list. Unfortunately the email has never been sent. I have read a lot of post about this problem but none of the proposed solutions resolved the problem
I have even tried to add directly my action in $email_actions list in class-wc-emails.php
If you have any ideas, I'm more than interested !
Thanks !