WC_Admin_Setup_Wizard::get_next_step_link
Deprecated since 4.6.0. It is no longer supported and may be removed in future releases. It is recommended to replace this function with the same one.
Get the URL for the next step's screen.
Method of the class: WC_Admin_Setup_Wizard{}
No Hooks.
Returns
String. URL for next step if a next step exists. Admin URL if it's the last step. Empty string on failure.
Usage
$WC_Admin_Setup_Wizard = new WC_Admin_Setup_Wizard(); $WC_Admin_Setup_Wizard->get_next_step_link( $step );
- $step(string)
- slug .
Default:current step)
Changelog
| Since 3.0.0 | Introduced. |
| Deprecated since | 4.6.0 |
WC_Admin_Setup_Wizard::get_next_step_link() WC Admin Setup Wizard::get next step link code WC 10.8.1
public function get_next_step_link( $step = '' ) {
_deprecated_function( __CLASS__ . '::' . __FUNCTION__, '4.6.0', 'Onboarding is maintained in WooCommerce Admin.' );
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' ) );
}