Add Script to Email Template
-
Hi,
I need to add a script to a processing email with some details from the order. Can I get some help with this please.
Atm I am trying to add this after the hook “do_action( ‘woocommerce_email_header’, $email_heading, $email ); ?>”
in “customer-processing-order.php”
global $order; $theSku = ''; foreach ( $order->get_items() as $item_id => $item ) { $sku = $item->get_sku(); $theSku .= $sku . ','; } $tSku = substr($theSku, 0,-1); echo '<script type="application/json+trustpilot"> { "recipientName": "'. $order->get_billing_first_name().'", "recipientEmail": "'. $order->get_billing_email().'", "referenceId": "'. $order->get_id().'", "productSkus": ["'.$tSku.'"] } </script>';Thanks
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Add Script to Email Template’ is closed to new replies.