Mailchimp_Helpers::get_connect_uri()

Get the Mailchimp OAuth URI.

Contents


Return Return

(string) The Mailchimp OAuth URI.


Source Source

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

	public function get_connect_uri() {
		$action       = '';
		$redirect_url = rawurlencode( admin_url( 'edit.php' ) . '?post_type=uo-recipe&page=uncanny-automator-config&tab=premium-integrations&integration=' . $this->settings_tab );
		return add_query_arg(
			array(
				'action'       => 'mailchimp_authorization_request',
				'scope'        => '1',
				'redirect_url' => $redirect_url,
				'nonce'        => wp_create_nonce( 'automator_api_mailchimp_authorize' ),
				'plugin_ver'   => InitializePlugin::PLUGIN_VERSION,
				'api_ver'      => '2.0',
			),
			AUTOMATOR_API_URL . self::API_ENDPOINT
		);
	}