WC_WCCOM_Site_Installation_Manager::run_step()
Run the step.
Метод класса: WC_WCCOM_Site_Installation_Manager{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->run_step( $step_name, $state );
- $step_name(строка) (обязательный)
- Step name.
- $state(WC_WCCOM_Site_Installation_State) (обязательный)
- Installation state.
Код WC_WCCOM_Site_Installation_Manager::run_step() WC WCCOM Site Installation Manager::run step WC 9.8.2
protected function run_step( $step_name, $state ) { $state->initiate_step( $step_name ); WC_WCCOM_Site_Installation_State_Storage::save_state( $state ); try { $class_name = "WC_WCCOM_Site_Installation_Step_$step_name"; $current_step = new $class_name( $state ); $current_step->run(); } catch ( Installer_Error $exception ) { $state->capture_failure( $step_name, $exception->get_error_code() ); WC_WCCOM_Site_Installation_State_Storage::save_state( $state ); throw $exception; } catch ( Throwable $error ) { $state->capture_failure( $step_name, Installer_Error_Codes::UNEXPECTED_ERROR ); WC_WCCOM_Site_Installation_State_Storage::save_state( $state ); throw new Installer_Error( Installer_Error_Codes::UNEXPECTED_ERROR, $error->getMessage() ); } $state->complete_step( $step_name ); WC_WCCOM_Site_Installation_State_Storage::save_state( $state ); }