In Woocommerce, I am trying to edit the email template for customer invoice email and I don't know how to write the right code to show the product name and time. How this can be done?
Any help will be appreciated.
Here is my code (added to function.php file):
add_action( 'woocommerce_email_after_order_table', 'add_content_specific_email', 20, 4 );
function add_content_specific_email( $order, $sent_to_admin, $plain_text, $email ) {
if ( $email->id == 'customer_invoice' ) {
echo '<a href="http://www.google.com/calendar/event?action=TEMPLATE&text=[LocalRunners]$item_name"><h2 class="email-upsell-title"> Add to my calendar</h2></a>';
}
}