Skip to main content

benecaster_withdraw_wizard_step()

Utilities Free
benecaster_withdraw_wizard_step( string $step_id, int $show_id ): bool

Takes back a late setup step you asked for with benecaster_request_wizard_step(), because what it asks for is already done. The step leaves the show’s notice and its late run straight away. Nobody answered it, so neither benecaster_wizard_late_step_completed nor benecaster_wizard_late_step_declined fires, and the function has no action of its own.

Parameters

Name Type Default Required Description
step_id string — Yes The step's id
show_id int — Yes The show it was requested for

Return Value

Type: bool

true when the step is withdrawn on that show after the call; a repeat is harmless. false when nothing was written: the step was never requested, or the podcaster has already completed or declined it, which stay as they were.

Example

add_action( 'my_addon_settings_saved', function ( int $show_id ): void {
    // The podcaster did on our settings screen what the step asks for.
    benecaster_withdraw_wizard_step( 'my-addon-config', $show_id );
} );

Notes

Final for that show, like every other way a late step settles. A later benecaster_request_wizard_step() returns false, so calling that on every request does not undo it. Only a full wizard reset forgets the record. If the setting is later removed, ask the podcaster from your own settings screen.

Withdraw from outside the run, not from your step's own save. If your step saves through the code that withdraws, Finish → finds nothing pending and benecaster_wizard_late_step_completed never fires for that show. A run already open in another tab is safe: its buttons still move on, and a reload returns the podcaster to the page they came from.

See Inject a step into the setup wizard from an add-on.

Need this built rather than just documented? See our services →