Mailchimp_Settings::output()

Creates the output of the settings page


Return Return

(Uncanny_Automatorvoid.)


Source Source

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

	public function output() {

		// Set the transient when page is viewed.
		set_transient( 'automator_api_mailchimp_authorize_nonce', wp_create_nonce( 'automator_api_mailchimp_authorize' ), 3600 );

		$connect_code = absint( automator_filter_input( 'connect' ) );

		$connect_uri = $this->helpers->get_connect_uri();

		$disconnect_uri = $this->helpers->get_disconnect_uri();

		$enable_triggers = $this->helpers->is_webhook_enabled() ? 'checked' : '';

		$webhook_url = get_rest_url() . AUTOMATOR_REST_API_END_POINT . $this->helpers->get_webhook_url();

		$kb_link = automator_utm_parameters( 'https://automatorplugin.com/knowledge-base/mailchimp-wordpress-triggers/', 'settings', 'mailchimp-triggers-kb_article' );

		$regenerate_alert = esc_html__( 'Regenerating the URL will prevent Mailchimp triggers from working until the new webhook URL is set in Mailchimp. Continue?', 'uncanny-automator' );

		$regenerate_key_url = add_query_arg(
			array(
				'action' => 'mailchimp-regenerate-webhook-key',
			),
			admin_url( 'admin-ajax.php' )
		);

		include_once 'view-mailchimp.php';

	}