Add_Gtt_Integration::add_integration_func()

Register the integration by pushing it into the global automator object


Source Source

File: src/integrations/gototraining/add-gtt-integration.php

	public function add_integration_func() {

		// Check if consumer key and secret is available.
		$gtt_options = get_option( '_uncannyowl_gtt_settings', array() );

		Automator()->register->integration( self::$integration, array(
			'name'     => 'GoTo Training',
			'icon_svg' => Utilities::automator_get_integration_icon( __DIR__ . '/img/gototraining-icon.svg' ),
			'connected'    => isset( $gtt_options['refresh_token'] ) && ! empty( $gtt_options['refresh_token'] ),
			'settings_url' => automator_get_premium_integrations_settings_url( 'go-to-training' ),
		) );

	}