Skip to main content

Automatically enroll Gravity Forms submissions as Benecaster subscribers

Free Intermediate Since v1.0.0

If you collect email addresses through Gravity Forms — for a live event, a manual enrollment flow, or a waitlist — you can have each submission automatically create a Benecaster subscriber on a specific tier, without anyone touching the admin. The new subscriber gets a WordPress account, a feed token, and a welcome email, all triggered by the form submission.

The setup is entirely in Gravity Forms: add a Webhook feed to your form, point it at Benecaster’s enrollment endpoint, and authenticate it with a WordPress Application Password. No custom PHP is required for the enrollment itself.

The code example shows an optional follow-up: hooking into benecaster_subscription_activated to tag the newly enrolled user in a CRM. The source parameter lets you target only webhook-enrolled subscribers rather than paid signups.

Code

<?php
// Gravity Forms webhook Request Body (Select Fields):
// {
//     "addresses": ["{Email:1}"],
//     "tier_slug": "supporter"
// }

// Optional: react to the enrollment server-side (e.g. tag the user in a CRM).
add_action( 'benecaster_subscription_activated', function ( int $user_id, int $show_id, string $tier_slug, string $source ): void {
    if ( 'admin_enrolled' !== $source ) {
        return; // Only react to bulk/webhook enrollments, not paid signups.
    }
    my_crm_tag_user( $user_id, 'benecaster-webhook-enrolled' );
}, 10, 4 );

View on GitHub →

Hooks Used