Skip to content

Donation Form Lifecycle

Jon Waldstein edited this page Jul 12, 2024 · 9 revisions

Donation Form Lifecycle

Donation Form Lifecycle Visual

WIP

Donation Form Lifecycle Hooks

givewp_donation_form_processing_start

/**
 * Fires at the start of donation form processing, before any data is processed.
 *
 * @param  Give\DonationForms\DataTransferObjects\DonateControllerData  $formData
 * @param  string  $gatewayId
 */
do_action('givewp_donation_form_processing_start', $formData, $gatewayId);

givewp_donation_form_processing_donation_created

/**
 * Fires after a donation is created during donation form processing.
 *
 * @param  Give\Donations\Models\Donation  $donation
 * @param  Give\Subscriptions\Models\Subscription|null  $subscription
 */
do_action('givewp_donation_form_processing_donation_created', $donation, $subscription);

givewp_donation_form_processing_subscription_created

/**
 * Fires after a subscription is created during donation form processing.
 *
 * @param  Give\Subscriptions\Models\Subscription  $subscription
 * @param  Give\Donations\Models\Donation  $donation
 */
do_action('givewp_donation_form_processing_subscription_created', $subscription, $donation);

givewp_donation_form_processing_donor_created

/**
 * Fires after a donor is created during donation form processing.
 *
 * @param  Give\Donors\Models\Donor  $donor
 * @param  int  $formId
 */
do_action('givewp_donation_form_processing_donor_created', $donor, $formId);

givewp_donation_form_processing_custom_fields_stored

/**
 * Fires after custom fields have been stored/processed
 *
 * @param Give\DonationForms\Models\DonationForm $form
 * @param array $customFields
 * @param Give\Donations\Models\Donation $donation
 * @param Give\Subscriptions\Models\Subscription|null $subscription
 */
do_action('givewp_donation_form_processing_custom_fields_stored', $form, $customFields, $donation, $subscription)

givewp_donation_confirmation_receipt_viewing

/**
 * Fires before the donation confirmation receipt view is rendered.
 *
 * @unreleased
 *
 * @param Give\Donations\Models\Donation $donation
 */
do_action('givewp_donation_confirmation_receipt_viewing', $donation);
Clone this wiki locally