WC_WCCOM_Site_Installation_Manager::reset_installation()
Get the next step to run.
Метод класса: WC_WCCOM_Site_Installation_Manager{}
Хуков нет.
Возвращает
true|false
.
Использование
$WC_WCCOM_Site_Installation_Manager = new WC_WCCOM_Site_Installation_Manager(); $WC_WCCOM_Site_Installation_Manager->reset_installation(): bool;
Код WC_WCCOM_Site_Installation_Manager::reset_installation() WC WCCOM Site Installation Manager::reset installation WC 9.8.2
public function reset_installation(): bool { $state = WC_WCCOM_Site_Installation_State_Storage::get_state( $this->product_id ); if ( ! $state ) { throw new Installer_Error( Installer_Error_Codes::NO_INITIATED_INSTALLATION_FOUND ); } if ( $state->get_idempotency_key() !== $this->idempotency_key ) { throw new Installer_Error( Installer_Error_Codes::IDEMPOTENCY_KEY_MISMATCH ); } $result = WC_WCCOM_Site_Installation_State_Storage::delete_state( $state ); if ( ! $result ) { throw new Installer_Error( Installer_Error_Codes::FAILED_TO_RESET_INSTALLATION_STATE ); } return true; }