PluginProbe
Better Payment – Instant Payments, Donations, Fundraising with Subscriptions & More / 2.3.3
Better Payment – Instant Payments, Donations, Fundraising with Subscriptions & More v2.3.3
2.3.4 2.3.3 2.3.2 2.3.1 2.3.0 2.2.2 2.2.1 2.2.0 2.1.2 2.1.1 trunk 0.0.1 0.0.2 0.0.3 0.0.4 0.0.5 0.0.6 0.0.7 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 All 66 releases
better-payment / includes / WooCommerce / Emails / SubscriptionCompletedEmail.php

SubscriptionCompletedEmail.php in Better Payment – Instant Payments, Donations, Fundraising with Subscriptions & More 2.3.3, at includes/WooCommerce/Emails/SubscriptionCompletedEmail.php

74 lines 2.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Better_Payment\Lite\WooCommerce\Emails;
4
5 use Better_Payment\Lite\WooCommerce\Emails;
6
7 /**
8 * Exit if accessed directly
9 */
10 if ( ! defined( 'ABSPATH' ) ) {
11 exit;
12 }
13
14 /**
15 * Customer email: a Better Payment subscription completed — its renewal
16 * limit was reached and no further payments will be charged.
17 *
18 * This is Better Payment's "subscription expired" email. Completed is
19 * terminal with no reactivation route, so it
20 * is sent immediately from Emails::send_completed_email() — the delayed
21 * send only exists for the cancelled email, where reactivation is possible.
22 *
23 * @since 2.4.0
24 */
25 class SubscriptionCompletedEmail extends SubscriptionEmail {
26
27 /**
28 * Set up the email row shown under WooCommerce → Settings → Emails.
29 */
30 public function __construct() {
31 $this->id = Emails::COMPLETED_EMAIL_ID;
32 $this->title = __( 'Better Payment Subscription Completed', 'better-payment' );
33 $this->description = __( 'Sent to the customer when their Better Payment subscription completes — no further payments will be charged.', 'better-payment' );
34
35 parent::__construct();
36 }
37
38 /**
39 * The notification hook Emails::notify() fires for this email.
40 *
41 * @return string
42 */
43 protected function notification_hook() {
44 return Emails::COMPLETED_NOTIFICATION;
45 }
46
47 /**
48 * Default subject line.
49 *
50 * @return string
51 */
52 public function get_default_subject() {
53 return __( 'Your {site_title} subscription (order {order_number}) is complete', 'better-payment' );
54 }
55
56 /**
57 * Default email heading.
58 *
59 * @return string
60 */
61 public function get_default_heading() {
62 return __( 'Subscription completed', 'better-payment' );
63 }
64
65 /**
66 * Default closing copy (editable per-email in the settings row).
67 *
68 * @return string
69 */
70 public function get_default_additional_content() {
71 return __( 'Thank you for subscribing with us. You can start a new subscription from our store at any time.', 'better-payment' );
72 }
73 }
74