<?php

/**
 * Free Showcase MailChimp Integration Class
 */

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

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

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

			$this->title = __( 'WooCommerce', 'giveasap' );
			$this->settings_id = 'sg_woocommerce';
			$this->image = untrailingslashit( GASAP_URI ) . '/includes/integrations/assets/woocommerce_logo.svg';
			$this->desc = __( 'Award users for purchasing your products. Increase sales.', '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_woocommerce_integration' );

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

	$integrations['sg_woocommerce'] = 'SG_WooCommerce_Dummy';

	return $integrations;
}