Show custom product field in new order email
<p>i created a custom field in a product called <strong>course-date</strong>. I asissnged it a date e.g Jan 30. This is what I have in the email yet nothing shows.. am i missing something? code edited with new snippet below</p>

<p><a href="https://i.stack.imgur.com/t3GrM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/t3GrM.png" alt="enter image description here"></a></p>

<pre><code>    &lt;?php
/**
 * Customer processing order email
 *
 * @author      WooThemes
 * @package     WooCommerce/Templates/Emails
 * @version     2.4.0
 */

if ( ! defined( 'ABSPATH' ) ) {
    exit; // Exit if accessed directly
}

?&gt;

&lt;?php
$items = $order-&gt;get_items();
foreach ( $items as $item ) {
    $product_name = $item['name'];
    $product_id = $item['product_id'];
    $product_variation_id = $item['variation_id'];
    $course_date=get_post_meta($product_id, 'course-date', true);
    //Note $course_date will get overwritten if there are more than one items in the order.
}
?&gt;

&lt;?php do_action('woocommerce_email_header', $email_heading); ?&gt;

&lt;p&gt;This email is to notify you of your recent registration for the &lt;b&gt;Level 1 - Think and Grow Rich Institute Course&lt;/b&gt;!&lt;/p&gt;

&lt;p&gt;You are registered to attend on:&lt;/p&gt;

&lt;p&gt;&lt;?php printf( __( '&lt;b&gt;Registration ID:&lt;/b&gt; %s', 'woocommerce' ), $order-&gt;get_order_number() ); ?&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Course Registration Date:&lt;/b&gt; &lt;?php echo get_post_meta($post-&gt;id, 'course-date', true); ?&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Time:&lt;/b&gt; 8am Registration - 9am Event Begins (&lt;a href="http://allfansnomoney.com/thinkandgrowrich/tentative-schedule/" target="_blank"&gt;See Full Schedule&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Location:&lt;/b&gt; 240 Belfield Rd, Toronto, ON M9W 1H3&lt;/p&gt;

&lt;p&gt;If you have any questions please contact us by e-mail: &lt;a href="mailto:contact@thinkandgrowrichinstitute.com"&gt;contact@thinkandgrowrichinstitute.com&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Sincerely,&lt;BR/&gt;
The Think and Grow Rich Institute Team&lt;/p&gt;&lt;BR/&gt;

&lt;p&gt;&lt;em&gt;&lt;b&gt;"Whatever The Mind Can Conceive and Believe, It Will Achieve."&lt;/b&gt; - Napoleon Hill&lt;/em&gt;&lt;/p&gt;

&lt;?php do_action( 'woocommerce_email_before_order_table', $order, $sent_to_admin, $plain_text ); ?&gt;

&lt;?php do_action( 'woocommerce_email_after_order_table', $order, $sent_to_admin, $plain_text ); ?&gt;

&lt;?php do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text ); ?&gt;

&lt;?php do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text ); ?&gt;

&lt;?php do_action( 'woocommerce_email_footer' ); ?&gt;
</code></pre>