|
/ Documentation /Developer Hooks & Events/ suredonation_donor_user_created Action Hook

suredonation_donor_user_created Action Hook

Overview

The suredonation_donor_user_created action fires after a brand-new WordPress user account has been created for a donor and linked to their donor record. Use it to enrich the new account, send a welcome message, or sync the user to another system.

Hook Signature

do_action( 'suredonation_donor_user_created', $user_id, $donor_id, $email );

Parameters

  • $user_id _(int)_ – The WordPress user ID returned by wp_insert_user().
  • $donor_id _(int)_ – The donor record ID the user was linked to.
  • $email _(string)_ – The donor email used for the account (already sanitized).

Usage

add_action( 'suredonation_donor_user_created', 'your_custom_function', 10, 3 );

function your_custom_function( $user_id, $donor_id, $email ) {

    // Your custom logic here.

}

Example

add_action( 'suredonation_donor_user_created', 'mysite_welcome_donor', 10, 3 );

function mysite_welcome_donor( $user_id, $donor_id, $email ) {

    update_user_meta( $user_id, 'mysite_source', 'donation' );

}

Related Hooks

suredonation_new_donor_user_data

Was this doc helpful?
What went wrong?

We don't respond to the article feedback, we use it to improve our support content.

Need help? Contact Support
Table of Contents
Scroll to Top