Action fires immediately when a new user is approved.


(int) User ID of the current viewer, or 0 if the current viewer is not logged in.



More Information

This action could be used to send an email to the user when their registration is approved when submitted through the WPForms User Registration addon. Alternatively, you could also use this hook to add the user to a mailing list through a 3rd party API.


 * Action that fires when user is approved.
 * @link
 * @param int $user_id  User ID of the current viewer.

function wpf_dev_approval_email( $user_id ) {
    $user = get_userdata( $user_id );
    $email = $user->user_email;
    // Do something.
add_action( 'wpforms_user_approve', 'wpf_dev_approval_email' );

Snippet Reference: How to Send User Email When Registration is Approved