Warning: Array to string conversion in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 825
Hubspot_Helpers::get_client()

Contents


Return Return

(array) $tokens


Source Source

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

	public function get_client() {
		$tokens = get_option( '_automator_hubspot_settings', array() );
		if ( empty( $tokens['access_token'] ) || empty( $tokens['refresh_token'] ) ) {
			throw new \Exception( __( "HubSpot is not connected", 'uncanny-automator' ) );
		}
		$tokens = $this->maybe_refresh_token( $tokens );
		return $tokens;
	}