How to format WooCommerce Emails?
-
Hi,
I have a long list of attributes for each product that I want to properly format when the details of an order is printed out in the emails.
Like for example, I have a tshirt product with maybe colors and sizes and many more details. Is it possible to make sure each variations that is printed out in the email to have its own classes so that I can break into sections or something of that sort? Right now, the emails are being printed out like this:
My T-Shirt Attribute #1: Attribute #1 Value Attribute #2: Attribute #2 Value Attribute #3: Attribute #3 Value Attribute #4: Attribute #4 Value Attribute #5: Attribute #5 Value
and I want something like this for easier readability:
My T-Shirt Attribute #1: Attribute #1 Value Attribute #2: Attribute #2 Value Attribute #3: Attribute #3 Value Attribute #4: Attribute #4 Value Attribute #5: Attribute #5 Value
I found the file where the variations is being printed out in folder woocommerce/emails/email-order-items.php and has something to do with lines 49-51 but I have no idea how to customize this to what I want:
// Variation if ( ! empty( $item_meta->meta ) ) { echo '<br/><small class="'.$item_meta->meta_key.'">' . nl2br( $item_meta->display( true, true, '_', "\n" ) ) . '</small>'; }
Is there any hooks , filters that will enable me to do any sort of formatting?
Thanks
- The topic ‘How to format WooCommerce Emails?’ is closed to new replies.