Email template Hook not working when customer orders via PayPal Checkout
-
Hi,
I’m hooking into the WooCommerce email templates with following function.
function email_add_content( $order, $sent_to_admin, $plain_text, $email ) { $order_id = $order->id; $user_id = $order->get_user_id(); if ( $sent_to_admin ) { if ( empty($user_id) ) { // Guest echo '<h2 style="color: #bea055; display: block; font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif; font-size: 18px; font-weight: bold; line-height: 130%; margin: 16px 0 8px; text-align: left;">Gastbestellung</h2><p style="margin: 0 0 16px;">Diese Bestellung ist eine Gastbestellung. '; } } } add_action( 'woocommerce_email_before_order_table', 'email_add_content', 20, 4 );
The code works perfectly but not if the customer orders via WooCommerce Checkout.
Do you have any clue why?
Sincerely,
MaximThe page I need help with: [log in to see the link]
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Email template Hook not working when customer orders via PayPal Checkout’ is closed to new replies.