Add additional meta placeholder in customer completed email
-
I’ve been trying to get an additional field that shows whether someone chose to attend an event online OR in-person, onto our customer completed orders because our registrars are getting emails asking to confirm their choices. I figure a placeholder would be the easiest way to accomplish this. I tried editing the email template and putting it into my child theme to no avail.
I found this and changed it to the second one pasted in. Ben wrote this 2 years ago:
add_filter( 'kadence_woomail_order_body_text', 'custom_function_for_billing_email', 10, 2 ); function custom_function_for_billing_email( $text, $order ) { if ( is_a( $order, 'WC_Order' ) ) { $text = str_replace( '{billing_email}', $order->get_billing_email(), $text ); } return $text; }
Here’s my feeble attempt. I really don’t know what I’m supposed to do here, so I would love some advice:
add_filter( 'kadence_woomail_order_body_text', ‘customer_email_hybrid_venue, 10, 2 ); — registering the function here function customer_email_hybrid_venue( $text, $order ) { if ( is_a( $order, 'WC_Order' ) ) { $text = str_replace( ‘{customer_completed_order_email}', $order->get_additional_wooccm0(), $text ); } return $text; }
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Add additional meta placeholder in customer completed email’ is closed to new replies.