Warning: This method has been deprecated.
WC_Admin_Setup_Wizard::get_next_step_link( string $step = '' )
Get the URL for the next step’s screen.
Description Description
Parameters Parameters
- $step
-
(Optional) slug (default: current step).
Default value: ''
Return Return
(string) URL for next step if a next step exists. Admin URL if it's the last step. Empty string on failure.
Source Source
File: includes/admin/class-wc-admin-setup-wizard.php
public function get_next_step_link( $step = '' ) {
if ( ! $step ) {
$step = $this->step;
}
$keys = array_keys( $this->steps );
if ( end( $keys ) === $step ) {
return admin_url();
}
$step_index = array_search( $step, $keys, true );
if ( false === $step_index ) {
return '';
}
return add_query_arg( 'step', $keys[ $step_index + 1 ], remove_query_arg( 'activate_error' ) );
}
Changelog Changelog
| Version | Description |
|---|---|
| 4.6.0 | This method has been deprecated. |
| 3.0.0 | Introduced. |