Title: Order notes Hook for Webhook
Last modified: August 24, 2016

---

# Order notes Hook for Webhook

 *  Resolved [debone](https://wordpress.org/support/users/debone/)
 * (@debone)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/order-notes-hook-for-webhook/)
 * Hello,
    I’m trying to send all order notes with webhooks but I couldn’t find 
   a hook that satisfies it. There is only a hook for when it’s a customer note,
   [here](http://docs.woothemes.com/wc-apidocs/source-class-WC_Abstract_Order.html#2107).
   Any ideas?
 * [https://wordpress.org/plugins/woocommerce/](https://wordpress.org/plugins/woocommerce/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Kharis Sulistiyono](https://wordpress.org/support/users/kharisblank/)
 * (@kharisblank)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/order-notes-hook-for-webhook/#post-6175747)
 * Hello there.
 * Order notes uses WordPress comment system. Below is how order notes are displayed.
 *     ```
       $args = array(
       	'post_id'   => $post->ID,
       	'orderby'   => 'comment_ID',
       	'order'     => 'DESC',
       	'approve'   => 'approve',
       	'type'      => 'order_note'
       );
   
       $notes = get_comments( $args );
       ```
   
 * For complete reference see [here](http://docs.woothemes.com/wc-apidocs/source-class-WC_Meta_Box_Order_Notes.html#15-83).
 * I’ve never build such this functionality before, but my intuition said that we
   can insert new order notes via [wp_insert_comment](https://codex.wordpress.org/Function_Reference/wp_insert_comment)
   or using `woocommerce_new_order_note_data` [filter](http://docs.woothemes.com/wc-apidocs/source-class-WC_Abstract_Order.html#2100).
 * I hope it helps.
 *  Thread Starter [debone](https://wordpress.org/support/users/debone/)
 * (@debone)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/order-notes-hook-for-webhook/#post-6175772)
 * Hmm.. I need to send the notes created, not create new ones 🙂
    But I figured
   out a way to make it work with the `woocommerce_new_order_note_data` you indicated
 * Reference code
 *     ```
       add_filter( 'woocommerce_new_order_note_data', 'sendOrderNotes' );
   
       function sendOrderNotes( $order_note ) {
         //Use order notes here
         return $order_note;
       }
       ```
   
 * Thanks for the help 🙂

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Order notes Hook for Webhook’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

## Tags

 * [order notes](https://wordpress.org/support/topic-tag/order-notes/)
 * [webhooks](https://wordpress.org/support/topic-tag/webhooks/)

 * 2 replies
 * 2 participants
 * Last reply from: [debone](https://wordpress.org/support/users/debone/)
 * Last activity: [10 years, 11 months ago](https://wordpress.org/support/topic/order-notes-hook-for-webhook/#post-6175772)
 * Status: resolved