Woocommerce customer email issue : order Notes not showing up

Jan 12, 2017
admin

The Order Notes panel in Woo backend displays notes attached to the order and can be used for storing event details, such as payment results or reducing stock levels, or adding notes to the order for customers to view. Some payment gateways also add notes for debugging.

Notes can be a powerful tool for communicating with customers. Need to add a tracking number for shipping? Is stock delayed? Add a customer note and they are automatically notified.

When added, customer notes are highlighted in purple. Customers receive notes via email, but can view them by viewing an order, or using the WooCommerce order tracking page.

That’s the theory…recently we had an issue that our customers receive Order Note emails without notes implemented. Actually, instead of notes there were shown just two words: “lorem ipsum”?

A template used for this kind of emails is located in your Woocommerce plugin folder as /templates/emails/customer-note.php

In order to edit this file, you can select “Copy to theme folder” option from your Woo backend or you can manually copy this file into your theme preserving the folder structure: theme_folder/woocommerce/templates/emails/customer-note.php

All future edits are made to the file in your theme folder in order to overwrite woo default file and to prevent lost of your file edits with plugin updates.

customer-note.php   line 28

<p><?php _e( "Hello, a note has just been added to your order:", 'woocommerce' ); ?></p>

<blockquote><?php echo wpautop( wptexturize( $customer_note ) ) ?></blockquote>

you can change to something like this in order to display all order notes:

<?php if ( $notes = $order->get_customer_order_notes() ) : ?>
 <h2><?php _e( 'order notes', 'woocommerce' ); ?></h2>
 <p><?php _e( "Hello, a note has just been added to your order:", 'woocommerce' ); ?></p>
 <ol class="woocommerce-OrderUpdates commentlist notes">
 <?php foreach ( $notes as $note ) : ?>
 <li class="woocommerce-OrderUpdate comment note">
 <div class="woocommerce-OrderUpdate-inner comment_container">
 <div class="woocommerce-OrderUpdate-text comment-text">
 <p class="woocommerce-OrderUpdate-meta meta"><?php echo date_i18n( __( 'l jS \o\f F Y, h:ia', 'woocommerce' ), strtotime( $note->comment_date ) ); ?></p>
 <div class="woocommerce-OrderUpdate-description description">
 <blockquote><?php echo wpautop( wptexturize( $note->comment_content ) ); ?></blockquote>
 </div>
 <div class="clear"></div>
 </div>
 <div class="clear"></div>
 </div>
 </li>
 <?php endforeach; ?>
 </ol>
<?php endif; ?>

As you can see this code is pretty simple, nothing really complex, so you can easily customize it.

Well, I hope you enjoyed that post, please leave a comment in the form below, I’d love to get your feedback about it!

No comments

Leave a Reply

Your email address will not be published. Required fields are marked *