Hi,
You can try the following code by putting in functions.php file of currently active theme or using Code Snippets plugin on backend:
add_action('wpinv_invoice_print_after_line_items', 'wpinv_invoice_print_after_line_items_cb', 10, 1);
function wpinv_invoice_print_after_line_items_cb($invoice){
if(!$invoice){
return;
}
$notes = wpinv_get_invoice_notes( $invoice->ID );
echo '<ul class="invoice_notes">';
if ( $notes ) {
foreach( $notes as $note ) {
$is_customer_note = get_comment_meta( $note->comment_ID, '_wpi_customer_note', true );
if($is_customer_note) {
?>
<li rel="<?php echo absint( $note->comment_ID ); ?>" class="">
<div class="note_content">
<?php echo wpautop( wptexturize( wp_kses_post( $note->comment_content ) ) ); ?>
</div>
</li>
<?php
}
}
}
echo '</ul>';
}
Let me know if it helps or not.
Regards,
Patrik