@@ -15,21 +15,21 @@ |
||
15 | 15 | */ |
16 | 16 | class EE_Messages_Html_Invoice_Validator extends EE_Messages_Validator |
17 | 17 | { |
18 | - public function __construct($fields, $context) |
|
19 | - { |
|
20 | - $this->_m_name = 'html'; |
|
21 | - $this->_mt_name = 'invoice'; |
|
18 | + public function __construct($fields, $context) |
|
19 | + { |
|
20 | + $this->_m_name = 'html'; |
|
21 | + $this->_mt_name = 'invoice'; |
|
22 | 22 | |
23 | - parent::__construct($fields, $context); |
|
24 | - } |
|
23 | + parent::__construct($fields, $context); |
|
24 | + } |
|
25 | 25 | |
26 | - /** |
|
27 | - * custom validator (restricting what was originally set by the messenger). |
|
28 | - * Note nothing is currently done for this messenger and message type. |
|
29 | - */ |
|
30 | - protected function _modify_validator() |
|
31 | - { |
|
32 | - $this->_specific_shortcode_excludes['content'] = array('[DISPLAY_HTML_URL]'); |
|
33 | - return; |
|
34 | - } |
|
26 | + /** |
|
27 | + * custom validator (restricting what was originally set by the messenger). |
|
28 | + * Note nothing is currently done for this messenger and message type. |
|
29 | + */ |
|
30 | + protected function _modify_validator() |
|
31 | + { |
|
32 | + $this->_specific_shortcode_excludes['content'] = array('[DISPLAY_HTML_URL]'); |
|
33 | + return; |
|
34 | + } |
|
35 | 35 | } |
@@ -15,21 +15,21 @@ |
||
15 | 15 | */ |
16 | 16 | class EE_Messages_Html_Receipt_Validator extends EE_Messages_Validator |
17 | 17 | { |
18 | - public function __construct($fields, $context) |
|
19 | - { |
|
20 | - $this->_m_name = 'html'; |
|
21 | - $this->_mt_name = 'receipt'; |
|
18 | + public function __construct($fields, $context) |
|
19 | + { |
|
20 | + $this->_m_name = 'html'; |
|
21 | + $this->_mt_name = 'receipt'; |
|
22 | 22 | |
23 | - parent::__construct($fields, $context); |
|
24 | - } |
|
23 | + parent::__construct($fields, $context); |
|
24 | + } |
|
25 | 25 | |
26 | - /** |
|
27 | - * custom validator (restricting what was originally set by the messenger). |
|
28 | - * Note nothing is currently done for this messenger and message type. |
|
29 | - */ |
|
30 | - protected function _modify_validator() |
|
31 | - { |
|
32 | - $this->_specific_shortcode_excludes['content'] = array('[DISPLAY_HTML_URL]'); |
|
33 | - return; |
|
34 | - } |
|
26 | + /** |
|
27 | + * custom validator (restricting what was originally set by the messenger). |
|
28 | + * Note nothing is currently done for this messenger and message type. |
|
29 | + */ |
|
30 | + protected function _modify_validator() |
|
31 | + { |
|
32 | + $this->_specific_shortcode_excludes['content'] = array('[DISPLAY_HTML_URL]'); |
|
33 | + return; |
|
34 | + } |
|
35 | 35 | } |
@@ -9,19 +9,19 @@ |
||
9 | 9 | */ |
10 | 10 | class EE_Messages_Template_Pack_Collection extends EE_Object_Collection |
11 | 11 | { |
12 | - public function __construct() |
|
13 | - { |
|
14 | - $this->interface = 'EE_Messages_Template_Pack'; |
|
15 | - } |
|
12 | + public function __construct() |
|
13 | + { |
|
14 | + $this->interface = 'EE_Messages_Template_Pack'; |
|
15 | + } |
|
16 | 16 | |
17 | - public function get_by_name($template_pack_name) |
|
18 | - { |
|
19 | - $this->rewind(); |
|
20 | - while ($this->valid()) { |
|
21 | - if ($this->current()->dbref == $template_pack_name) { |
|
22 | - return $this->current(); |
|
23 | - } |
|
24 | - $this->next(); |
|
25 | - } |
|
26 | - } |
|
17 | + public function get_by_name($template_pack_name) |
|
18 | + { |
|
19 | + $this->rewind(); |
|
20 | + while ($this->valid()) { |
|
21 | + if ($this->current()->dbref == $template_pack_name) { |
|
22 | + return $this->current(); |
|
23 | + } |
|
24 | + $this->next(); |
|
25 | + } |
|
26 | + } |
|
27 | 27 | } |
@@ -15,59 +15,59 @@ |
||
15 | 15 | */ |
16 | 16 | class EE_Registration_Summary_message_type extends EE_Registration_Base_message_type |
17 | 17 | { |
18 | - public function __construct() |
|
19 | - { |
|
20 | - $this->name = 'registration_summary'; |
|
21 | - $this->description = esc_html__('This message type provides a summary notification to Primary Registrants and Admin recipients when there are multiple registrations in a transaction with different statuses.', 'event_espresso'); |
|
22 | - $this->label = array( |
|
23 | - 'singular' => esc_html__('registration multi-status summary', 'event_espresso'), |
|
24 | - 'plural' => esc_html__('registrations multi-status summary', 'event_espresso') |
|
25 | - ); |
|
18 | + public function __construct() |
|
19 | + { |
|
20 | + $this->name = 'registration_summary'; |
|
21 | + $this->description = esc_html__('This message type provides a summary notification to Primary Registrants and Admin recipients when there are multiple registrations in a transaction with different statuses.', 'event_espresso'); |
|
22 | + $this->label = array( |
|
23 | + 'singular' => esc_html__('registration multi-status summary', 'event_espresso'), |
|
24 | + 'plural' => esc_html__('registrations multi-status summary', 'event_espresso') |
|
25 | + ); |
|
26 | 26 | |
27 | - $this->_master_templates = array( |
|
28 | - 'email' => 'registration' |
|
29 | - ); |
|
27 | + $this->_master_templates = array( |
|
28 | + 'email' => 'registration' |
|
29 | + ); |
|
30 | 30 | |
31 | - parent::__construct(); |
|
32 | - } |
|
31 | + parent::__construct(); |
|
32 | + } |
|
33 | 33 | |
34 | 34 | |
35 | 35 | |
36 | - /** |
|
37 | - * _set_contexts |
|
38 | - * This sets up the contexts associated with the message_type |
|
39 | - * |
|
40 | - * @access protected |
|
41 | - * @return void |
|
42 | - */ |
|
43 | - protected function _set_contexts() |
|
44 | - { |
|
45 | - $this->_context_label = array( |
|
46 | - 'label' => esc_html__('recipient', 'event_espresso'), |
|
47 | - 'plural' => esc_html__('recipients', 'event_espresso'), |
|
48 | - 'description' => esc_html__('Recipient\'s are who will receive the template. You may want different details sent out depending on who the recipient is. To "turn off" a recipient from receiving message, simply remove any content from the "to" field in the template.', 'event_espresso') |
|
49 | - ); |
|
36 | + /** |
|
37 | + * _set_contexts |
|
38 | + * This sets up the contexts associated with the message_type |
|
39 | + * |
|
40 | + * @access protected |
|
41 | + * @return void |
|
42 | + */ |
|
43 | + protected function _set_contexts() |
|
44 | + { |
|
45 | + $this->_context_label = array( |
|
46 | + 'label' => esc_html__('recipient', 'event_espresso'), |
|
47 | + 'plural' => esc_html__('recipients', 'event_espresso'), |
|
48 | + 'description' => esc_html__('Recipient\'s are who will receive the template. You may want different details sent out depending on who the recipient is. To "turn off" a recipient from receiving message, simply remove any content from the "to" field in the template.', 'event_espresso') |
|
49 | + ); |
|
50 | 50 | |
51 | - $this->_contexts = array( |
|
52 | - 'admin' => array( |
|
53 | - 'label' => esc_html__('Event Admin', 'event_espresso'), |
|
54 | - 'description' => esc_html__('This template is what event administrators will receive when a transaction is finalized that has registrations with multiple different statuses.', 'event_espresso') |
|
55 | - ), |
|
56 | - 'primary_attendee' => array( |
|
57 | - 'label' => esc_html__('Primary Registrant', 'event_espresso'), |
|
58 | - 'description' => esc_html__('This template is what the primary registrant (the person who completed the initial transaction) will receive when the transaction completed has registrations with different statuses. By default it is a summary email of all registrations for all events on the transaction and their status.', 'event_espresso') |
|
59 | - ) |
|
60 | - ); |
|
61 | - } |
|
51 | + $this->_contexts = array( |
|
52 | + 'admin' => array( |
|
53 | + 'label' => esc_html__('Event Admin', 'event_espresso'), |
|
54 | + 'description' => esc_html__('This template is what event administrators will receive when a transaction is finalized that has registrations with multiple different statuses.', 'event_espresso') |
|
55 | + ), |
|
56 | + 'primary_attendee' => array( |
|
57 | + 'label' => esc_html__('Primary Registrant', 'event_espresso'), |
|
58 | + 'description' => esc_html__('This template is what the primary registrant (the person who completed the initial transaction) will receive when the transaction completed has registrations with different statuses. By default it is a summary email of all registrations for all events on the transaction and their status.', 'event_espresso') |
|
59 | + ) |
|
60 | + ); |
|
61 | + } |
|
62 | 62 | |
63 | 63 | |
64 | 64 | |
65 | - protected function _primary_attendee_addressees() |
|
66 | - { |
|
67 | - $cached = $this->_single_message; |
|
68 | - $this->_single_message = false; |
|
69 | - $addressees = parent::_primary_attendee_addressees(); |
|
70 | - $this->_single_message = $cached; |
|
71 | - return $addressees; |
|
72 | - } |
|
65 | + protected function _primary_attendee_addressees() |
|
66 | + { |
|
67 | + $cached = $this->_single_message; |
|
68 | + $this->_single_message = false; |
|
69 | + $addressees = parent::_primary_attendee_addressees(); |
|
70 | + $this->_single_message = $cached; |
|
71 | + return $addressees; |
|
72 | + } |
|
73 | 73 | } |
@@ -13,44 +13,44 @@ |
||
13 | 13 | */ |
14 | 14 | class EE_Payment_message_type extends EE_Payment_Base_message_type |
15 | 15 | { |
16 | - public function __construct() |
|
17 | - { |
|
16 | + public function __construct() |
|
17 | + { |
|
18 | 18 | |
19 | - // setup type details for reference |
|
20 | - $this->name = 'payment'; |
|
21 | - $this->description = esc_html__('This message type is used for all payment notification messages that go out including any manual payments entered by an event administrator.', 'event_espresso'); |
|
22 | - $this->label = array( |
|
23 | - 'singular' => esc_html__('payment received', 'event_espresso'), |
|
24 | - 'plural' => esc_html__('payments received', 'event_espresso') |
|
25 | - ); |
|
19 | + // setup type details for reference |
|
20 | + $this->name = 'payment'; |
|
21 | + $this->description = esc_html__('This message type is used for all payment notification messages that go out including any manual payments entered by an event administrator.', 'event_espresso'); |
|
22 | + $this->label = array( |
|
23 | + 'singular' => esc_html__('payment received', 'event_espresso'), |
|
24 | + 'plural' => esc_html__('payments received', 'event_espresso') |
|
25 | + ); |
|
26 | 26 | |
27 | - parent::__construct(); |
|
28 | - } |
|
27 | + parent::__construct(); |
|
28 | + } |
|
29 | 29 | |
30 | - /** |
|
31 | - * _set_contexts |
|
32 | - * This sets up the contexts associated with the message_type |
|
33 | - * |
|
34 | - * @access protected |
|
35 | - * @return void |
|
36 | - */ |
|
37 | - protected function _set_contexts() |
|
38 | - { |
|
39 | - $this->_context_label = array( |
|
40 | - 'label' => esc_html__('recipient', 'event_espresso'), |
|
41 | - 'plural' => esc_html__('recipients', 'event_espresso'), |
|
42 | - 'description' => esc_html__('Recipient\'s are who will receive the template. You may want different payment details sent out depending on who the recipient is', 'event_espresso') |
|
43 | - ); |
|
30 | + /** |
|
31 | + * _set_contexts |
|
32 | + * This sets up the contexts associated with the message_type |
|
33 | + * |
|
34 | + * @access protected |
|
35 | + * @return void |
|
36 | + */ |
|
37 | + protected function _set_contexts() |
|
38 | + { |
|
39 | + $this->_context_label = array( |
|
40 | + 'label' => esc_html__('recipient', 'event_espresso'), |
|
41 | + 'plural' => esc_html__('recipients', 'event_espresso'), |
|
42 | + 'description' => esc_html__('Recipient\'s are who will receive the template. You may want different payment details sent out depending on who the recipient is', 'event_espresso') |
|
43 | + ); |
|
44 | 44 | |
45 | - $this->_contexts = array( |
|
46 | - 'admin' => array( |
|
47 | - 'label' => esc_html__('Event Admin', 'event_espresso'), |
|
48 | - 'description' => esc_html__('This template is what event administrators will receive on a successful payment', 'event_espresso') |
|
49 | - ), |
|
50 | - 'primary_attendee' => array( |
|
51 | - 'label' => esc_html__('Primary Registrant', 'event_espresso'), |
|
52 | - 'description' => esc_html__('This template is what the primary registrant (the person who made the main registration) will receive on successful payment', 'event_espresso') |
|
53 | - ) |
|
54 | - ); |
|
55 | - } |
|
45 | + $this->_contexts = array( |
|
46 | + 'admin' => array( |
|
47 | + 'label' => esc_html__('Event Admin', 'event_espresso'), |
|
48 | + 'description' => esc_html__('This template is what event administrators will receive on a successful payment', 'event_espresso') |
|
49 | + ), |
|
50 | + 'primary_attendee' => array( |
|
51 | + 'label' => esc_html__('Primary Registrant', 'event_espresso'), |
|
52 | + 'description' => esc_html__('This template is what the primary registrant (the person who made the main registration) will receive on successful payment', 'event_espresso') |
|
53 | + ) |
|
54 | + ); |
|
55 | + } |
|
56 | 56 | } |
@@ -13,48 +13,48 @@ |
||
13 | 13 | */ |
14 | 14 | class EE_Registration_message_type extends EE_Registration_Base_message_type |
15 | 15 | { |
16 | - public function __construct() |
|
17 | - { |
|
18 | - $this->name = 'registration'; |
|
19 | - $this->description = esc_html__('This message type is for messages sent to attendees when their registration is approved.', 'event_espresso'); |
|
20 | - $this->label = array( |
|
21 | - 'singular' => esc_html__('registration approved', 'event_espresso'), |
|
22 | - 'plural' => esc_html__('registrations approved', 'event_espresso') |
|
23 | - ); |
|
16 | + public function __construct() |
|
17 | + { |
|
18 | + $this->name = 'registration'; |
|
19 | + $this->description = esc_html__('This message type is for messages sent to attendees when their registration is approved.', 'event_espresso'); |
|
20 | + $this->label = array( |
|
21 | + 'singular' => esc_html__('registration approved', 'event_espresso'), |
|
22 | + 'plural' => esc_html__('registrations approved', 'event_espresso') |
|
23 | + ); |
|
24 | 24 | |
25 | - parent::__construct(); |
|
26 | - } |
|
25 | + parent::__construct(); |
|
26 | + } |
|
27 | 27 | |
28 | 28 | |
29 | 29 | |
30 | - /** |
|
31 | - * _set_contexts |
|
32 | - * This sets up the contexts associated with the message_type |
|
33 | - * |
|
34 | - * @access protected |
|
35 | - * @return void |
|
36 | - */ |
|
37 | - protected function _set_contexts() |
|
38 | - { |
|
39 | - $this->_context_label = array( |
|
40 | - 'label' => esc_html__('recipient', 'event_espresso'), |
|
41 | - 'plural' => esc_html__('recipients', 'event_espresso'), |
|
42 | - 'description' => esc_html__('Recipient\'s are who will receive the template. You may want different registration details sent out depending on who the recipient is', 'event_espresso') |
|
43 | - ); |
|
30 | + /** |
|
31 | + * _set_contexts |
|
32 | + * This sets up the contexts associated with the message_type |
|
33 | + * |
|
34 | + * @access protected |
|
35 | + * @return void |
|
36 | + */ |
|
37 | + protected function _set_contexts() |
|
38 | + { |
|
39 | + $this->_context_label = array( |
|
40 | + 'label' => esc_html__('recipient', 'event_espresso'), |
|
41 | + 'plural' => esc_html__('recipients', 'event_espresso'), |
|
42 | + 'description' => esc_html__('Recipient\'s are who will receive the template. You may want different registration details sent out depending on who the recipient is', 'event_espresso') |
|
43 | + ); |
|
44 | 44 | |
45 | - $this->_contexts = array( |
|
46 | - 'admin' => array( |
|
47 | - 'label' => esc_html__('Event Admin', 'event_espresso'), |
|
48 | - 'description' => esc_html__('This template is what event administrators will receive with an approved registration', 'event_espresso') |
|
49 | - ), |
|
50 | - 'primary_attendee' => array( |
|
51 | - 'label' => esc_html__('Primary Registrant', 'event_espresso'), |
|
52 | - 'description' => esc_html__('This template is what the primary registrant (the person who completed the initial transaction) will receive with approved registration', 'event_espresso') |
|
53 | - ), |
|
54 | - 'attendee' => array( |
|
55 | - 'label' => esc_html__('Registrant', 'event_espresso'), |
|
56 | - 'description' => esc_html__('This template is what each registrant for the event will receive when their registration is approved.', 'event_espresso') |
|
57 | - ) |
|
58 | - ); |
|
59 | - } |
|
45 | + $this->_contexts = array( |
|
46 | + 'admin' => array( |
|
47 | + 'label' => esc_html__('Event Admin', 'event_espresso'), |
|
48 | + 'description' => esc_html__('This template is what event administrators will receive with an approved registration', 'event_espresso') |
|
49 | + ), |
|
50 | + 'primary_attendee' => array( |
|
51 | + 'label' => esc_html__('Primary Registrant', 'event_espresso'), |
|
52 | + 'description' => esc_html__('This template is what the primary registrant (the person who completed the initial transaction) will receive with approved registration', 'event_espresso') |
|
53 | + ), |
|
54 | + 'attendee' => array( |
|
55 | + 'label' => esc_html__('Registrant', 'event_espresso'), |
|
56 | + 'description' => esc_html__('This template is what each registrant for the event will receive when their registration is approved.', 'event_espresso') |
|
57 | + ) |
|
58 | + ); |
|
59 | + } |
|
60 | 60 | } |
@@ -13,59 +13,59 @@ |
||
13 | 13 | */ |
14 | 14 | class EE_Pending_Approval_message_type extends EE_Registration_Base_message_type |
15 | 15 | { |
16 | - public function __construct() |
|
17 | - { |
|
18 | - $this->name = 'pending_approval'; |
|
19 | - $this->description = esc_html__('This message type is used for recipients who have Pending Payment registration status.', 'event_espresso'); |
|
20 | - $this->label = array( |
|
21 | - 'singular' => esc_html__('registration pending payment', 'event_espresso'), |
|
22 | - 'plural' => esc_html__('registrations pending payment', 'event_espresso') |
|
23 | - ); |
|
16 | + public function __construct() |
|
17 | + { |
|
18 | + $this->name = 'pending_approval'; |
|
19 | + $this->description = esc_html__('This message type is used for recipients who have Pending Payment registration status.', 'event_espresso'); |
|
20 | + $this->label = array( |
|
21 | + 'singular' => esc_html__('registration pending payment', 'event_espresso'), |
|
22 | + 'plural' => esc_html__('registrations pending payment', 'event_espresso') |
|
23 | + ); |
|
24 | 24 | |
25 | - $this->_master_templates = array( |
|
26 | - 'email' => 'registration' |
|
27 | - ); |
|
25 | + $this->_master_templates = array( |
|
26 | + 'email' => 'registration' |
|
27 | + ); |
|
28 | 28 | |
29 | - parent::__construct(); |
|
30 | - } |
|
29 | + parent::__construct(); |
|
30 | + } |
|
31 | 31 | |
32 | 32 | |
33 | 33 | |
34 | - /** |
|
35 | - * _set_contexts |
|
36 | - * This sets up the contexts associated with the message_type |
|
37 | - * |
|
38 | - * @access protected |
|
39 | - * @return void |
|
40 | - */ |
|
41 | - protected function _set_contexts() |
|
42 | - { |
|
43 | - $this->_context_label = array( |
|
44 | - 'label' => esc_html__('recipient', 'event_espresso'), |
|
45 | - 'plural' => esc_html__('recipients', 'event_espresso'), |
|
46 | - 'description' => esc_html__('Recipient\'s are who will receive the template. You may want different pending approval details sent out depending on who the recipient is. To "turn off" a recipient from receiving message, simply remove any content from the "to" field in the template.', 'event_espresso') |
|
47 | - ); |
|
34 | + /** |
|
35 | + * _set_contexts |
|
36 | + * This sets up the contexts associated with the message_type |
|
37 | + * |
|
38 | + * @access protected |
|
39 | + * @return void |
|
40 | + */ |
|
41 | + protected function _set_contexts() |
|
42 | + { |
|
43 | + $this->_context_label = array( |
|
44 | + 'label' => esc_html__('recipient', 'event_espresso'), |
|
45 | + 'plural' => esc_html__('recipients', 'event_espresso'), |
|
46 | + 'description' => esc_html__('Recipient\'s are who will receive the template. You may want different pending approval details sent out depending on who the recipient is. To "turn off" a recipient from receiving message, simply remove any content from the "to" field in the template.', 'event_espresso') |
|
47 | + ); |
|
48 | 48 | |
49 | - $this->_contexts = array( |
|
50 | - 'admin' => array( |
|
51 | - 'label' => esc_html__('Event Admin', 'event_espresso'), |
|
52 | - 'description' => esc_html__('This template is what event administrators will receive when a message is sent to registrants with the pending payment registration status.', 'event_espresso') |
|
53 | - ), |
|
54 | - 'primary_attendee' => array( |
|
55 | - 'label' => esc_html__('Primary Registrant', 'event_espresso'), |
|
56 | - 'description' => esc_html__('This template is what the primary registrant (the person who completed the initial transaction) will receive on when their registration status is pending payment.', 'event_espresso') |
|
57 | - ) |
|
58 | - ); |
|
59 | - } |
|
49 | + $this->_contexts = array( |
|
50 | + 'admin' => array( |
|
51 | + 'label' => esc_html__('Event Admin', 'event_espresso'), |
|
52 | + 'description' => esc_html__('This template is what event administrators will receive when a message is sent to registrants with the pending payment registration status.', 'event_espresso') |
|
53 | + ), |
|
54 | + 'primary_attendee' => array( |
|
55 | + 'label' => esc_html__('Primary Registrant', 'event_espresso'), |
|
56 | + 'description' => esc_html__('This template is what the primary registrant (the person who completed the initial transaction) will receive on when their registration status is pending payment.', 'event_espresso') |
|
57 | + ) |
|
58 | + ); |
|
59 | + } |
|
60 | 60 | |
61 | 61 | |
62 | 62 | |
63 | - protected function _primary_attendee_addressees() |
|
64 | - { |
|
65 | - $cached = $this->_single_message; |
|
66 | - $this->_single_message = false; |
|
67 | - $addressees = parent::_primary_attendee_addressees(); |
|
68 | - $this->_single_message = $cached; |
|
69 | - return $addressees; |
|
70 | - } |
|
63 | + protected function _primary_attendee_addressees() |
|
64 | + { |
|
65 | + $cached = $this->_single_message; |
|
66 | + $this->_single_message = false; |
|
67 | + $addressees = parent::_primary_attendee_addressees(); |
|
68 | + $this->_single_message = $cached; |
|
69 | + return $addressees; |
|
70 | + } |
|
71 | 71 | } |
@@ -14,50 +14,50 @@ |
||
14 | 14 | |
15 | 15 | class EE_Payment_Refund_message_type extends EE_Payment_Base_message_type |
16 | 16 | { |
17 | - public function __construct() |
|
18 | - { |
|
19 | - |
|
20 | - // setup type details for reference |
|
21 | - $this->name = 'payment_refund'; |
|
22 | - $this->description = esc_html__('This message type is used for all payment notification messages that go out for refunds.', 'event_espresso'); |
|
23 | - $this->label = array( |
|
24 | - 'singular' => esc_html__('refund issued', 'event_espresso'), |
|
25 | - 'plural' => esc_html__('refunds issued', 'event_espresso') |
|
26 | - ); |
|
27 | - |
|
28 | - $this->_master_templates = array( |
|
29 | - 'email' => 'payment' |
|
30 | - ); |
|
31 | - |
|
32 | - parent::__construct(); |
|
33 | - } |
|
34 | - |
|
35 | - |
|
36 | - |
|
37 | - /** |
|
38 | - * _set_contexts |
|
39 | - * This sets up the contexts associated with the message_type |
|
40 | - * |
|
41 | - * @access protected |
|
42 | - * @return void |
|
43 | - */ |
|
44 | - protected function _set_contexts() |
|
45 | - { |
|
46 | - $this->_context_label = array( |
|
47 | - 'label' => esc_html__('recipient', 'event_espresso'), |
|
48 | - 'plural' => esc_html__('recipients', 'event_espresso'), |
|
49 | - 'description' => esc_html__('Recipient\'s are who will receive the template. You may want different payment details sent out depending on who the recipient is', 'event_espresso') |
|
50 | - ); |
|
51 | - |
|
52 | - $this->_contexts = array( |
|
53 | - 'admin' => array( |
|
54 | - 'label' => esc_html__('Event Admin', 'event_espresso'), |
|
55 | - 'description' => esc_html__('This template is what event administrators will receive on a successful refund.', 'event_espresso') |
|
56 | - ), |
|
57 | - 'primary_attendee' => array( |
|
58 | - 'label' => esc_html__('Primary Registrant', 'event_espresso'), |
|
59 | - 'description' => esc_html__('This template is what the primary registrant (the person who made the main registration) will receive on successful refund.', 'event_espresso') |
|
60 | - ) |
|
61 | - ); |
|
62 | - } |
|
17 | + public function __construct() |
|
18 | + { |
|
19 | + |
|
20 | + // setup type details for reference |
|
21 | + $this->name = 'payment_refund'; |
|
22 | + $this->description = esc_html__('This message type is used for all payment notification messages that go out for refunds.', 'event_espresso'); |
|
23 | + $this->label = array( |
|
24 | + 'singular' => esc_html__('refund issued', 'event_espresso'), |
|
25 | + 'plural' => esc_html__('refunds issued', 'event_espresso') |
|
26 | + ); |
|
27 | + |
|
28 | + $this->_master_templates = array( |
|
29 | + 'email' => 'payment' |
|
30 | + ); |
|
31 | + |
|
32 | + parent::__construct(); |
|
33 | + } |
|
34 | + |
|
35 | + |
|
36 | + |
|
37 | + /** |
|
38 | + * _set_contexts |
|
39 | + * This sets up the contexts associated with the message_type |
|
40 | + * |
|
41 | + * @access protected |
|
42 | + * @return void |
|
43 | + */ |
|
44 | + protected function _set_contexts() |
|
45 | + { |
|
46 | + $this->_context_label = array( |
|
47 | + 'label' => esc_html__('recipient', 'event_espresso'), |
|
48 | + 'plural' => esc_html__('recipients', 'event_espresso'), |
|
49 | + 'description' => esc_html__('Recipient\'s are who will receive the template. You may want different payment details sent out depending on who the recipient is', 'event_espresso') |
|
50 | + ); |
|
51 | + |
|
52 | + $this->_contexts = array( |
|
53 | + 'admin' => array( |
|
54 | + 'label' => esc_html__('Event Admin', 'event_espresso'), |
|
55 | + 'description' => esc_html__('This template is what event administrators will receive on a successful refund.', 'event_espresso') |
|
56 | + ), |
|
57 | + 'primary_attendee' => array( |
|
58 | + 'label' => esc_html__('Primary Registrant', 'event_espresso'), |
|
59 | + 'description' => esc_html__('This template is what the primary registrant (the person who made the main registration) will receive on successful refund.', 'event_espresso') |
|
60 | + ) |
|
61 | + ); |
|
62 | + } |
|
63 | 63 | } |
@@ -5,16 +5,16 @@ |
||
5 | 5 | */ |
6 | 6 | interface EEHI_Money |
7 | 7 | { |
8 | - /** |
|
9 | - * For comparing floats. Default operator is '=', but see the $operator below for all options. |
|
10 | - * This should be used to compare floats instead of normal '==' because floats |
|
11 | - * are inherently imprecise, and so you can sometimes have two floats that appear to be identical |
|
12 | - * but actually differ by 0.00000001. |
|
13 | - * |
|
14 | - * @param float $float1 |
|
15 | - * @param float $float2 |
|
16 | - * @param string $operator The operator. Valid options are =, <=, <, >=, >, <>, eq, lt, lte, gt, gte, ne |
|
17 | - * @return boolean whether the equation is true or false |
|
18 | - */ |
|
19 | - public function compare_floats($float1, $float2, $operator = '='); |
|
8 | + /** |
|
9 | + * For comparing floats. Default operator is '=', but see the $operator below for all options. |
|
10 | + * This should be used to compare floats instead of normal '==' because floats |
|
11 | + * are inherently imprecise, and so you can sometimes have two floats that appear to be identical |
|
12 | + * but actually differ by 0.00000001. |
|
13 | + * |
|
14 | + * @param float $float1 |
|
15 | + * @param float $float2 |
|
16 | + * @param string $operator The operator. Valid options are =, <=, <, >=, >, <>, eq, lt, lte, gt, gte, ne |
|
17 | + * @return boolean whether the equation is true or false |
|
18 | + */ |
|
19 | + public function compare_floats($float1, $float2, $operator = '='); |
|
20 | 20 | } |