WC_WCCOM_Site_Installation_Manager::get_next_step
Get the next step to run.
Method of the class: WC_WCCOM_Site_Installation_Manager{}
No Hooks.
Returns
String.
Usage
// protected - for code of main (parent) or child class $result = $this->get_next_step( $state ): string;
- $state(WC_WCCOM_Site_Installation_State) (required)
- Installation state.
WC_WCCOM_Site_Installation_Manager::get_next_step() WC WCCOM Site Installation Manager::get next step code WC 10.8.1
protected function get_next_step( $state ): string {
$last_executed_step = $state->get_last_step_name();
if ( ! $last_executed_step ) {
return self::STEPS[0];
}
$last_executed_step_index = array_search( $last_executed_step, self::STEPS, true );
return self::STEPS[ $last_executed_step_index + 1 ];
}