• Resolved k2learner

    (@k2learner)


    Hi,

    Here are the requirements from my customer:

    1. Create Users ONLY to those who donate (either offline OR Paypal). They can then lookup their receipts etc at the end of the year for Tax filing (they are a non-profit).

    a) If user email is received from Paypal, create it right away with a random password, given FNAME and given LNAME. Send a email with login credentials (ok to have clear text password in email).
    b) If receiving cheque/bank transfer/cash donations, admin would log into website and will type in necessary info and user would be created. Basically, NO REGISTRATION without $$ coming in. I am concerned about FAKE registration when Script User Registration is enabled (I have disabled it with a free plugin).

    I can code so custom coding is ok. But will definitely appreciate if somebody can advise on HOW to go about doing it. I am kinda new to WP but not new to PHP/MYSQL.

    Thank you

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi @k2learner,

    We don’t have a built-in way to do this right now, but what I would suggest is that you use the charitable-completed_donation hook.

    That hook will fire when a donation is marked as completed, so it will not happen for offline donations until an admin marks the donation as paid.

    The first parameter passed by that hook is the $donation_id variable, with which you can get the donor’s details by fetching the Charitable_Donor object:

    `
    $donor = charitable_get_donation( $donation_id )->get_donor();
    `

    See https://github.com/Charitable/Charitable/blob/master/includes/users/class-charitable-donor.php for the class definition of the Donor class.

    Cheers,
    Eric

    Hi @k2learner,

    […] Script User Registration is enabled (I have disabled it with a free plugin).

    how did you solve the donation without registration? I would like to use the Charitable Donation Plugin without registration, but I can not find a solution to how this can be circumvented. Can you help me please?

    Thanks,
    Michelle

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Creating WordPress Users ONLY after Donation’ is closed to new replies.