html-order-download-permission.php
6 years ago
html-order-fee.php
3 months ago
html-order-item-meta.php
4 years ago
html-order-item.php
9 months ago
html-order-items.php
1 month ago
html-order-notes.php
1 month ago
html-order-refund.php
3 months ago
html-order-shipping.php
3 months ago
html-product-attribute-inner.php
1 month ago
html-product-attribute.php
3 years ago
html-product-data-advanced.php
5 months ago
html-product-data-attributes.php
1 month ago
html-product-data-general.php
2 months ago
html-product-data-inventory.php
4 months ago
html-product-data-linked-products.php
3 months ago
html-product-data-panel.php
1 year ago
html-product-data-shipping.php
3 years ago
html-product-data-variations.php
1 month ago
html-product-download.php
4 months ago
html-product-variation-download.php
4 months ago
html-variation-admin.php
1 month ago
html-order-notes.php
67 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Order notes HTML for meta box. |
| 4 | * |
| 5 | * @package WooCommerce\Admin |
| 6 | */ |
| 7 | |
| 8 | defined( 'ABSPATH' ) || exit; |
| 9 | |
| 10 | ?> |
| 11 | <ul class="order_notes"> |
| 12 | <?php |
| 13 | if ( $notes ) { |
| 14 | foreach ( $notes as $note ) { |
| 15 | $css_class = array( 'note' ); |
| 16 | $css_class[] = $note->customer_note ? 'customer-note' : ''; |
| 17 | $css_class[] = 'system' === $note->added_by ? 'system-note' : ''; |
| 18 | $css_class = apply_filters( 'woocommerce_order_note_class', array_filter( $css_class ), $note ); |
| 19 | ?> |
| 20 | <li rel="<?php echo absint( $note->id ); ?>" class="<?php echo esc_attr( implode( ' ', $css_class ) ); ?>"> |
| 21 | <div class="note_content"> |
| 22 | <?php if ( $note->customer_note ) : ?> |
| 23 | <div class="note_header"><?php esc_html_e( 'Sent to customer', 'woocommerce' ); ?></div> |
| 24 | <?php endif; ?> |
| 25 | <div class="note_body"> |
| 26 | <?php |
| 27 | $content = wp_kses_post( $note->content ); |
| 28 | $content = wc_wptexturize_order_note( $content ); |
| 29 | // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped -- the content goes through wp_kses_post above. |
| 30 | echo wpautop( $content ); |
| 31 | ?> |
| 32 | </div> |
| 33 | </div> |
| 34 | <p class="meta"> |
| 35 | <abbr class="exact-date" title="<?php echo esc_attr( $note->date_created->date( 'Y-m-d H:i:s' ) ); ?>"> |
| 36 | <?php |
| 37 | /* translators: %1$s: order note date, %2$s: order note time */ |
| 38 | echo esc_html( sprintf( __( '%1$s at %2$s', 'woocommerce' ), $note->date_created->date_i18n( wc_date_format() ), $note->date_created->date_i18n( wc_time_format() ) ) ); |
| 39 | ?> |
| 40 | </abbr> |
| 41 | <?php |
| 42 | if ( 'system' !== $note->added_by ) : |
| 43 | /* translators: %s: order note author */ |
| 44 | echo esc_html( sprintf( ' ' . __( 'by %s', 'woocommerce' ), $note->added_by ) ); |
| 45 | endif; |
| 46 | ?> |
| 47 | <?php |
| 48 | $note_date_label = $note->date_created->date_i18n( wc_date_format() ); |
| 49 | $delete_aria_label = 'system' === $note->added_by |
| 50 | /* translators: %s: order note date */ |
| 51 | ? sprintf( __( 'Delete system note from %s', 'woocommerce' ), $note_date_label ) |
| 52 | /* translators: %1$s: order note author, %2$s: order note date */ |
| 53 | : sprintf( __( 'Delete note from %1$s on %2$s', 'woocommerce' ), $note->added_by, $note_date_label ); |
| 54 | ?> |
| 55 | <a href="#" class="delete_note" role="button" aria-label="<?php echo esc_attr( $delete_aria_label ); ?>"><?php esc_html_e( 'Delete', 'woocommerce' ); ?></a> |
| 56 | </p> |
| 57 | </li> |
| 58 | <?php |
| 59 | } |
| 60 | } else { |
| 61 | ?> |
| 62 | <li class="no-items"><?php esc_html_e( 'There are no notes yet.', 'woocommerce' ); ?></li> |
| 63 | <?php |
| 64 | } |
| 65 | ?> |
| 66 | </ul> |
| 67 |