benecaster_setup_wizard_bridge_options
Filters the bridge card options displayed in the setup wizard’s Subscription step. Add-ons that provide a non-core subscription bridge inject their card here so that users see it as a selectable option during initial setup.
This is a Free filter. 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 |
Returns:
array
Examples
Add custom membership platform card
add_filter( 'benecaster_setup_wizard_bridge_options', function( $options ) {
// Add a custom bridge card for a proprietary membership platform.
$options[] = [
'id' => 'myplatform',
'label' => 'MyPlatform',
'description' => 'Connect your MyPlatform membership.',
'icon_url' => plugin_dir_url( __FILE__ ) . 'assets/myplatform-icon.svg',
];
return $options;
} );
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
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