In Woocommerce, I would like remove the column Quantity from email notifications like in the screenshot below:
Any help is appreciated.
In Woocommerce, I would like remove the column Quantity from email notifications like in the screenshot below:
Any help is appreciated.
This can be done Overriding the following WooCommerce Templates via a Theme.
The related templates are email/email-order-items.php
and emails/email-order-details.php
.
Once you have copied this template to yourtheme/woocommerce/emails/email-order-items.php
and also yourtheme/woocommerce/emails/email-order-details.php
open edit it them:
1) For the template 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) For the template 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>
Save both templates, you are done⦠You will get something like: