在Woocommerce中,我想要像下面截图中那样从电子邮件通知中删除“数量”列:
非常感谢您的帮助。
email/email-order-items.php
和emails/email-order-details.php
。yourtheme/woocommerce/emails/email-order-items.php
和yourtheme/woocommerce/emails/email-order-details.php
后,打开并编辑它们:email/email-order-items.php
:
Change on line 78 <td colspan="3"
to <td colspan="2"
Remove the following code block from line 66 to 68:
<td class="td" style="text-align:<?php echo esc_attr( $text_align ); ?>; vertical-align:middle; font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif;">
<?php echo wp_kses_post( apply_filters( 'woocommerce_email_order_item_quantity', $item->get_quantity(), $item ) ); ?>
2)对于模板email/email-order-details.php
:
Change on line 70 <th class="td" scope="row" colspan="2"
to <th class="td" scope="row"
Change on line 79 <th class="td" scope="row" colspan="2"
to <th class="td" scope="row"
Remove the code block from line 45:
<th class="td" scope="col" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php esc_html_e( 'Quantity', 'woocommerce' ); ?></th>
保存这两个模板,完成了…你会得到类似于: