<?php
/**
 * Subscription Trial Ending Email
 * Sent to customer a few days before their free trial ends.
 *
 * @package GGM_Commerce
 */

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

class GGM_Commerce_Email_Subscription_Trial_Ending extends GGM_Commerce_Email_Subscription_Template {

	public function __construct() {
		$this->id             = 'subscription_trial_ending';
		$this->title          = __( 'Trial Ending Soon', 'ggm-commerce' );
		$this->description    = __( 'Sent to the customer a few days before their free trial ends.', 'ggm-commerce' );
		$this->recipient_type = 'customer';
	}

	public function get_default_subject() {
		return __( 'Your free trial for #{subscription_number} ends soon', 'ggm-commerce' );
	}

	public function get_default_heading() {
		return __( 'Your Free Trial is Ending Soon', 'ggm-commerce' );
	}

	public function get_default_content() {
		return '
<p>Hi {customer_first_name},</p>

<p>Just a heads up — your free trial ends on <strong>{subscription_trial_end}</strong> ({days_remaining} days remaining).</p>

<p>After your trial ends, your subscription will automatically begin and you will be charged {subscription_cycle}.</p>
' . $this->render_subscription_details_block() . '

<p>If you don\'t wish to continue, you can cancel your subscription before the trial ends from your account page.</p>
';
	}
}
