Title: Hook
Last modified: May 14, 2019

---

# Hook

 *  Resolved [debinz](https://wordpress.org/support/users/debinz/)
 * (@debinz)
 * [7 years ago](https://wordpress.org/support/topic/hook-7/)
 * Could I add a hook in my functions.php to send user name and email address to
   Zapier after approval?
 * e.g. do you think would this work for WP Approve User? It works for another plugin
   that I’m not using
 * function wpauSendWebhook( $user ) {
    $url = ‘[https://zapier.com/hooks/catch/XXXXXXXX&#8217](https://zapier.com/hooks/catch/XXXXXXXX&#8217);;;//
   replace this with Zapier provided webhook URL
 *  $args = array(
    ‘method’ => ‘POST’, ‘body’ => array( ‘first_name’ => $user->
   user_firstname, ‘last_name’ => $user->user_lastname, ’email_address’ => $user-
   >user_email, ) );
 *  wp_remote_post( $url, $args );
    }
 * add_action( ‘wpau_approve’, ‘wpauSendWebhook’, 10, 1 );

Viewing 1 replies (of 1 total)

 *  Plugin Author [Konstantin Obenland](https://wordpress.org/support/users/obenland/)
 * (@obenland)
 * [7 years ago](https://wordpress.org/support/topic/hook-7/#post-11530961)
 * I don’t see why it shouldn’t work. Just be aware that `wpau_approve` passes the
   user ID and not a `WP_User` object.
 * Konstantin

Viewing 1 replies (of 1 total)

The topic ‘Hook’ is closed to new replies.

 * ![](https://ps.w.org/wp-approve-user/assets/icon-256x256.png?rev=3013178)
 * [WP Approve User](https://wordpress.org/plugins/wp-approve-user/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-approve-user/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-approve-user/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-approve-user/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-approve-user/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-approve-user/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Konstantin Obenland](https://wordpress.org/support/users/obenland/)
 * Last activity: [7 years ago](https://wordpress.org/support/topic/hook-7/#post-11530961)
 * Status: resolved