Title: Hook or message sending function
Last modified: December 7, 2023

---

# Hook or message sending function

 *  Resolved [webfantastic](https://wordpress.org/support/users/webfantastic/)
 * (@webfantastic)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/hook-or-message-sending-function/)
 * Hi!
 * Is there some kind of hook so that you can send a chat message to the user on
   behalf of the administrator? We want to set up automatic notifications about 
   sending goods and sending tracks and payment links to the chat, for this we need
   a hook to write a function.

Viewing 1 replies (of 1 total)

 *  Plugin Author [N-Media](https://wordpress.org/support/users/nmedia/)
 * (@nmedia)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/hook-or-message-sending-function/#post-17266894)
 * Hi,
 * thanks for reaching out, sure here is action hook when message sent by any user
   like vendor or customer:
   `do_action('wooconvo_after_message_added', $user, $context,
   $message, $attachments, $thread, self::$orderid);`
 * $user: wp user object
 * $context: my-account or wp-admin (means customer or admin)
 * $message: the actual message text
 * $attachments: an array of files being attached
 * $thread: all whole thread/chat in json
 * self::$orderid: wc order object

Viewing 1 replies (of 1 total)

The topic ‘Hook or message sending function’ is closed to new replies.

 * ![](https://ps.w.org/admin-and-client-message-after-order-for-woocommerce/assets/
   icon-256x256.png?rev=2838295)
 * [Admin and Customer Messages After Order for WooCommerce: OrderConvo](https://wordpress.org/plugins/admin-and-client-message-after-order-for-woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/admin-and-client-message-after-order-for-woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/admin-and-client-message-after-order-for-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/admin-and-client-message-after-order-for-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/admin-and-client-message-after-order-for-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/admin-and-client-message-after-order-for-woocommerce/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [N-Media](https://wordpress.org/support/users/nmedia/)
 * Last activity: [2 years, 6 months ago](https://wordpress.org/support/topic/hook-or-message-sending-function/#post-17266894)
 * Status: resolved