【问题标题】:How to customize woocommerce product order email table?如何自定义 woocommerce 产品订单电子邮件表?
【发布时间】:2016-11-23 07:39:56
【问题描述】:

我是 woocommerce 的初学者,我已经从 /themes/mytheme/woocommerce/emails/email-order-details.php 和 /themes/mytheme/woocommerce/emails/email- 的电子邮件模板中删除了 Quantity 列及其值订单items.php 通过简单的注释如下代码

<th class="td" scope="col" style="text-align:left;"><?php _e( 'Product', 'woocommerce' ); ?></th>

        <!--<th class="td" scope="col" style="text-align:left;"><?php _e( 'Quantity', 'woocommerce' ); ?></th>-->
        <th></th>
        <th class="td" scope="col" style="text-align:left;"><?php _e( 'Price', 'woocommerce' ); ?></th>

之后

<tr>
        <th class="td" scope="col" style="text-align:left;"><?php _e( 'Product', 'woocommerce' ); ?></th>

        <th class="td" scope="col" style="text-align:left;"><?php /*_e( 'Quantity', 'woocommerce' ); */ ?></th>

        <th class="td" scope="col" style="text-align:left;"><?php _e( 'Price', 'woocommerce' ); ?></th>
    </tr>

看起来像

【问题讨论】:

  • 不要注释整行,只需删除 PHP 标记之间的部分。

标签: php email templates woocommerce html-table


【解决方案1】:

删除完整的价格html代码和php代码:

<th class="td" scope="col" style="text-align:left;"><?php _e( 'Product', 'woocommerce' ); ?></th>
    <th class="td" scope="col" style="text-align:left;"><?php _e( 'Price', 'woocommerce' ); ?></th>

【讨论】:

  • @Pravin,如果你像上面一样删除完整的代码怎么办?
  • Thnaks..我的问题已经解决,这是由于下一行的 rowspan 属性。
猜你喜欢
  • 1970-01-01
  • 2016-03-03
  • 2020-12-29
  • 2021-02-10
  • 2021-01-29
  • 2018-08-29
  • 2022-01-10
  • 1970-01-01
  • 2020-11-11
相关资源
最近更新 更多