<?php
/**
 * Subscription Payment Failed Email
 * Sent to customer when a renewal payment fails.
 *
 * @package GGM_Commerce
 */

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

class GGM_Commerce_Email_Subscription_Payment_Failed extends GGM_Commerce_Email_Subscription_Template {

	public function __construct() {
		$this->id             = 'subscription_payment_failed';
		$this->title          = __( 'Subscription Payment Failed', 'ggm-commerce' );
		$this->description    = __( 'Sent to the customer when a subscription renewal payment fails.', 'ggm-commerce' );
		$this->recipient_type = 'customer';
	}

	public function get_default_subject() {
		return __( 'Payment failed for subscription #{subscription_number}', 'ggm-commerce' );
	}

	public function get_default_heading() {
		return __( 'Payment Failed', 'ggm-commerce' );
	}

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

<p>We were unable to process the payment for your subscription. Please update your payment method to avoid any interruption to your service.</p>
' . $this->render_subscription_details_block() . '

<p>We will automatically retry the payment. If the payment continues to fail, your subscription may be suspended.</p>

<p>If you need help, please don\'t hesitate to contact us.</p>
';
	}
}
