I'm trying to use Woocommerce hooks to make changes in specific email templates. I'd like to override the text in customer-processing-order.php
and customer-completed-order.php
in my functions.php
file. Here is the code I am using:
add_action( 'woocommerce_email_customer_details', 'hitt_processing_customer_email', 10, 4 );
function hitt_processing_customer_email( $order, $sent_to_admin, $plain_text, $email ) {
if( 'customer_processing_order' == $email->id ){
echo '<p>My custom content here</p>';
}
if( 'customer_completed_order' == $email->id ){
echo '<p>My custom content here</p>';
}
}
But this doesn't seem to be working. I set myself as the customer and when I got the "your order is being processed" email, it did not have the custom text added. What am I doing wrong?