$post->ID,
'orderby' => 'comment_ID',
'order' => 'DESC',
'approve' => 'approve',
'type' => 'order_note',
);
remove_filter( 'comments_clauses', array( 'WC_Comments', 'exclude_order_comments' ), 10, 1 );
$notes = get_comments( $args );
add_filter( 'comments_clauses', array( 'WC_Comments', 'exclude_order_comments' ), 10, 1 );
echo '
';
if ( $notes ) {
foreach ( $notes as $note ) {
$note_classes = array( 'note' );
$note_classes[] = get_comment_meta( $note->comment_ID, 'is_customer_note', true ) ? 'customer-note' : '';
$note_classes[] = ( __( 'WooCommerce', 'woocommerce' ) === $note->comment_author ) ? 'system-note' : '';
$note_classes = apply_filters( 'woocommerce_order_note_class', array_filter( $note_classes ), $note );
?>
-
comment_content ) ) ); ?>
comment_date ) ), date_i18n( wc_time_format(), strtotime( $note->comment_date ) ) ); ?>
comment_author ) : ?>
comment_author ); ?>
' . __( 'There are no notes yet.', 'woocommerce' ) . '';
}
echo '
';
?>