leon0021et
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] Remove Purchase note in Order Complete EmailYes, I understood the location of file to edit. But actually, I have found that my email templates:
customer-on-hold-order.php
customer-processing-order.php
customer-completed-order.phpThe above 3 templates have the same action coding. The only difference is the message at the email table head like (hello! Your order is processing / hi! Your order is complete etc). The middle to the end part of coding are the same which all have the action:
woocommerce_email_order_details
woocommerce_email_order_meta
woocommerce_email_customer_details
woocommerce_email_footerAlthough they have the same coding, when testing, the email sent to client is:
the “Order on-hold email” does NOT show the Purchase Note while the “Order Processing Email” and “Order Complete Email” both show the Purchase Note of the product.
I realized that it is the action “woocommerce_email_order_details” that displays the order detail table as well as the Purchase Note inside.
And now, I would like to change my “Order Complete Email” to like the “Order on-hold Email”, which does NOT show the Purchase Note.
Sorry for being complicated but really need help of that. Thank you!
Forum: Plugins
In reply to: [WooCommerce] Remove Purchase note in Order Complete EmailThanks for your help. However, if I want the “Purchase note” to be included in the “Order Processing Email” but just not in the “Order Completed Email”, how can I edit for that?
Now in my email-order-items.php, it is like this in the end of the code:
if ( $show_purchase_note && is_object( $_product ) && ( $purchase_note = get_post_meta( $_product->id, ‘_purchase_note’, true ) ) ) : ?>
<tr>
<td colspan=”3″ style=”text-align:left; vertical-align:middle; border: 1px solid #eee; font-family: ‘Helvetica Neue’, Helvetica, Roboto, Arial, sans-serif;”><?php echo wpautop( do_shortcode( wp_kses_post( $purchase_note ) ) ); ?></td>
</tr>
<?php endif; ?><?php endforeach; ?>