woocommerce_new_order_note_data
Usage
add_filter( 'woocommerce_new_order_note_data', 'wp_kama_woocommerce_new_order_note_data_filter' ); /** * Function for `woocommerce_new_order_note_data` filter-hook. * * @param $array * * @return */ function wp_kama_woocommerce_new_order_note_data_filter( $array ){ // filter... return $array; }
- $array
- -
Where the hook is called
woocommerce/includes/class-wc-order.php 2017-2034
$commentdata = apply_filters( 'woocommerce_new_order_note_data', array( 'comment_post_ID' => $this->get_id(), 'comment_author' => $comment_author, 'comment_author_email' => $comment_author_email, 'comment_author_url' => '', 'comment_content' => $note, 'comment_agent' => 'WooCommerce', 'comment_type' => 'order_note', 'comment_parent' => 0, 'comment_approved' => 1, ), array( 'order_id' => $this->get_id(), 'is_customer_note' => $is_customer_note, ) );