Different text for different order emails
-
Hello
How to insert different text on invoice depending on order email template (or by email status) with free plugin version if possible?
For example: put ‘text 1’ on the invoice if it’s Processing order email template, and put ‘text 2’ on the invoice if it’s a Cancelled order email template/status. Also to change the filename depending on these two.I’ve tried something like
add_action( 'wpo_wcpdf_after_order_data', 'insert_text', 10, 2 ); function insert_text( $template_type, $order ) { if ( $order->get_status() == 'cancelled' && $template_type == 'invoice' ) { ?> <p>text2</p> <?php } }
but didn’t work
- The topic ‘Different text for different order emails’ is closed to new replies.