<?php

/**
 * Free Showcase MailChimp Integration Class
 */

if( ! defined( 'ABSPATH' ) ) {
	return;
}

if( ! class_exists( 'SG_WC_Follow_Up_Emails_Dummy' ) ) {
	class SG_WC_Follow_Up_Emails_Dummy extends GA_Integration {

		/**
		 * Setting initial params
		 */
		public function __construct() {

			$this->title = __( 'WooCommerce - Follow Up Emails', 'giveasap' );
			$this->settings_id = 'sg_wc_follow_up_emails';
			$this->image = untrailingslashit( GASAP_URI ) . '/includes/integrations/assets/woocommerce_logo.svg';
			$this->desc = __( 'Send Follow up emails when people join a giveaway', 'giveasap' );
		}

		public function buttons( $integrations ) {
			echo '<a href="' . giv_fs()->get_upgrade_url() . '" class="button button-primary">' . __( 'Upgrade to Business', 'giveasap' ) . '</a>';
		}

	}

	add_filter( 'giveasap_integrations', 'sg_register_wc_follow_up_emails' );

	/**
	 * Registering mailchimp
	 * @return array
	 */
	function sg_register_wc_follow_up_emails( $integrations ) {

		$integrations['sg_wc_follow_up_emails'] = 'SG_WC_Follow_Up_Emails_Dummy';

		return $integrations;
	}
}