WooCommerce预订电子邮件模板

I'm trying to customize an email template for WooCommerce and we're using the WooCommerce booking plugin. I'm trying to display the attributes in the email but I'm having difficulty doing so.

I tried to use get_the_terms($product->ID,'pa_attribute') but it doesn't seem to work. I think it's because the email template is not able to get the product ID. The only ID that outputs for me is the $order->ID which is not really what I need.

How I can get the resource product ID of an order in WooCommerce Booking email?

Got it fixed. Thanks to @helgatheviking. Here's my code.

    `$order = wc_get_order( $order->id );  $order = $order->get_items();  $productid = $orderdd[16]["product_id"];  $attdata = wp_get_post_terms($productid,'pa_attributeslug');  foreach ( $attdata as $data ) {  echo $data->name;}`