嗨,我在尝试在礼品通知电子邮件中显示某些订单详细信息时遇到问题 . 我基本上希望他们看到为他们购买了什么礼物{产品名称}并且有一个关联产品的链接,以便他们可以用他们的凭证购买 . 我不希望他们看到商品的价格,只看产品本身 . 我目前的情况如下 . 它目前发送但我无法弄清楚如何获取产品名称和正确的链接到电子邮件 .

我有{产品购买}我想要的商品名称,然后是产品的链接 .

它们是两种不同的产品 . 购买的是凭证,但要求保证的是特定产品,不确定如何连接它们 . 但我很乐意让它显示购买的优惠券的名称 .

<?php
if (!defined('ABSPATH'))
    exit; // Exit if accessed directly

/**
 * Gift Notification
 *
 * Type : HTML
 *
 * $first_name          : displays the first name of customer
 * $last_name           : displays the last name of customer
 * $recipient_name      : displays the recipient name
 * $product_price           : displays the product price
 * $voucher_link        : displays the voucher download link
 * $recipient_message   : displays the recipient message
 *
 * @package WooCommerce - PDF Vouchers
 * @since 2.3.4
 */
?>

<?php do_action('woocommerce_email_header', $email_heading); ?>

<p><?php _e("Hey there $recipient_name,", 'woovoucher'); ?></p>

<p><?php _e("$first_name $last_name sent you a gift. Arent they just the nicest?", 'woovoucher'); ?></p>

<p><?php _e("$first_name  sent you a gift. Arent they just the nicest?", 'woovoucher'); ?></p>

<p><?php echo $recipient_message; ?></p>

<h2><?php _e("Your Gift: {PRODUCT PURCHASED}.", 'woovoucher'); ?></h2>

<h2><?php echo ("How To Redeem:"); ?></h2>

<p><?php echo ('Please enter the code below into the coupon code field on checkout') ?></p>
  <div style="padding: 20px; border: 1px solid black; width: 70%; margin-bottom: 20px;">
    <p style="text-align: center; font-size: 12px; margin:0px;"><?php echo ("Your Gift Code:"); ?></p>
    <h2 style="text-align:center; margin:0px;"><?php echo do_shortcode( '[vou_codes]' ); ?></h2>
  <div>
<?php do_action('woocommerce_email_footer'); ?>