woocommerce/includes/admin/meta-boxes/class-wc-meta-box-order-not...

50 lines
1.3 KiB
PHP
Raw Normal View History

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
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
2013-08-06 10:41:20 +00:00
/**
* WC_Meta_Box_Order_Notes Class.
2013-08-06 10:41:20 +00:00
*/
class WC_Meta_Box_Order_Notes {
/**
* Output the metabox.
*
* @param WP_Post $post Post object.
2013-08-06 10:41:20 +00:00
*/
public static function output( $post ) {
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 );
include 'views/html-order-notes.php';
2013-08-06 10:41:20 +00:00
?>
<div class="add_note">
<p>
<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>
<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">
<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>
<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
}
}