Home › Forums › General Issues › Displaying values in woocommerce emails › Reply To: Displaying values in woocommerce emails
I can’t recall ever seeing a topic on trying to put acf values into emails, so this is just a guess. You probably need to include the post ID of where to get the value from, for example the post ID of the order post, and I don’t know if that information is available where you are generating the email. Does WC pass the order/post ID to the mail function?
$tracking = get_field('tracking-code', $post_id);
$carrier = get_field('carrier-name', $post_id);
$date = get_field('pickup_date', $post_id);
<p>Your order has been picked up by <?php echo $carrier; ?> on <?php echo $date; ?>. Your tracking code is <?php echo $tracking; ?>.</p>
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.