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: ''


Top ↑

Return Return

(string) URL for next step if a next step exists. Admin URL if it's the last step. Empty string on failure.


Top ↑

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' ) );
	}

Top ↑

Changelog Changelog

Changelog
Version Description
4.6.0 This method has been deprecated.
3.0.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.