Skip to main content

BulkEnrollBridgeNotBuiltin

\Benecaster\Membership\BulkEnrollBridgeNotBuiltin

Class Premium

The exception BulkEnrollmentProcessor::enroll() throws when a subscriber batch targets a show whose active bridge is not the built-in membership. It is thrown before any row is processed, so nothing has been created: no WordPress user, subscription, token or welcome email, and benecaster_bulk_enrollment_complete does not fire. The refusal exists because a subscriber batch writes a native subscription that the show’s real membership plugin would never see.

You meet this class only by calling BulkEnrollmentProcessor::enroll() yourself with the default subscriber token type; you never construct or throw it. Catch it to tell this refusal apart from a bad argument and, for example, offer the follower import instead. It extends InvalidArgumentException, so code already catching that (the processor throws it for an unknown token type) catches this too; test instanceof when you need to tell them apart.

The exception has two public read-only properties, set by the constructor. $show_id (int) is the show that was refused. $active_bridge (string) is the slug of the show’s active bridge, or an empty string when it has none. The message names both and says to add these people through that membership plugin or enroll them as followers.

Constants

Name Value Description
REASON 'bridge_not_builtin' The reason string that the REST endpoint's 409 response and a refused background job's per-row outcomes carry.

Notes

The class has no methods of its own beyond the constructor, which takes the show ID and the active bridge slug, so a small entry is accurate. Follower batches never throw it: they work under every bridge.