Mailchimp_Helpers::__construct()


Source

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

	public function __construct() {
		// Selectively load options
		if ( method_exists( '\Uncanny_Automator\Automator_Helpers_Recipe', 'maybe_load_trigger_options' ) ) {
			global $uncanny_automator;
			$this->load_options = $uncanny_automator->helpers->recipe->maybe_load_trigger_options( __CLASS__ );
		} else {
			$this->load_options = true;
		}
		$this->setting_tab   = 'mailchimp_api';
		$this->automator_api = AUTOMATOR_API_URL . 'v2/mailchimp';
		add_filter( 'automator_settings_tabs', array( $this, 'add_mailchimp_api_settings' ), 15 );
		add_action( 'init', array( $this, 'validate_oauth_tokens' ), 100, 3 );
		add_filter( 'automator_after_settings_extra_content', array( $this, 'mailchimp_connect_html' ), 10, 3 );
		add_action( 'wp_ajax_select_mcgroupslist_from_mclist', array( $this, 'select_mcgroupslist_from_mclist' ) );
		add_action( 'wp_ajax_select_mctagslist_from_mclist', array( $this, 'select_mctagslist_from_mclist' ) );
		add_action( 'wp_ajax_select_mctagsidslist_from_mclist', array( $this, 'select_mctagsidslist_from_mclist' ) );
		add_action( 'wp_ajax_get_mailchimp_audience_fields', array( $this, 'get_mailchimp_audience_fields' ) );
		add_action( 'wp_ajax_uo_mailchimp_disconnect', array( $this, 'uo_mailchimp_disconnect' ) );
	}