Thanks for sending me link, but thats not exactly what I need. Second mail is for each order different. Second email is also filled in order by custommer. I can get it thru shortcode something like this [wcj_order_custom_field]…but how can I get it to mailing script?
-
This reply was modified 8 years, 7 months ago by
janbrokes.
You have the order object as a second argument in the function. Now that you know how to add a second email, get anything you need for the order and add your own logic.
thank you very much, but i can not figure out how to add variable…
this is not working 🙁
$emails = array(
'<?php get_post_meta( $order->id, 'order_wcj_checkout_field_15', true ); ?>',
);
Try this:
// WC < 3.0
$emails[] = get_post_meta( $order->id, 'order_wcj_checkout_field_15', true );
// WC > 3.0
$emails[] = $order->get_meta('order_wcj_checkout_field_15', true );
We haven’t heard back from you in a while, so I’m going to mark this as resolved. If you have any further questions, you can start a new thread.