Twilio_Helpers::settings_updated()

settings_updated


Return Return

(void)


Source Source

File: src/integrations/twilio/helpers/twilio-helpers.php

	public function settings_updated() {

		$redirect_url = $this->tab_url;

		if ( $this->credentials_updated() ) {
			
			$result = 1;

			try {
				$this->get_twilio_accounts_connected();
			} catch ( \Exception $e ) { 
				delete_option( 'uap_twilio_connected_user' );
				$result = $e->getMessage();
			}

			$redirect_url .= '&connect=' . $result;
		}

		wp_safe_redirect( $redirect_url );
		die;
	}