Color code manual, system and customer notes

Closes #7225
This commit is contained in:
Mike Jolley 2016-02-08 11:39:31 +00:00
parent 5cae61cb69
commit efd0304bb0
3 changed files with 13 additions and 6 deletions

File diff suppressed because one or more lines are too long

View File

@ -1635,12 +1635,18 @@ ul.order_notes {
border-color: #efefef transparent;
}
}
li.customer-note {
.note_content {
background: #A7CEDC;
}
.note_content:after {
border-color: #A7CEDC transparent;
}
}
li.system-note {
.note_content {
background: #d7cad2;
}
.note_content:after {
border-color: #d7cad2 transparent;
}

View File

@ -45,9 +45,10 @@ class WC_Meta_Box_Order_Notes {
foreach( $notes as $note ) {
$note_classes = get_comment_meta( $note->comment_ID, 'is_customer_note', true ) ? array( 'customer-note', 'note' ) : array( 'note' );
$note_classes = apply_filters( 'woocommerce_order_note_class', $note_classes, $note );
$note_classes = array( 'note' );
$note_classes[] = get_comment_meta( $note->comment_ID, 'is_customer_note', true ) ? 'customer-note' : '';
$note_classes[] = $note->comment_author === __( 'WooCommerce', 'woocommerce' ) ? 'system-note' : '';
$note_classes = apply_filters( 'woocommerce_order_note_class', array_filter( $note_classes ), $note );
?>
<li rel="<?php echo absint( $note->comment_ID ) ; ?>" class="<?php echo esc_attr( implode( ' ', $note_classes ) ); ?>">
<div class="note_content">