I am at my wits end here and have tried every solution I could find online for days and nothing works. The worst part is the problem should be solvable in about 4 lines of code but it just isn't working.
What I need:
When the order completed email goes out I want the order notes (not the customer notes, the actual Order Notes) added into the email. I can filter through them after but I cannot seem to get the notes to appear in the email at all. This is an example of an order note...on an order:

so far I have tried this code:
::PHP::
get_customer_order_notes();
if($comments){
echo '' . _e( 'Order Notes', 'woocommerce' ) . '
';
foreach($comments as $comment) {
echo $comment->comment_content . '
';
}
}
?>
which is basically what I need except its targeting the customer_order_notes, which are comments users add into the order when they place it. like: "my dog will pick up my package, his name is lucky"
I have also written a lugin to get the notes based off other peoples, the base is this:
::PHP::
add_action( 'woocommerce_email_order_meta', 'bl_add_order_notes_to_completed_email', 10 );
function bl_add_order_notes_to_completed_email() {
global $woocommerce, $post;
// If the order is not completed then don't continue.
// if ( get_post_status( $post->ID ) != 'wc-completed' ){
// return false;
// }
$args = array(
'post_id' => $post->ID,
'status' => 'approve',
'type' => 'order_note'
);
// Fetch comments
$notes = get_comments( $args );
echo '' . _e( 'Order Notes', 'woocommerce' ) . '
';
echo '';
// Check that there are order notes
if ( $notes ) {
// Display each order note
foreach( $notes as $note ) {
?>
-
comment_content ) ); ?>
';
}
I don't really know why that isnt working. It looks like it should but it does nothing.
If anyne has a solution that will print those notes into my email...like seen in this image...I will love you forever.
