Custom text in ‘Delivered’ email
-
With AST and TrackShip’s delivery reporting, I use the code below in functions.php to add a line to all woo emails.
It works great for all email types (Processing, Shipped, etc) EXCEPT “Delivered” (nothing happens).
——————–
add_action( ‘woocommerce_email_order_details’, ‘custom_email_order_details’, 10, 4 );
function custom_email_order_details( $order, $sent_to_admin, $plain_text, $email ) {
$order_id = method_exists( $order, ‘get_id’ ) ? $order->get_id() : $order->id;
$pymt_proc_acct = get_post_meta( $order->get_order_number(), ‘pymt_proc_acct’, true );
echo ‘<div>Your bank will show a charge from ‘.$pymt_proc_acct.'</div>’;
}——————–
The email sent when status is set to “Delivered” appears to not utilize the same action hook.
Any ideas on a low footprint way (no extra plugins) to embed a custom text into the Delivered email?
thanks!
- The topic ‘Custom text in ‘Delivered’ email’ is closed to new replies.