Hubspot_Helpers::disconnect()

disconnect


Return Return

(void)


Source Source

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

	public function disconnect() {

		if ( automator_filter_input( 'integration' ) !== $this->setting_tab ) {
			return;
		}

		if ( ! automator_filter_has_var( 'disconnect' ) ) {
			return;
		}

		delete_transient( '_automator_hubspot_token_info' );
		delete_option( '_automator_hubspot_settings' );

		$redirect_url = $this->tab_url;

		wp_safe_redirect( $redirect_url );

		die;
	}