Nenhuma Descrição

class-wc-meta-box-order-notes.php 1.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. /**
  3. * Order Notes
  4. *
  5. * @package WooCommerce\Admin\Meta Boxes
  6. */
  7. if ( ! defined( 'ABSPATH' ) ) {
  8. exit;
  9. }
  10. /**
  11. * WC_Meta_Box_Order_Notes Class.
  12. */
  13. class WC_Meta_Box_Order_Notes {
  14. /**
  15. * Output the metabox.
  16. *
  17. * @param WP_Post $post Post object.
  18. */
  19. public static function output( $post ) {
  20. global $post;
  21. $args = array(
  22. 'order_id' => $post->ID,
  23. );
  24. $notes = wc_get_order_notes( $args );
  25. include __DIR__ . '/views/html-order-notes.php';
  26. ?>
  27. <div class="add_note">
  28. <p>
  29. <label for="add_order_note"><?php esc_html_e( 'Add note', 'woocommerce' ); ?> <?php echo wc_help_tip( __( 'Add a note for your reference, or add a customer note (the user will be notified).', 'woocommerce' ) ); ?></label>
  30. <textarea type="text" name="order_note" id="add_order_note" class="input-text" cols="20" rows="5"></textarea>
  31. </p>
  32. <p>
  33. <label for="order_note_type" class="screen-reader-text"><?php esc_html_e( 'Note type', 'woocommerce' ); ?></label>
  34. <select name="order_note_type" id="order_note_type">
  35. <option value=""><?php esc_html_e( 'Private note', 'woocommerce' ); ?></option>
  36. <option value="customer"><?php esc_html_e( 'Note to customer', 'woocommerce' ); ?></option>
  37. </select>
  38. <button type="button" class="add_note button"><?php esc_html_e( 'Add', 'woocommerce' ); ?></button>
  39. </p>
  40. </div>
  41. <?php
  42. }
  43. }