2013-08-06 10:41:20 +00:00
< ? php
/**
2015-11-03 13:53:50 +00:00
* Order Notes
2013-08-06 10:41:20 +00:00
*
2020-08-05 16:36:24 +00:00
* @ package WooCommerce\Admin\Meta Boxes
2013-08-06 10:41:20 +00:00
*/
2014-09-20 20:05:06 +00:00
if ( ! defined ( 'ABSPATH' ) ) {
2019-01-03 11:46:43 +00:00
exit ;
2014-09-20 20:05:06 +00:00
}
2013-08-06 10:41:20 +00:00
/**
2015-11-03 12:28:01 +00:00
* WC_Meta_Box_Order_Notes Class .
2013-08-06 10:41:20 +00:00
*/
class WC_Meta_Box_Order_Notes {
/**
2015-11-03 12:28:01 +00:00
* Output the metabox .
2016-01-04 21:31:36 +00:00
*
2019-01-03 11:46:43 +00:00
* @ param WP_Post $post Post object .
2013-08-06 10:41:20 +00:00
*/
public static function output ( $post ) {
2014-06-08 20:33:11 +00:00
global $post ;
2013-08-06 10:41:20 +00:00
$args = array (
2017-07-13 22:33:20 +00:00
'order_id' => $post -> ID ,
2013-08-06 10:41:20 +00:00
);
2017-07-13 22:33:20 +00:00
$notes = wc_get_order_notes ( $args );
2014-03-18 17:49:15 +00:00
2019-01-03 11:46:43 +00:00
include 'views/html-order-notes.php' ;
2013-08-06 10:41:20 +00:00
?>
< div class = " add_note " >
< p >
2019-01-03 11:46:43 +00:00
< 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>
2013-08-06 10:41:20 +00:00
< textarea type = " text " name = " order_note " id = " add_order_note " class = " input-text " cols = " 20 " rows = " 5 " ></ textarea >
</ p >
< p >
2019-01-03 11:46:43 +00:00
< label for = " order_note_type " class = " screen-reader-text " >< ? php esc_html_e ( 'Note type' , 'woocommerce' ); ?> </label>
2013-08-06 10:41:20 +00:00
< select name = " order_note_type " id = " order_note_type " >
2019-01-03 11:46:43 +00:00
< option value = " " >< ? php esc_html_e ( 'Private note' , 'woocommerce' ); ?> </option>
< option value = " customer " >< ? php esc_html_e ( 'Note to customer' , 'woocommerce' ); ?> </option>
2013-08-06 10:41:20 +00:00
</ select >
2019-01-03 11:46:43 +00:00
< button type = " button " class = " add_note button " >< ? php esc_html_e ( 'Add' , 'woocommerce' ); ?> </button>
2013-08-06 10:41:20 +00:00
</ p >
</ div >
< ? php
}
2014-08-31 07:18:21 +00:00
}