[order completed] Different Email contents for specific Payment method
-
Hello,
Thanks Woo for bringing us such a awesome plugin
I have a question. I use a payment method called, “Invoice Payment” with this plugin . I need to send custom HTML invoice after i click on “Complete” button in Orders for only that payment method.
So my question is how can i check the payment method and how can i send the email programatically? Maybe something like this:
add_action( 'woocommerce_order_status_completed', 'orderCompleted' ); function orderCompleted($order_id) { // order object (optional but handy) $order = new WC_Order( $order_id ); $payment_method = get_post_meta( $order_id, '_payment_method_title', TRUE ); // do some stuff here, but i have no idea know how to send the custom email and prevent the default one?? Hmm am i wrong? }
Thanks for taking a look at my issue
Best Regards,
Darko
- The topic ‘[order completed] Different Email contents for specific Payment method’ is closed to new replies.