如何在Wooccommerce电子邮件中插入账单详细信息


How to insert billing details into Woocommerce email?

我想知道如何在Wooccommerce电子邮件中插入账单详细信息(姓名、电子邮件和电话号码)?

这是我用来发送电子邮件的Wooccommerce预约插件的代码:

<?php do_action( 'woocommerce_email_header', $email_heading ); ?>
<?php if ( $appointment->get_order() && $appointment->get_order()->billing_first_name && $appointment->get_order()->billing_last_name ) : ?>
<p><?php printf( $opening_paragraph, $appointment->get_order()->billing_first_name . ' ' . $appointment->get_order()->billing_last_name ); ?></p>
<?php endif; ?>
<table>
<tbody>
    <?php if ( $appointment->has_staff() && ( $staff = $appointment->get_staff_member() ) ) : ?>
        <tr>
            <th scope="row"><?php _e( 'Appointment Provider', 'woocommerce-appointments' ); ?></th>
            <td><?php echo $staff->display_name; ?></td>
        </tr>
    <?php endif; ?>
    <tr>
        <th scope="row"><?php _e( 'Appointment Date', 'woocommerce-appointments' ); ?></th>
        <td><?php echo $appointment->get_start_date( wc_date_format(), '' ); ?></td>
    </tr>
    <tr>
        <th scope="row"><?php _e( 'Appointment Time', 'woocommerce-appointments' ); ?></th>
        <td><?php echo $appointment->get_start_date( '', get_option( 'time_format' ) ) . ' &mdash; ' . $appointment->get_end_date( '', get_option( 'time_format' ) ); ?></td>
    </tr>
    <tr>
        <th scope="row"><?php _e( 'Appointment Time', 'woocommerce-appointments' ); ?></th>
        <td><?php echo $appointment->get_start_date( '', get_option( 'time_format' ) ) . ' &mdash; ' . $appointment->get_end_date( '', get_option( 'time_format' ) ); ?></td>
    </tr>
</tbody>
</table>
<?php do_action( 'woocommerce_email_footer' ); ?>

我想将姓名、电子邮件和电话插入其中(例如客户姓名):

<tr>
<th scope="row"><?php _e( 'Customer Email', 'woocommerce-appointments' ); ?></th>
<td>**HERE**</td>
</tr>

如果有人能帮忙,我将不胜感激。

谢谢。

感谢您的回答。不幸的是,两者都不起作用。但我设法以一种非常简单的方式输出了姓名、电子邮件和电话:

echo $appointment->get_order()->billing_first_name . ' ' . $appointment->get_order()->billing_last_name;
echo $appointment->get_order()->billing_email;
echo $appointment->get_order()->billing_phone;