woocommerce_get_order_note
Usage
add_filter( 'woocommerce_get_order_note', 'wp_kama_woocommerce_get_order_note_filter', 10, 2 ); /** * Function for `woocommerce_get_order_note` filter-hook. * * @param $array * @param $data * * @return */ function wp_kama_woocommerce_get_order_note_filter( $array, $data ){ // filter... return $array; }
- $array
- -
- $data
- -
Where the hook is called
woocommerce_get_order_note
woocommerce/includes/wc-order-functions.php 1084-1095
return (object) apply_filters( 'woocommerce_get_order_note', array( 'id' => (int) $data->comment_ID, 'date_created' => wc_string_to_datetime( $data->comment_date ), 'content' => $data->comment_content, 'customer_note' => (bool) get_comment_meta( $data->comment_ID, 'is_customer_note', true ), 'added_by' => __( 'WooCommerce', 'woocommerce' ) === $data->comment_author ? 'system' : $data->comment_author, 'order_id' => absint( $data->comment_post_ID ), ), $data );