Add_Twilio_Integration::add_integration_func()

Register the integration by pushing it into the global automator object


Source Source

File: src/integrations/twilio/add-twilio-integration.php

	public function add_integration_func() {

		$sid      = get_option( 'uap_automator_twilio_api_account_sid', '' );
		$token    = get_option( 'uap_automator_twilio_api_auth_token', '' );
		$user     = get_option( 'uap_twilio_connected_user', '' );

		if ( ! empty( $sid ) && ! empty( $token ) && ! empty( $user ) ) {
			$this->connected = true;
		}

		Automator()->register->integration(
			self::$integration,
			array(
				'name'         => 'Twilio',
				'icon_svg'     => Utilities::automator_get_integration_icon( __DIR__ . '/img/twilio-icon.svg' ),
				'connected'    => $this->connected,
				'settings_url' => automator_get_premium_integrations_settings_url( 'twilio-api' ),
			)
		);

	}