Run post-setup initialization when the wizard completes
Fires once when the Setup Wizard is completed. Use to seed default add-on settings for the new show, send a welcome notification, or trigger an external onboarding webhook.
You receive the ID of the show created during the wizard (0 if no show was created) and the membership bridge the user selected. This action fires once — not on every admin visit.
When to Use This
Use this hook when your add-on needs to:
-
Set default post meta or options scoped to the newly created show
-
Send the site owner a welcome or confirmation notification
-
Register the new show with an external service (analytics, CRM, etc.)
-
Perform any work that should happen once, immediately after setup is complete
How It Works
The action passes two arguments: the ID of the show the wizard created, and the slug of the bridge the podcaster connected. Guard on the show ID first, seed whatever post meta your add-on needs, then branch on the bridge slug if you have bridge-specific defaults to set.
Notes
Always guard with $show_id === 0. The wizard completion action fires even if the podcaster skipped the Show Name step and never created a show. A $show_id of 0 means no show was created — most add-on initialization is show-scoped and should be skipped.
$bridge_slug is empty if the podcaster skipped bridge selection. Branch on it only for bridge-specific defaults. Common values: 'memberpress', 'woocommerce-subscriptions', 'paid-memberships-pro', 'restrict-content'.
This fires once, not on every admin visit. The wizard completion flag (benecaster_setup_wizard_complete option) is written before this action fires. If a podcaster somehow triggers the completion endpoint twice, post meta writes are idempotent — no harm done.
Use benecaster_bridge_connected for bridge-connection work. If you need to react specifically to the bridge being connected (including re-connections later), see React When an Admin Connects a Subscription Bridge instead. benecaster_setup_wizard_completed and benecaster_bridge_connected fire in sequence when both happen during the wizard — connected fires first.
Related
- Setup Wizard Walkthrough — customer-facing wizard documentation
Code
<?php
add_action( 'benecaster_setup_wizard_completed', function ( int $show_id, string $bridge_slug ): void {
if ( $show_id === 0 ) {
return;
}
update_post_meta( $show_id, '_my_addon_setting', 'default_value' );
if ( 'memberpress' === $bridge_slug ) {
// MemberPress-specific initialization.
}
}, 10, 2 );
Hooks Used
Need this built rather than just documented? See our services →