Skip to content

Instantly share code, notes, and snippets.

@dennisnissle
Created February 26, 2019 09:45
Show Gist options
  • Save dennisnissle/b7bea677df5c80a18a8e5659ee5dfb74 to your computer and use it in GitHub Desktop.
Save dennisnissle/b7bea677df5c80a18a8e5659ee5dfb74 to your computer and use it in GitHub Desktop.
Send order paid email as on-hold to processing notification
<?php
add_action( 'woocommerce_email', 'my_child_setup_email_notification', 10, 1 );
function my_child_setup_email_notification( $mailer ) {
$mails = $mailer->get_emails();
if ( isset( $mails['WC_GZD_Email_Customer_Paid_For_Order'] ) ) {
add_action( 'woocommerce_order_status_on-hold_to_processing_notification', array( $mails['WC_GZD_Email_Customer_Paid_For_Order'], 'trigger' ), 30 );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment