Advanced Custom Fields in WooCommerce Email templates
问题 I am using Advanced Custom Fields (ACF) plugin in WooCommerce and I have set a custom field named "tracking-no". How can I display the value of this custom field in the Woocommerce template emails/customer-completed-order.php ? I am using this code: <?php if(get_field('tracking-no')) { echo '<p>' . get_field('tracking-no') . '</p>'; } ?> But I doesn't get anything. Thanks 回答1: In your WooCommerce template you should get first the order ID as argument in get_field(): <?php // Get the $order ID