DOCS

Claim Your Fundations

FREE block. A registration form that allows a guest fundraiser to claim ownership of an action they created without an account. Block ID: get-fund/claim-action.

Claim your fundations example

Why use this

When someone creates a fundraising action as a guest (without registering), Fundations sends them a claim link by email. This block is placed on the Claim page and processes that claim when the guest clicks the link.

What it does

The block reads three URL parameters: ?get_claim_action={id}, ?token={token}, and ?email={email}. It validates the stored _get_fund_claim_token and checks that the token has not expired (tokens are valid for 30 days via _get_fund_claim_token_expires).

If valid, the block shows a registration form with the guest’s email address pre-filled and read-only. On submission:

  1. A new fund_member account is created.
  2. The action’s post_author and _get_fund_creator_id are updated to the new user.
  3. Team ownership is transferred if applicable.
  4. All guest meta and the claim token are deleted.
  5. The get_fund_action_claimed action is fired.

If the token is invalid or expired, the block shows an error message.

The Claim page is created automatically during plugin setup. See Page Installer.

How to use it

  1. This block is pre-configured on the auto-created Claim page.
  2. No manual setup is required beyond ensuring the Claim page is set in Settings > Fundations > Pages.

Settings and options

OptionTypeDefaultDescription
TitlestringClaim Your FundationsForm heading
DescriptionstringIntro text shown above the form
Button textstringCreate Account & Claim ActionSubmit button label
Primary colorstring#4a9d44Accent color
Button colorstring#00b894Submit button background
Button hover colorstring#00a080Submit button hover background

What you can and cannot do

  • The claim token expires after 30 days. After that, the block shows an error and the action cannot be claimed via this flow.
  • The email field is read-only; the user cannot change it.
  • A guest can only claim an action once. After claiming, the token is deleted.

Developer reference

Action: claim completed

do_action( 'get_fund_action_claimed', int $post_id, int $user_id );
ParameterDescription
$post_idID of the claimed action
$user_idID of the newly created user

Example: send a welcome email after claiming

add_action( 'get_fund_action_claimed', function( $post_id, $user_id ) {
    $user = get_userdata( $user_id );
    wp_mail(
        $user->user_email,
        'Welcome to the team!',
        'Your fundraising action is now linked to your account.'
    );
}, 10, 2 );