PluginProbe
Subscriptions for WooCommerce with Stripe Recurring Payments / 2.2.0
Subscriptions for WooCommerce with Stripe Recurring Payments v2.2.0
2.4.0 2.3.0 2.2.0 2.1.0 2.0.0 1.11.2 1.11.1 1.11.0 1.10.9 1.10.8 1.10.7 1.10.6 1.10.5 1.10.4 1.10.3 1.10.2 1.10.1 1.10.0 1.9.6 1.9.5 trunk 1.3.0 1.3.1 1.3.2 1.4.0 All 65 releases
subscription / includes / Illuminate / Emails / SavedAdmin.php

SavedAdmin.php in Subscriptions for WooCommerce with Stripe Recurring Payments 2.2.0, at includes/Illuminate/Emails/SavedAdmin.php

64 lines 1.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Admin notice that a subscription was saved (free).
4 *
5 * The customer opened the cancellation flow and backed out. Throttled upstream
6 * to once a day per subscription, so this never fires for someone idly opening
7 * and closing the modal - see Illuminate\Cancellation::record_save().
8 *
9 * @package SpringDevs\Subscription\Illuminate\Emails
10 */
11
12 namespace SpringDevs\Subscription\Illuminate\Emails;
13
14 defined( 'ABSPATH' ) || exit;
15
16 /**
17 * Admin notice that a subscription was saved (free).
18 */
19 class SavedAdmin extends AdminCancellationEmail {
20
21 /**
22 * Initialize the class.
23 */
24 public function __construct() {
25 $this->id = 'subscrpt_cancellation_saved_admin';
26 $this->title = __( 'Subscription saved ( Admin )', 'subscription' );
27 $this->description = __( 'Sent to the store owner when a customer starts cancelling and then keeps their subscription.', 'subscription' );
28
29 add_action( 'subscrpt_subscription_saved', array( $this, 'trigger' ), 10, 2 );
30
31 parent::__construct();
32
33 $this->template_html = 'emails/cancellation-saved-admin-html.php';
34 $this->template_plain = 'emails/plains/cancellation-saved-admin-plain.php';
35 }
36
37 /**
38 * Get default subject.
39 *
40 * @return string
41 */
42 public function get_default_subject() {
43 return __( '[{site_title}] A subscription was saved', 'subscription' );
44 }
45
46 /**
47 * Get default heading.
48 *
49 * @return string
50 */
51 public function get_default_heading() {
52 return __( 'A subscription was saved', 'subscription' );
53 }
54
55 /**
56 * Opening sentence of the mail.
57 *
58 * @return string
59 */
60 protected function get_intro() {
61 return __( 'A customer started cancelling a subscription and then decided to keep it.', 'subscription' );
62 }
63 }
64