Add_Mailchimp_Integration::add_integration_func()

Register the integration by pushing it into the global automator object


Source Source

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

	public function add_integration_func() {

		global $uncanny_automator;

		// check if Consumer Key and Consumer Secret available
		$gtw_options = get_option( '_uncannyowl_mailchimp_settings', array() );

		if ( isset( $gtw_options['access_token'] ) && ! empty( $gtw_options['access_token'] ) ) {
			$this->connected = true;
		}

		$uncanny_automator->register->integration(
			self::$integration,
			array(
				'name'          => 'Mailchimp',
				'connected'     => $this->connected,
				'icon_svg'      => Utilities::automator_get_integration_icon( __DIR__ . '/img/mailchimp-icon.svg' ),
				'settings_url'  => admin_url( 'edit.php' ) . '?post_type=uo-recipe&page=uncanny-automator-settings&tab=mailchimp_api'
			)
		);

	}