benecaster_setup_wizard_bridge_options
Filters the bridge card options displayed in the setup wizard’s Subscription step. Add-ons that provide a non-Benecaster subscription bridge inject their card here so that users see it as a selectable option during initial setup.
The array always arrives with Benecaster’s own benecaster_builtin entry (Built-in membership) first, whatever state Stripe or your tiers are in, so a callback never needs to add it and should not remove it. The wizard always shows that card first and drops its “Recommended” badge when any other entry, yours included, is present. The { slug, name } shape of each entry is unchanged.
This is a Premium filter — the setup wizard’s Subscription step, and the bridge system generally, is not part of the free WordPress.org plugin. When the user selects a card and clicks Continue, the wizard calls POST /benecaster/v1/bridge/activate with the card’s slug — so the bridge must also be registered with the bridge manager so the slug resolves to a bridge instance. The wizard displays all returned options without performing its own plugin detection, so guard your callback to only inject a card when the underlying membership plugin is actually active.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$options |
array |
— | Array of bridge card option arrays, each with keys: {slug: string, name: string}. The first entry is always Benecaster's Built-in membership (slug benecaster_builtin). |
Returns:
array
Examples
Add bridge card with active-plugin guard
add_filter( 'benecaster_setup_wizard_bridge_options', function ( array $options ): array {
if ( ! class_exists( 'MyMembershipPlugin' ) ) {
return $options;
}
$options[] = [
'slug' => 'my-membership-plugin',
'name' => 'My Membership Plugin',
];
return $options;
} );
Notes
Append to the array you receive rather than replacing it, so the Built-in membership card stays first. Guard your callback: only inject a card when the underlying membership plugin is active — the wizard shows all returned options without its own plugin detection. The card's slug must match the value the bridge implementation returns from its plugin slug method, and the bridge must be registered with the bridge manager so it can be resolved during activation. Combine with benecaster_setup_wizard_steps to inject a bridge-specific configuration step that appears only after the user selects this card.
Affects
- Setup Wizard
Need this built rather than just documented? See our services →