@@ -26,13 +26,13 @@ discard block |
||
26 | 26 | |
27 | 27 | <p class="contact-details-buttons"> |
28 | 28 | <?php |
29 | - if ($att_check instanceof EE_Attendee |
|
30 | - && EE_Registry::instance()->CAP->current_user_can( |
|
31 | - 'ee_edit_contact', |
|
32 | - 'view_or_edit_contact_button', |
|
33 | - $att_check->ID() |
|
34 | - )) : |
|
35 | - ?> |
|
29 | + if ($att_check instanceof EE_Attendee |
|
30 | + && EE_Registry::instance()->CAP->current_user_can( |
|
31 | + 'ee_edit_contact', |
|
32 | + 'view_or_edit_contact_button', |
|
33 | + $att_check->ID() |
|
34 | + )) : |
|
35 | + ?> |
|
36 | 36 | <a class="button button-small" href="<?php echo $att_edit_link; ?>" |
37 | 37 | title="<?php echo esc_attr($att_edit_label); ?>"> |
38 | 38 | <span class="ee-icon ee-icon-user-edit"></span><?php echo $att_edit_label; ?> |
@@ -40,15 +40,15 @@ discard block |
||
40 | 40 | <?php if (! empty($create_link)) : ?> |
41 | 41 | <a class="button button-small" href="<?php echo $create_link; ?>" |
42 | 42 | title="<?php |
43 | - esc_attr_e( |
|
44 | - 'This registration shares the contact details for the primary registration in this group. If you\'d like this registration to have its own details, you can do so by clicking this button', |
|
45 | - 'event_espresso' |
|
46 | - ); ?>"> |
|
43 | + esc_attr_e( |
|
44 | + 'This registration shares the contact details for the primary registration in this group. If you\'d like this registration to have its own details, you can do so by clicking this button', |
|
45 | + 'event_espresso' |
|
46 | + ); ?>"> |
|
47 | 47 | <span class="ee-icon ee-icon-user-add-new"></span><?php echo $create_label; ?> |
48 | 48 | </a> |
49 | 49 | <?php endif; ?> |
50 | 50 | <div style="clear:both"></div> |
51 | 51 | <?php |
52 | - endif; |
|
52 | + endif; |
|
53 | 53 | ?> |
54 | 54 | </p> |
@@ -2,7 +2,7 @@ discard block |
||
2 | 2 | <p class="clearfix"> |
3 | 3 | <span class="admin-side-mbox-label-spn lt-grey-txt float-left"> |
4 | 4 | <?php _e('Name', 'event_espresso'); ?> |
5 | - </span><?php echo $fname . ' ' . $lname; ?> |
|
5 | + </span><?php echo $fname.' '.$lname; ?> |
|
6 | 6 | </p> |
7 | 7 | <p class="clearfix"> |
8 | 8 | <span class="admin-side-mbox-label-spn lt-grey-txt float-left"><?php _e('Email', 'event_espresso'); ?></span><a |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | title="<?php echo esc_attr($att_edit_label); ?>"> |
38 | 38 | <span class="ee-icon ee-icon-user-edit"></span><?php echo $att_edit_label; ?> |
39 | 39 | </a> |
40 | - <?php if (! empty($create_link)) : ?> |
|
40 | + <?php if ( ! empty($create_link)) : ?> |
|
41 | 41 | <a class="button button-small" href="<?php echo $create_link; ?>" |
42 | 42 | title="<?php |
43 | 43 | esc_attr_e( |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | <tbody> |
21 | 21 | |
22 | 22 | <?php |
23 | - foreach ($attendees as $att_nmbr => $attendee) : ?> |
|
23 | + foreach ($attendees as $att_nmbr => $attendee) : ?> |
|
24 | 24 | <tr class="ee-status-strip reg-status-<?php echo $attendee['STS_ID']; ?>" |
25 | 25 | style="display: table-row;"> |
26 | 26 | <td class="jst-left"><?php echo $att_nmbr; ?></td> |
@@ -33,9 +33,9 @@ discard block |
||
33 | 33 | </td> |
34 | 34 | <td class="jst-rght"> |
35 | 35 | <?php echo $currency_sign . ' ' . number_format( |
36 | - $attendee['final_price'], |
|
37 | - 2 |
|
38 | - ); ?></td> |
|
36 | + $attendee['final_price'], |
|
37 | + 2 |
|
38 | + ); ?></td> |
|
39 | 39 | <td class="jst-left"><?php echo $attendee['email']; ?></td> |
40 | 40 | <td class="jst-left"><?php echo $attendee['address']; ?></td> |
41 | 41 | <!--<th class="jst-cntr">view</th>--> |
@@ -3,7 +3,7 @@ discard block |
||
3 | 3 | <br/> |
4 | 4 | <?php // echo EEH_Debug_Tools::printr( $event_attendees, 'event_attendees' ); ?> |
5 | 5 | <?php echo $attendee_notice; ?> |
6 | - <?php if (! empty($attendees)) : ?> |
|
6 | + <?php if ( ! empty($attendees)) : ?> |
|
7 | 7 | <div class="admin-primary-mbox-tbl-wrap"> |
8 | 8 | <table id="reg-admin-transaction-attendees-table" class="admin-primary-mbox-tbl"> |
9 | 9 | <thead> |
@@ -28,11 +28,11 @@ discard block |
||
28 | 28 | <td class="jst-left"> |
29 | 29 | <a href="<?php echo $attendee['att_link']; ?>" |
30 | 30 | title="<?php esc_attr_e('View details for this attendee', 'event_espresso'); ?>"> |
31 | - <?php echo $attendee['fname'] . ' ' . $attendee['lname']; ?> |
|
31 | + <?php echo $attendee['fname'].' '.$attendee['lname']; ?> |
|
32 | 32 | </a> |
33 | 33 | </td> |
34 | 34 | <td class="jst-rght"> |
35 | - <?php echo $currency_sign . ' ' . number_format( |
|
35 | + <?php echo $currency_sign.' '.number_format( |
|
36 | 36 | $attendee['final_price'], |
37 | 37 | 2 |
38 | 38 | ); ?></td> |
@@ -1,82 +1,82 @@ discard block |
||
1 | 1 | <div id="single-page-checkout" class="ui-widget"> |
2 | 2 | <?php do_action( |
3 | - 'AHEE__registration_page_registration_questions__template__after_spco_attendee_information_header' |
|
4 | - ) ?> |
|
3 | + 'AHEE__registration_page_registration_questions__template__after_spco_attendee_information_header' |
|
4 | + ) ?> |
|
5 | 5 | <div id="spco-attendee_information-dv" class="spco-step-dv"> |
6 | 6 | |
7 | 7 | <p id="spco-attendee_information-pg" class="spco-steps-pg small-text drk-grey-text"> |
8 | 8 | <?php printf( |
9 | - __( |
|
10 | - 'In order to process your registration, we ask you to provide the following information.%1$sPlease note that all fields marked with an asterisk (%2$s) are required.', |
|
11 | - 'event_espresso' |
|
12 | - ), |
|
13 | - '<br />', |
|
14 | - '<span class="asterisk">*</span>' |
|
15 | - ); ?> |
|
9 | + __( |
|
10 | + 'In order to process your registration, we ask you to provide the following information.%1$sPlease note that all fields marked with an asterisk (%2$s) are required.', |
|
11 | + 'event_espresso' |
|
12 | + ), |
|
13 | + '<br />', |
|
14 | + '<span class="asterisk">*</span>' |
|
15 | + ); ?> |
|
16 | 16 | </p> |
17 | 17 | |
18 | 18 | <?php |
19 | - global $css_class; |
|
20 | - $att_nmbr = 0; |
|
21 | - $prev_event = ''; |
|
19 | + global $css_class; |
|
20 | + $att_nmbr = 0; |
|
21 | + $prev_event = ''; |
|
22 | 22 | |
23 | - if ($event_queue['total_items'] > 0) { |
|
24 | - foreach ($event_queue['items'] as $line_item => $item) { |
|
25 | - $att_nmbr++; |
|
26 | - if ($item['attendee_questions'] != '') { |
|
27 | - ?> |
|
23 | + if ($event_queue['total_items'] > 0) { |
|
24 | + foreach ($event_queue['items'] as $line_item => $item) { |
|
25 | + $att_nmbr++; |
|
26 | + if ($item['attendee_questions'] != '') { |
|
27 | + ?> |
|
28 | 28 | |
29 | 29 | <div id="spco-attendee-panel-dv-<?php echo $line_item; ?>" class="spco-attendee-panel-dv"> |
30 | 30 | |
31 | 31 | <?php |
32 | - if ($item['ticket']->name() != $prev_event) { ?> |
|
32 | + if ($item['ticket']->name() != $prev_event) { ?> |
|
33 | 33 | <p class="spco-ticket-info-pg"> |
34 | 34 | <?php |
35 | - echo $item['ticket']->name() . ': ' |
|
36 | - . EEH_Template::format_currency( |
|
37 | - $item['ticket']->price(), |
|
38 | - false, |
|
39 | - false |
|
40 | - ); |
|
41 | - echo $item['ticket']->qty() |
|
42 | - ? ' x ' . $ticket_count[ $item['ticket']->ID() ] |
|
43 | - . __( |
|
44 | - ' tickets', |
|
45 | - 'event_espresso' |
|
46 | - ) . ' = ' |
|
47 | - . EEH_Template::format_currency( |
|
48 | - $item['ticket']->price() * $ticket_count[ $item['ticket']->ID() ] |
|
49 | - ) |
|
50 | - : ''; |
|
51 | - echo $item['ticket']->description() |
|
52 | - ? '<br/>' . __( |
|
53 | - 'Ticket Details: ', |
|
54 | - 'event_espresso' |
|
55 | - ) . $item['ticket']->description() : ''; |
|
56 | - ?> |
|
35 | + echo $item['ticket']->name() . ': ' |
|
36 | + . EEH_Template::format_currency( |
|
37 | + $item['ticket']->price(), |
|
38 | + false, |
|
39 | + false |
|
40 | + ); |
|
41 | + echo $item['ticket']->qty() |
|
42 | + ? ' x ' . $ticket_count[ $item['ticket']->ID() ] |
|
43 | + . __( |
|
44 | + ' tickets', |
|
45 | + 'event_espresso' |
|
46 | + ) . ' = ' |
|
47 | + . EEH_Template::format_currency( |
|
48 | + $item['ticket']->price() * $ticket_count[ $item['ticket']->ID() ] |
|
49 | + ) |
|
50 | + : ''; |
|
51 | + echo $item['ticket']->description() |
|
52 | + ? '<br/>' . __( |
|
53 | + 'Ticket Details: ', |
|
54 | + 'event_espresso' |
|
55 | + ) . $item['ticket']->description() : ''; |
|
56 | + ?> |
|
57 | 57 | </p> |
58 | 58 | |
59 | 59 | <?php |
60 | - } |
|
61 | - ?> |
|
60 | + } |
|
61 | + ?> |
|
62 | 62 | |
63 | 63 | <fieldset id="spco-attendee-wrap-<?php echo $line_item; ?>" class="spco-attendee-wrap-fs"> |
64 | 64 | <legend class="spco-attendee-lgnd smaller-text lt-grey-text"> |
65 | 65 | <?php echo __( |
66 | - 'Registrant #', |
|
67 | - 'event_espresso' |
|
68 | - ) . $att_nmbr; ?></legend> |
|
66 | + 'Registrant #', |
|
67 | + 'event_espresso' |
|
68 | + ) . $att_nmbr; ?></legend> |
|
69 | 69 | |
70 | 70 | <?php |
71 | - // do an action before the questions output, including the item and count |
|
72 | - echo do_action( |
|
73 | - 'AHEE__registration_page_registration_questions__template___before_questions', |
|
74 | - $item, |
|
75 | - $att_nmbr |
|
76 | - ); |
|
77 | - echo $item['attendee_questions']; |
|
78 | - |
|
79 | - if ($att_nmbr == 1 && $print_copy_info) { ?> |
|
71 | + // do an action before the questions output, including the item and count |
|
72 | + echo do_action( |
|
73 | + 'AHEE__registration_page_registration_questions__template___before_questions', |
|
74 | + $item, |
|
75 | + $att_nmbr |
|
76 | + ); |
|
77 | + echo $item['attendee_questions']; |
|
78 | + |
|
79 | + if ($att_nmbr == 1 && $print_copy_info) { ?> |
|
80 | 80 | <input type="hidden" id="primary-attendee" name="qstn[primary_attendee]" |
81 | 81 | value="<?php echo $prmy_att_input_name ?>"/> |
82 | 82 | |
@@ -85,9 +85,9 @@ discard block |
||
85 | 85 | <p class="spco-copy-all-attendee-pg"> |
86 | 86 | <label class="wide"> |
87 | 87 | <?php _e( |
88 | - 'Use Registrant #1\'s information for ALL registrants', |
|
89 | - 'event_espresso' |
|
90 | - ); ?> |
|
88 | + 'Use Registrant #1\'s information for ALL registrants', |
|
89 | + 'event_espresso' |
|
90 | + ); ?> |
|
91 | 91 | <input id="spco-copy-all-attendee-chk" |
92 | 92 | class="spco-copy-all-attendee-chk ui-widget-content ui-corner-all" |
93 | 93 | type="checkbox" value="copy-all"> |
@@ -96,46 +96,46 @@ discard block |
||
96 | 96 | |
97 | 97 | <p class="spco-copy-attendee-pg"> |
98 | 98 | <?php _e( |
99 | - 'This option allows you to use the above information for all additional registrant question fields. <span>( Please note that some events may have additional questions that you may still be required to answer in order to complete your registration. )</span>', |
|
100 | - 'event_espresso' |
|
101 | - ); ?></p> |
|
99 | + 'This option allows you to use the above information for all additional registrant question fields. <span>( Please note that some events may have additional questions that you may still be required to answer in order to complete your registration. )</span>', |
|
100 | + 'event_espresso' |
|
101 | + ); ?></p> |
|
102 | 102 | |
103 | 103 | <a id="display-more-attendee-copy-options" |
104 | 104 | class="display-the-hidden smaller-text float-right" |
105 | 105 | rel="more-attendee-copy-options"> |
106 | 106 | <?php _e( |
107 | - 'more options', |
|
108 | - 'event_espresso' |
|
109 | - ); ?></a> |
|
107 | + 'more options', |
|
108 | + 'event_espresso' |
|
109 | + ); ?></a> |
|
110 | 110 | |
111 | 111 | <div id="more-attendee-copy-options-dv" class=""> |
112 | 112 | <a id="hide-more-attendee-copy-options" |
113 | 113 | class="hide-the-displayed smaller-text float-right" |
114 | 114 | rel="more-attendee-copy-options"> |
115 | 115 | <?php _e( |
116 | - 'less options', |
|
117 | - 'event_espresso' |
|
118 | - ); ?></a> |
|
116 | + 'less options', |
|
117 | + 'event_espresso' |
|
118 | + ); ?></a> |
|
119 | 119 | <p class="spco-copy-attendee-pg"> |
120 | 120 | <?php _e( |
121 | - 'The following checkboxes allow you to use the above information for only the selected additional event registrants.', |
|
122 | - 'event_espresso' |
|
123 | - ); ?> |
|
121 | + 'The following checkboxes allow you to use the above information for only the selected additional event registrants.', |
|
122 | + 'event_espresso' |
|
123 | + ); ?> |
|
124 | 124 | </p> |
125 | 125 | |
126 | 126 | <?php |
127 | - foreach ($additional_event_attendees as $event_attendees) { |
|
128 | - foreach ($event_attendees as $attendee) { |
|
129 | - if ($attendee['event_hdr']) { ?> |
|
127 | + foreach ($additional_event_attendees as $event_attendees) { |
|
128 | + foreach ($event_attendees as $attendee) { |
|
129 | + if ($attendee['event_hdr']) { ?> |
|
130 | 130 | <h6 class="spco-copy-attendee-event-hdr"><?php echo $attendee['event_hdr']; ?></h6> |
131 | 131 | <?php } ?> |
132 | 132 | |
133 | 133 | <p class="event_form_field spco-copy-attendee-chk-pg"> |
134 | 134 | <label> |
135 | 135 | <?php echo __( |
136 | - 'Attendee #', |
|
137 | - 'event_espresso' |
|
138 | - ) . $attendee['att_nmbr']; ?> |
|
136 | + 'Attendee #', |
|
137 | + 'event_espresso' |
|
138 | + ) . $attendee['att_nmbr']; ?> |
|
139 | 139 | <input type="checkbox" |
140 | 140 | id="spco-copy-attendee-chk-<?php echo $attendee['input_id']; ?>" |
141 | 141 | class="spco-copy-attendee-chk <?php echo $css_class; ?>" |
@@ -153,25 +153,25 @@ discard block |
||
153 | 153 | <div class="clear-float"></div> |
154 | 154 | </div> |
155 | 155 | <?php |
156 | - $print_copy_info = false; |
|
157 | - } elseif ($att_nmbr == 1) { |
|
158 | - ?> |
|
156 | + $print_copy_info = false; |
|
157 | + } elseif ($att_nmbr == 1) { |
|
158 | + ?> |
|
159 | 159 | <p id="spco-auto-copy-attendee-pg" class="smaller-text lt-grey-text"> |
160 | 160 | <?php _e( |
161 | - 'The above information will be used for any additional tickets/registrants.', |
|
162 | - 'event_espresso' |
|
163 | - ); ?> |
|
161 | + 'The above information will be used for any additional tickets/registrants.', |
|
162 | + 'event_espresso' |
|
163 | + ); ?> |
|
164 | 164 | </p> |
165 | 165 | <?php |
166 | - } |
|
167 | - ?> |
|
166 | + } |
|
167 | + ?> |
|
168 | 168 | </fieldset> |
169 | 169 | |
170 | 170 | </div> |
171 | 171 | <?php |
172 | - } else { |
|
173 | - if ($att_nmbr == 1) { |
|
174 | - ?> |
|
172 | + } else { |
|
173 | + if ($att_nmbr == 1) { |
|
174 | + ?> |
|
175 | 175 | <div id="spco-attendee-panel-dv-<?php echo $line_item; ?>" class="spco-attendee-panel-dv"> |
176 | 176 | <h3 id="event_title-<?php echo $item['ticket']->ID() ?>" class="big-event-title-hdr"> |
177 | 177 | <?php echo $item['event']->name(); ?> |
@@ -179,24 +179,24 @@ discard block |
||
179 | 179 | <fieldset id="spco-attendee-wrap-<?php echo $line_item; ?>" class="spco-attendee-wrap-fs"> |
180 | 180 | <h6> |
181 | 181 | <?php _e( |
182 | - 'No information is required to attend this event. Please proceed to the next Step', |
|
183 | - 'event_espresso' |
|
184 | - ); ?></h6> |
|
182 | + 'No information is required to attend this event. Please proceed to the next Step', |
|
183 | + 'event_espresso' |
|
184 | + ); ?></h6> |
|
185 | 185 | <input type="hidden" id="no-questions" name="qstn[]" value="0"/> |
186 | 186 | </fieldset> |
187 | 187 | </div> |
188 | 188 | <?php |
189 | - } |
|
190 | - } |
|
191 | - echo $item['additional_attendee_reg_info']; |
|
192 | - $prev_event = $item['ticket']->name(); |
|
193 | - } // $event_queue['items'] as $line_item |
|
194 | - } // $event_queue['total_items'] |
|
195 | - ?> |
|
189 | + } |
|
190 | + } |
|
191 | + echo $item['additional_attendee_reg_info']; |
|
192 | + $prev_event = $item['ticket']->name(); |
|
193 | + } // $event_queue['items'] as $line_item |
|
194 | + } // $event_queue['total_items'] |
|
195 | + ?> |
|
196 | 196 | <div><a id="spco-display-event-questions-lnk" |
197 | 197 | class="act-like-link smaller-text hidden hide-if-no-js float-right"><?php _e( |
198 | - 'show event questions', |
|
199 | - 'event_espresso' |
|
200 | - ); ?></a></div> |
|
198 | + 'show event questions', |
|
199 | + 'event_espresso' |
|
200 | + ); ?></a></div> |
|
201 | 201 | </div> |
202 | 202 | </div> <!-- #single-page-checkout --> |
203 | 203 | \ No newline at end of file |
@@ -32,27 +32,27 @@ discard block |
||
32 | 32 | if ($item['ticket']->name() != $prev_event) { ?> |
33 | 33 | <p class="spco-ticket-info-pg"> |
34 | 34 | <?php |
35 | - echo $item['ticket']->name() . ': ' |
|
35 | + echo $item['ticket']->name().': ' |
|
36 | 36 | . EEH_Template::format_currency( |
37 | 37 | $item['ticket']->price(), |
38 | 38 | false, |
39 | 39 | false |
40 | 40 | ); |
41 | 41 | echo $item['ticket']->qty() |
42 | - ? ' x ' . $ticket_count[ $item['ticket']->ID() ] |
|
42 | + ? ' x '.$ticket_count[$item['ticket']->ID()] |
|
43 | 43 | . __( |
44 | 44 | ' tickets', |
45 | 45 | 'event_espresso' |
46 | - ) . ' = ' |
|
46 | + ).' = ' |
|
47 | 47 | . EEH_Template::format_currency( |
48 | - $item['ticket']->price() * $ticket_count[ $item['ticket']->ID() ] |
|
48 | + $item['ticket']->price() * $ticket_count[$item['ticket']->ID()] |
|
49 | 49 | ) |
50 | 50 | : ''; |
51 | 51 | echo $item['ticket']->description() |
52 | - ? '<br/>' . __( |
|
52 | + ? '<br/>'.__( |
|
53 | 53 | 'Ticket Details: ', |
54 | 54 | 'event_espresso' |
55 | - ) . $item['ticket']->description() : ''; |
|
55 | + ).$item['ticket']->description() : ''; |
|
56 | 56 | ?> |
57 | 57 | </p> |
58 | 58 | |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | <?php echo __( |
66 | 66 | 'Registrant #', |
67 | 67 | 'event_espresso' |
68 | - ) . $att_nmbr; ?></legend> |
|
68 | + ).$att_nmbr; ?></legend> |
|
69 | 69 | |
70 | 70 | <?php |
71 | 71 | // do an action before the questions output, including the item and count |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | <?php echo __( |
136 | 136 | 'Attendee #', |
137 | 137 | 'event_espresso' |
138 | - ) . $attendee['att_nmbr']; ?> |
|
138 | + ).$attendee['att_nmbr']; ?> |
|
139 | 139 | <input type="checkbox" |
140 | 140 | id="spco-copy-attendee-chk-<?php echo $attendee['input_id']; ?>" |
141 | 141 | class="spco-copy-attendee-chk <?php echo $css_class; ?>" |
@@ -17,17 +17,17 @@ discard block |
||
17 | 17 | <?php echo $nonce; ?> |
18 | 18 | <?php echo $status_buttons; ?> |
19 | 19 | <?php |
20 | - if ($attendee instanceof EE_Attendee |
|
21 | - && EE_Registry::instance()->CAP->current_user_can( |
|
22 | - 'ee_send_message', |
|
23 | - 'registration_message_type' |
|
24 | - )) : ?> |
|
20 | + if ($attendee instanceof EE_Attendee |
|
21 | + && EE_Registry::instance()->CAP->current_user_can( |
|
22 | + 'ee_send_message', |
|
23 | + 'registration_message_type' |
|
24 | + )) : ?> |
|
25 | 25 | <span id="send-related-messages-dv"> |
26 | 26 | <label for="txn-reg-status-send-notifications-inp" class="important-notice"> |
27 | 27 | <?php _e( |
28 | - '...and send related messages ?', |
|
29 | - 'event_espresso' |
|
30 | - ); ?> |
|
28 | + '...and send related messages ?', |
|
29 | + 'event_espresso' |
|
30 | + ); ?> |
|
31 | 31 | <input type="checkbox" value="1" id="txn-reg-status-send-notifications-inp" |
32 | 32 | name="txn_reg_status_change[send_notifications]"> |
33 | 33 | </label> |
@@ -36,9 +36,9 @@ discard block |
||
36 | 36 | <br/> |
37 | 37 | <p class="description"> |
38 | 38 | <?php _e( |
39 | - 'If the "send related messages"checkbox is checked when changing status, then the related messages will be sent to the registrant.', |
|
40 | - 'event_espresso' |
|
41 | - ); ?></p> |
|
39 | + 'If the "send related messages"checkbox is checked when changing status, then the related messages will be sent to the registrant.', |
|
40 | + 'event_espresso' |
|
41 | + ); ?></p> |
|
42 | 42 | <?php endif; ?> |
43 | 43 | </form> |
44 | 44 | </div> |
@@ -23,16 +23,16 @@ discard block |
||
23 | 23 | <td> |
24 | 24 | <div class="validation-notice-dv"> |
25 | 25 | <?php _e( |
26 | - 'The following is a required field', |
|
27 | - 'event_espresso' |
|
28 | - ); ?></div> |
|
26 | + 'The following is a required field', |
|
27 | + 'event_espresso' |
|
28 | + ); ?></div> |
|
29 | 29 | <input class="regular-text required" type="text" id="ATT_fname" name="ATT_fname" |
30 | 30 | value="<?php echo $attendee->fname(); ?>"/><br/> |
31 | 31 | <p class="description"> |
32 | 32 | <?php _e( |
33 | - 'The registrant\'s given name. ( required value )', |
|
34 | - 'event_espresso' |
|
35 | - ); ?></p> |
|
33 | + 'The registrant\'s given name. ( required value )', |
|
34 | + 'event_espresso' |
|
35 | + ); ?></p> |
|
36 | 36 | </td> |
37 | 37 | </tr> |
38 | 38 | |
@@ -44,16 +44,16 @@ discard block |
||
44 | 44 | <td> |
45 | 45 | <div class="validation-notice-dv"> |
46 | 46 | <?php _e( |
47 | - 'The following is a required field', |
|
48 | - 'event_espresso' |
|
49 | - ); ?></div> |
|
47 | + 'The following is a required field', |
|
48 | + 'event_espresso' |
|
49 | + ); ?></div> |
|
50 | 50 | <input class="regular-text required" type="text" id="ATT_lname" name="ATT_lname" |
51 | 51 | value="<?php echo $attendee->lname(); ?>"/><br/> |
52 | 52 | <p class="description"> |
53 | 53 | <?php _e( |
54 | - 'The registrant\'s family name. ( required value )', |
|
55 | - 'event_espresso' |
|
56 | - ); ?></p> |
|
54 | + 'The registrant\'s family name. ( required value )', |
|
55 | + 'event_espresso' |
|
56 | + ); ?></p> |
|
57 | 57 | </td> |
58 | 58 | </tr> |
59 | 59 | |
@@ -65,9 +65,9 @@ discard block |
||
65 | 65 | <td> |
66 | 66 | <div class="validation-notice-dv"> |
67 | 67 | <?php _e( |
68 | - 'The following is a required field', |
|
69 | - 'event_espresso' |
|
70 | - ); ?></div> |
|
68 | + 'The following is a required field', |
|
69 | + 'event_espresso' |
|
70 | + ); ?></div> |
|
71 | 71 | <input class="regular-text required" type="text" id="ATT_email" name="ATT_email" |
72 | 72 | value="<?php $attendee->f('ATT_email'); ?>"/><br/> |
73 | 73 | <p class="description"><?php _e('( required value )', 'event_espresso'); ?></p> |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <h1><span class="small-text not-bold"> |
2 | 2 | <?php _e( |
3 | - 'Adding Registration For: ', |
|
4 | - 'event_espresso' |
|
5 | - ); ?></span><?php echo $event_name; ?></h1> |
|
3 | + 'Adding Registration For: ', |
|
4 | + 'event_espresso' |
|
5 | + ); ?></span><?php echo $event_name; ?></h1> |
|
6 | 6 | <?php echo $step_content; |
@@ -1,23 +1,23 @@ |
||
1 | 1 | <div style="float:right"> |
2 | 2 | <?php printf( |
3 | - __('View %1$sRegistrations%4$s / %2$sTransactions%4$s for this %3$sevent%4$s.', 'event_espresso'), |
|
4 | - '<a href="' . $filtered_registrations_link . '">', |
|
5 | - '<a href="' . $filtered_transactions_link . '">', |
|
6 | - '<a href="' . $event_link . '">', |
|
7 | - '</a>' |
|
8 | - ); ?> |
|
3 | + __('View %1$sRegistrations%4$s / %2$sTransactions%4$s for this %3$sevent%4$s.', 'event_espresso'), |
|
4 | + '<a href="' . $filtered_registrations_link . '">', |
|
5 | + '<a href="' . $filtered_transactions_link . '">', |
|
6 | + '<a href="' . $event_link . '">', |
|
7 | + '</a>' |
|
8 | + ); ?> |
|
9 | 9 | </div> |
10 | 10 | <h3 id="reg-admin-reg-details-reg-nmbr-hdr"><?php echo $previous_registration . ' '; |
11 | - echo __('Registration # ', 'event_espresso') . $reg_nmbr['value']; |
|
12 | - echo ' ' . $next_registration; ?></h3> |
|
11 | + echo __('Registration # ', 'event_espresso') . $reg_nmbr['value']; |
|
12 | + echo ' ' . $next_registration; ?></h3> |
|
13 | 13 | <h2 id="reg-admin-reg-details-reg-date-hdr"><?php echo $reg_datetime['value']; ?></h2> |
14 | 14 | |
15 | 15 | <?php if ($registration->group_size() > 1) : ?> |
16 | 16 | <a id="scroll-to-other-attendees" class="scroll-to" href="#other-attendees"> |
17 | 17 | <?php echo __( |
18 | - 'Scroll to Other Registrations in the Same Transaction', |
|
19 | - 'event_espresso' |
|
20 | - ); ?></a> |
|
18 | + 'Scroll to Other Registrations in the Same Transaction', |
|
19 | + 'event_espresso' |
|
20 | + ); ?></a> |
|
21 | 21 | <?php endif; ?> |
22 | 22 | |
23 | 23 | <?php do_action('AHEE__reg_status_change_buttons__after_header', $REG_ID); ?> |
@@ -1,15 +1,15 @@ |
||
1 | 1 | <div style="float:right"> |
2 | 2 | <?php printf( |
3 | 3 | __('View %1$sRegistrations%4$s / %2$sTransactions%4$s for this %3$sevent%4$s.', 'event_espresso'), |
4 | - '<a href="' . $filtered_registrations_link . '">', |
|
5 | - '<a href="' . $filtered_transactions_link . '">', |
|
6 | - '<a href="' . $event_link . '">', |
|
4 | + '<a href="'.$filtered_registrations_link.'">', |
|
5 | + '<a href="'.$filtered_transactions_link.'">', |
|
6 | + '<a href="'.$event_link.'">', |
|
7 | 7 | '</a>' |
8 | 8 | ); ?> |
9 | 9 | </div> |
10 | -<h3 id="reg-admin-reg-details-reg-nmbr-hdr"><?php echo $previous_registration . ' '; |
|
11 | - echo __('Registration # ', 'event_espresso') . $reg_nmbr['value']; |
|
12 | - echo ' ' . $next_registration; ?></h3> |
|
10 | +<h3 id="reg-admin-reg-details-reg-nmbr-hdr"><?php echo $previous_registration.' '; |
|
11 | + echo __('Registration # ', 'event_espresso').$reg_nmbr['value']; |
|
12 | + echo ' '.$next_registration; ?></h3> |
|
13 | 13 | <h2 id="reg-admin-reg-details-reg-date-hdr"><?php echo $reg_datetime['value']; ?></h2> |
14 | 14 | |
15 | 15 | <?php if ($registration->group_size() > 1) : ?> |
@@ -17,62 +17,62 @@ |
||
17 | 17 | <tr> |
18 | 18 | <td class="jst-left"> |
19 | 19 | <?php |
20 | - $event_url = add_query_arg( |
|
21 | - array('action' => 'edit', 'post' => $registration->event_ID()), |
|
22 | - admin_url('admin.php?page=espresso_events') |
|
23 | - ); |
|
24 | - echo EE_Registry::instance()->CAP->current_user_can( |
|
25 | - 'ee_edit_event', |
|
26 | - 'espresso_events_edit', |
|
27 | - $registration->event_ID() |
|
28 | - ) ? '<a href="' . $event_url . '" title="' |
|
29 | - . esc_attr__( |
|
30 | - 'Edit Event', |
|
31 | - 'event_espresso' |
|
32 | - ) . '">' . $registration->event_name() . '</a>' : $registration->event_name(); |
|
33 | - ?> |
|
20 | + $event_url = add_query_arg( |
|
21 | + array('action' => 'edit', 'post' => $registration->event_ID()), |
|
22 | + admin_url('admin.php?page=espresso_events') |
|
23 | + ); |
|
24 | + echo EE_Registry::instance()->CAP->current_user_can( |
|
25 | + 'ee_edit_event', |
|
26 | + 'espresso_events_edit', |
|
27 | + $registration->event_ID() |
|
28 | + ) ? '<a href="' . $event_url . '" title="' |
|
29 | + . esc_attr__( |
|
30 | + 'Edit Event', |
|
31 | + 'event_espresso' |
|
32 | + ) . '">' . $registration->event_name() . '</a>' : $registration->event_name(); |
|
33 | + ?> |
|
34 | 34 | </td> |
35 | 35 | <td class="jst-left"> |
36 | 36 | <?php |
37 | - $reg_url = EE_Admin_Page::add_query_args_and_nonce( |
|
38 | - array('action' => 'view_registration', '_REG_ID' => $registration->ID()), |
|
39 | - REG_ADMIN_URL |
|
40 | - ); |
|
41 | - echo EE_Registry::instance()->CAP->current_user_can( |
|
42 | - 'ee_read_registration', |
|
43 | - 'espresso_registrations_view_registration', |
|
44 | - $registration->ID() |
|
45 | - ) ? ' |
|
37 | + $reg_url = EE_Admin_Page::add_query_args_and_nonce( |
|
38 | + array('action' => 'view_registration', '_REG_ID' => $registration->ID()), |
|
39 | + REG_ADMIN_URL |
|
40 | + ); |
|
41 | + echo EE_Registry::instance()->CAP->current_user_can( |
|
42 | + 'ee_read_registration', |
|
43 | + 'espresso_registrations_view_registration', |
|
44 | + $registration->ID() |
|
45 | + ) ? ' |
|
46 | 46 | <a href="' . $reg_url . '" title="' |
47 | - . esc_attr__( |
|
48 | - 'View Registration Details', |
|
49 | - 'event_espresso' |
|
50 | - ) . '">' . |
|
51 | - esc_html__('View Registration', 'event_espresso') . |
|
52 | - '</a>' : $registration->ID(); |
|
53 | - ?> |
|
47 | + . esc_attr__( |
|
48 | + 'View Registration Details', |
|
49 | + 'event_espresso' |
|
50 | + ) . '">' . |
|
51 | + esc_html__('View Registration', 'event_espresso') . |
|
52 | + '</a>' : $registration->ID(); |
|
53 | + ?> |
|
54 | 54 | </td> |
55 | 55 | <td class="jst-left"> |
56 | 56 | <?php |
57 | - $txn_url = EE_Admin_Page::add_query_args_and_nonce( |
|
58 | - array('action' => 'view_transaction', 'TXN_ID' => $registration->transaction_ID()), |
|
59 | - TXN_ADMIN_URL |
|
60 | - ); |
|
61 | - echo EE_Registry::instance()->CAP->current_user_can( |
|
62 | - 'ee_read_transaction', |
|
63 | - 'espresso_transactions_view_transaction' |
|
64 | - ) ? ' |
|
57 | + $txn_url = EE_Admin_Page::add_query_args_and_nonce( |
|
58 | + array('action' => 'view_transaction', 'TXN_ID' => $registration->transaction_ID()), |
|
59 | + TXN_ADMIN_URL |
|
60 | + ); |
|
61 | + echo EE_Registry::instance()->CAP->current_user_can( |
|
62 | + 'ee_read_transaction', |
|
63 | + 'espresso_transactions_view_transaction' |
|
64 | + ) ? ' |
|
65 | 65 | <a href="' . $txn_url . '" title="' |
66 | - . esc_attr__( |
|
67 | - 'View Transaction Details', |
|
68 | - 'event_espresso' |
|
69 | - ) . '">' . |
|
70 | - sprintf( |
|
71 | - esc_html__('View Transaction %d', 'event_espresso'), |
|
72 | - $registration->transaction_ID() |
|
73 | - ) . |
|
74 | - '</a>' : $registration->transaction_ID(); |
|
75 | - ?> |
|
66 | + . esc_attr__( |
|
67 | + 'View Transaction Details', |
|
68 | + 'event_espresso' |
|
69 | + ) . '">' . |
|
70 | + sprintf( |
|
71 | + esc_html__('View Transaction %d', 'event_espresso'), |
|
72 | + $registration->transaction_ID() |
|
73 | + ) . |
|
74 | + '</a>' : $registration->transaction_ID(); |
|
75 | + ?> |
|
76 | 76 | </td> |
77 | 77 | <td class="jst-left"><?php echo $registration->reg_code(); ?></td> |
78 | 78 | <td class="jst-rght"><?php echo EEH_Template::format_currency($registration->final_price()); ?></td> |
@@ -25,11 +25,11 @@ discard block |
||
25 | 25 | 'ee_edit_event', |
26 | 26 | 'espresso_events_edit', |
27 | 27 | $registration->event_ID() |
28 | - ) ? '<a href="' . $event_url . '" title="' |
|
28 | + ) ? '<a href="'.$event_url.'" title="' |
|
29 | 29 | . esc_attr__( |
30 | 30 | 'Edit Event', |
31 | 31 | 'event_espresso' |
32 | - ) . '">' . $registration->event_name() . '</a>' : $registration->event_name(); |
|
32 | + ).'">'.$registration->event_name().'</a>' : $registration->event_name(); |
|
33 | 33 | ?> |
34 | 34 | </td> |
35 | 35 | <td class="jst-left"> |
@@ -43,12 +43,12 @@ discard block |
||
43 | 43 | 'espresso_registrations_view_registration', |
44 | 44 | $registration->ID() |
45 | 45 | ) ? ' |
46 | - <a href="' . $reg_url . '" title="' |
|
46 | + <a href="' . $reg_url.'" title="' |
|
47 | 47 | . esc_attr__( |
48 | 48 | 'View Registration Details', |
49 | 49 | 'event_espresso' |
50 | - ) . '">' . |
|
51 | - esc_html__('View Registration', 'event_espresso') . |
|
50 | + ).'">'. |
|
51 | + esc_html__('View Registration', 'event_espresso'). |
|
52 | 52 | '</a>' : $registration->ID(); |
53 | 53 | ?> |
54 | 54 | </td> |
@@ -62,15 +62,15 @@ discard block |
||
62 | 62 | 'ee_read_transaction', |
63 | 63 | 'espresso_transactions_view_transaction' |
64 | 64 | ) ? ' |
65 | - <a href="' . $txn_url . '" title="' |
|
65 | + <a href="' . $txn_url.'" title="' |
|
66 | 66 | . esc_attr__( |
67 | 67 | 'View Transaction Details', |
68 | 68 | 'event_espresso' |
69 | - ) . '">' . |
|
69 | + ).'">'. |
|
70 | 70 | sprintf( |
71 | 71 | esc_html__('View Transaction %d', 'event_espresso'), |
72 | 72 | $registration->transaction_ID() |
73 | - ) . |
|
73 | + ). |
|
74 | 74 | '</a>' : $registration->transaction_ID(); |
75 | 75 | ?> |
76 | 76 | </td> |
@@ -15,144 +15,144 @@ |
||
15 | 15 | class Payments_Admin_Page_Init extends EE_Admin_Page_Init |
16 | 16 | { |
17 | 17 | |
18 | - /** |
|
19 | - * @var \EventEspresso\core\services\database\TableAnalysis $table_analysis |
|
20 | - */ |
|
21 | - protected $_table_analysis; |
|
22 | - |
|
23 | - |
|
24 | - /** |
|
25 | - * Payments_Admin_Page_Init constructor. |
|
26 | - */ |
|
27 | - public function __construct() |
|
28 | - { |
|
29 | - // define some page related constants |
|
30 | - define('EE_PAYMENTS_PG_SLUG', 'espresso_payment_settings'); |
|
31 | - define('EE_PAYMENTS_ADMIN_URL', admin_url('admin.php?page=' . EE_PAYMENTS_PG_SLUG)); |
|
32 | - define('EE_PAYMENTS_ADMIN', EE_ADMIN_PAGES . 'payments' . DS); |
|
33 | - define('EE_PAYMENTS_TEMPLATE_PATH', EE_PAYMENTS_ADMIN . 'templates' . DS); |
|
34 | - define('EE_PAYMENTS_ASSETS_URL', EE_ADMIN_PAGES_URL . 'payments/assets/'); |
|
35 | - $this->_table_analysis = EE_Registry::instance()->create('TableAnalysis', array(), true); |
|
36 | - // check that there are active gateways on all admin page loads. but dont do it just yet |
|
37 | - add_action('admin_notices', array($this, 'check_payment_gateway_setup')); |
|
38 | - |
|
39 | - // Show/hide PP Standard along side PP Express. |
|
40 | - add_filter( |
|
41 | - 'FHEE__Payments_Admin_Page___payment_methods_list__payment_methods', |
|
42 | - array($this, 'unset_pp_standard') |
|
43 | - ); |
|
44 | - |
|
45 | - parent::__construct(); |
|
46 | - } |
|
47 | - |
|
48 | - protected function _set_init_properties() |
|
49 | - { |
|
50 | - $this->label = __('Payment Methods', 'event_espresso'); |
|
51 | - } |
|
52 | - |
|
53 | - |
|
54 | - /** |
|
55 | - * _set_menu_map |
|
56 | - * |
|
57 | - * @return void |
|
58 | - */ |
|
59 | - protected function _set_menu_map() |
|
60 | - { |
|
61 | - $this->_menu_map = new EE_Admin_Page_Sub_Menu( |
|
62 | - array( |
|
63 | - 'menu_group' => 'settings', |
|
64 | - 'menu_order' => 30, |
|
65 | - 'show_on_menu' => EE_Admin_Page_Menu_Map::BLOG_ADMIN_ONLY, |
|
66 | - 'parent_slug' => 'espresso_events', |
|
67 | - 'menu_slug' => EE_PAYMENTS_PG_SLUG, |
|
68 | - 'menu_label' => __('Payment Methods', 'event_espresso'), |
|
69 | - 'capability' => 'ee_manage_gateways', |
|
70 | - 'admin_init_page' => $this, |
|
71 | - ) |
|
72 | - ); |
|
73 | - } |
|
74 | - |
|
75 | - |
|
76 | - /** |
|
77 | - * Checks that there is at least one active gateway. If not, add a notice |
|
78 | - * |
|
79 | - * @throws \EE_Error |
|
80 | - */ |
|
81 | - public function check_payment_gateway_setup() |
|
82 | - { |
|
83 | - // ONLY do this check if models can query |
|
84 | - // and avoid a bug where when we nuke EE4's data that this causes a fatal error |
|
85 | - // because the tables are deleted just before this request runs. see https://events.codebasehq.com/projects/event-espresso/tickets/7539 |
|
86 | - if (! EE_Maintenance_Mode::instance()->models_can_query() |
|
87 | - || ! $this->_get_table_analysis()->tableExists(EEM_Payment_Method::instance()->table()) |
|
88 | - ) { |
|
89 | - return; |
|
90 | - } |
|
91 | - |
|
92 | - |
|
93 | - // ensure Payment_Method model is loaded |
|
94 | - EE_Registry::instance()->load_model('Payment_Method'); |
|
95 | - $actives = EEM_Payment_Method::instance()->count_active(EEM_Payment_Method::scope_cart); |
|
96 | - if ($actives < 1) { |
|
97 | - $url = EE_Admin_Page::add_query_args_and_nonce(array(), EE_PAYMENTS_ADMIN_URL); |
|
98 | - echo '<div class="error"> |
|
18 | + /** |
|
19 | + * @var \EventEspresso\core\services\database\TableAnalysis $table_analysis |
|
20 | + */ |
|
21 | + protected $_table_analysis; |
|
22 | + |
|
23 | + |
|
24 | + /** |
|
25 | + * Payments_Admin_Page_Init constructor. |
|
26 | + */ |
|
27 | + public function __construct() |
|
28 | + { |
|
29 | + // define some page related constants |
|
30 | + define('EE_PAYMENTS_PG_SLUG', 'espresso_payment_settings'); |
|
31 | + define('EE_PAYMENTS_ADMIN_URL', admin_url('admin.php?page=' . EE_PAYMENTS_PG_SLUG)); |
|
32 | + define('EE_PAYMENTS_ADMIN', EE_ADMIN_PAGES . 'payments' . DS); |
|
33 | + define('EE_PAYMENTS_TEMPLATE_PATH', EE_PAYMENTS_ADMIN . 'templates' . DS); |
|
34 | + define('EE_PAYMENTS_ASSETS_URL', EE_ADMIN_PAGES_URL . 'payments/assets/'); |
|
35 | + $this->_table_analysis = EE_Registry::instance()->create('TableAnalysis', array(), true); |
|
36 | + // check that there are active gateways on all admin page loads. but dont do it just yet |
|
37 | + add_action('admin_notices', array($this, 'check_payment_gateway_setup')); |
|
38 | + |
|
39 | + // Show/hide PP Standard along side PP Express. |
|
40 | + add_filter( |
|
41 | + 'FHEE__Payments_Admin_Page___payment_methods_list__payment_methods', |
|
42 | + array($this, 'unset_pp_standard') |
|
43 | + ); |
|
44 | + |
|
45 | + parent::__construct(); |
|
46 | + } |
|
47 | + |
|
48 | + protected function _set_init_properties() |
|
49 | + { |
|
50 | + $this->label = __('Payment Methods', 'event_espresso'); |
|
51 | + } |
|
52 | + |
|
53 | + |
|
54 | + /** |
|
55 | + * _set_menu_map |
|
56 | + * |
|
57 | + * @return void |
|
58 | + */ |
|
59 | + protected function _set_menu_map() |
|
60 | + { |
|
61 | + $this->_menu_map = new EE_Admin_Page_Sub_Menu( |
|
62 | + array( |
|
63 | + 'menu_group' => 'settings', |
|
64 | + 'menu_order' => 30, |
|
65 | + 'show_on_menu' => EE_Admin_Page_Menu_Map::BLOG_ADMIN_ONLY, |
|
66 | + 'parent_slug' => 'espresso_events', |
|
67 | + 'menu_slug' => EE_PAYMENTS_PG_SLUG, |
|
68 | + 'menu_label' => __('Payment Methods', 'event_espresso'), |
|
69 | + 'capability' => 'ee_manage_gateways', |
|
70 | + 'admin_init_page' => $this, |
|
71 | + ) |
|
72 | + ); |
|
73 | + } |
|
74 | + |
|
75 | + |
|
76 | + /** |
|
77 | + * Checks that there is at least one active gateway. If not, add a notice |
|
78 | + * |
|
79 | + * @throws \EE_Error |
|
80 | + */ |
|
81 | + public function check_payment_gateway_setup() |
|
82 | + { |
|
83 | + // ONLY do this check if models can query |
|
84 | + // and avoid a bug where when we nuke EE4's data that this causes a fatal error |
|
85 | + // because the tables are deleted just before this request runs. see https://events.codebasehq.com/projects/event-espresso/tickets/7539 |
|
86 | + if (! EE_Maintenance_Mode::instance()->models_can_query() |
|
87 | + || ! $this->_get_table_analysis()->tableExists(EEM_Payment_Method::instance()->table()) |
|
88 | + ) { |
|
89 | + return; |
|
90 | + } |
|
91 | + |
|
92 | + |
|
93 | + // ensure Payment_Method model is loaded |
|
94 | + EE_Registry::instance()->load_model('Payment_Method'); |
|
95 | + $actives = EEM_Payment_Method::instance()->count_active(EEM_Payment_Method::scope_cart); |
|
96 | + if ($actives < 1) { |
|
97 | + $url = EE_Admin_Page::add_query_args_and_nonce(array(), EE_PAYMENTS_ADMIN_URL); |
|
98 | + echo '<div class="error"> |
|
99 | 99 | <p>' |
100 | - . sprintf( |
|
101 | - __( |
|
102 | - "There are no Active Payment Methods setup for Event Espresso. Please %s activate at least one.%s", |
|
103 | - "event_espresso" |
|
104 | - ), |
|
105 | - "<a href='$url'>", |
|
106 | - "</a>" |
|
107 | - ) . '</p> |
|
100 | + . sprintf( |
|
101 | + __( |
|
102 | + "There are no Active Payment Methods setup for Event Espresso. Please %s activate at least one.%s", |
|
103 | + "event_espresso" |
|
104 | + ), |
|
105 | + "<a href='$url'>", |
|
106 | + "</a>" |
|
107 | + ) . '</p> |
|
108 | 108 | </div>'; |
109 | - } |
|
110 | - } |
|
111 | - |
|
112 | - /** |
|
113 | - * Gets the injected table analyzer, or throws an exception |
|
114 | - * |
|
115 | - * @return TableAnalysis |
|
116 | - * @throws \EE_Error |
|
117 | - */ |
|
118 | - protected function _get_table_analysis() |
|
119 | - { |
|
120 | - if ($this->_table_analysis instanceof TableAnalysis) { |
|
121 | - return $this->_table_analysis; |
|
122 | - } else { |
|
123 | - throw new \EE_Error( |
|
124 | - sprintf( |
|
125 | - __('Table analysis class on class %1$s is not set properly.', 'event_espresso'), |
|
126 | - get_class($this) |
|
127 | - ) |
|
128 | - ); |
|
129 | - } |
|
130 | - } |
|
131 | - |
|
132 | - |
|
133 | - /** |
|
134 | - * Hide PayPal Standard for "new" users. |
|
135 | - */ |
|
136 | - public static function unset_pp_standard($payment_method_types) |
|
137 | - { |
|
138 | - $pps = EEM_Payment_Method::instance()->get_one_of_type('Paypal_Standard'); |
|
139 | - $ppstandard_active = (! empty($pps)) ? $pps->active() : false; |
|
140 | - $ppstandard_active_before = false; |
|
141 | - if ($pps) { |
|
142 | - // PP Standard used before ? |
|
143 | - $paypal_id = $pps->get_extra_meta('paypal_id', true); |
|
144 | - if ($paypal_id && ! empty($paypal_id)) { |
|
145 | - $ppstandard_active_before = true; |
|
146 | - } |
|
147 | - } |
|
148 | - |
|
149 | - // Not using PP Standard? Then display only PayPal Express, do not show PayPal Standard. |
|
150 | - if (apply_filters( |
|
151 | - 'FHEE__EE_PMT_Paypal_Express__register_payment_methods__hide_paypal_standard', |
|
152 | - ! $ppstandard_active && ! $ppstandard_active_before |
|
153 | - )) { |
|
154 | - unset($payment_method_types['paypal_standard']); |
|
155 | - } |
|
156 | - return $payment_method_types; |
|
157 | - } |
|
109 | + } |
|
110 | + } |
|
111 | + |
|
112 | + /** |
|
113 | + * Gets the injected table analyzer, or throws an exception |
|
114 | + * |
|
115 | + * @return TableAnalysis |
|
116 | + * @throws \EE_Error |
|
117 | + */ |
|
118 | + protected function _get_table_analysis() |
|
119 | + { |
|
120 | + if ($this->_table_analysis instanceof TableAnalysis) { |
|
121 | + return $this->_table_analysis; |
|
122 | + } else { |
|
123 | + throw new \EE_Error( |
|
124 | + sprintf( |
|
125 | + __('Table analysis class on class %1$s is not set properly.', 'event_espresso'), |
|
126 | + get_class($this) |
|
127 | + ) |
|
128 | + ); |
|
129 | + } |
|
130 | + } |
|
131 | + |
|
132 | + |
|
133 | + /** |
|
134 | + * Hide PayPal Standard for "new" users. |
|
135 | + */ |
|
136 | + public static function unset_pp_standard($payment_method_types) |
|
137 | + { |
|
138 | + $pps = EEM_Payment_Method::instance()->get_one_of_type('Paypal_Standard'); |
|
139 | + $ppstandard_active = (! empty($pps)) ? $pps->active() : false; |
|
140 | + $ppstandard_active_before = false; |
|
141 | + if ($pps) { |
|
142 | + // PP Standard used before ? |
|
143 | + $paypal_id = $pps->get_extra_meta('paypal_id', true); |
|
144 | + if ($paypal_id && ! empty($paypal_id)) { |
|
145 | + $ppstandard_active_before = true; |
|
146 | + } |
|
147 | + } |
|
148 | + |
|
149 | + // Not using PP Standard? Then display only PayPal Express, do not show PayPal Standard. |
|
150 | + if (apply_filters( |
|
151 | + 'FHEE__EE_PMT_Paypal_Express__register_payment_methods__hide_paypal_standard', |
|
152 | + ! $ppstandard_active && ! $ppstandard_active_before |
|
153 | + )) { |
|
154 | + unset($payment_method_types['paypal_standard']); |
|
155 | + } |
|
156 | + return $payment_method_types; |
|
157 | + } |
|
158 | 158 | } |
@@ -28,10 +28,10 @@ discard block |
||
28 | 28 | { |
29 | 29 | // define some page related constants |
30 | 30 | define('EE_PAYMENTS_PG_SLUG', 'espresso_payment_settings'); |
31 | - define('EE_PAYMENTS_ADMIN_URL', admin_url('admin.php?page=' . EE_PAYMENTS_PG_SLUG)); |
|
32 | - define('EE_PAYMENTS_ADMIN', EE_ADMIN_PAGES . 'payments' . DS); |
|
33 | - define('EE_PAYMENTS_TEMPLATE_PATH', EE_PAYMENTS_ADMIN . 'templates' . DS); |
|
34 | - define('EE_PAYMENTS_ASSETS_URL', EE_ADMIN_PAGES_URL . 'payments/assets/'); |
|
31 | + define('EE_PAYMENTS_ADMIN_URL', admin_url('admin.php?page='.EE_PAYMENTS_PG_SLUG)); |
|
32 | + define('EE_PAYMENTS_ADMIN', EE_ADMIN_PAGES.'payments'.DS); |
|
33 | + define('EE_PAYMENTS_TEMPLATE_PATH', EE_PAYMENTS_ADMIN.'templates'.DS); |
|
34 | + define('EE_PAYMENTS_ASSETS_URL', EE_ADMIN_PAGES_URL.'payments/assets/'); |
|
35 | 35 | $this->_table_analysis = EE_Registry::instance()->create('TableAnalysis', array(), true); |
36 | 36 | // check that there are active gateways on all admin page loads. but dont do it just yet |
37 | 37 | add_action('admin_notices', array($this, 'check_payment_gateway_setup')); |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | // ONLY do this check if models can query |
84 | 84 | // and avoid a bug where when we nuke EE4's data that this causes a fatal error |
85 | 85 | // because the tables are deleted just before this request runs. see https://events.codebasehq.com/projects/event-espresso/tickets/7539 |
86 | - if (! EE_Maintenance_Mode::instance()->models_can_query() |
|
86 | + if ( ! EE_Maintenance_Mode::instance()->models_can_query() |
|
87 | 87 | || ! $this->_get_table_analysis()->tableExists(EEM_Payment_Method::instance()->table()) |
88 | 88 | ) { |
89 | 89 | return; |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | ), |
105 | 105 | "<a href='$url'>", |
106 | 106 | "</a>" |
107 | - ) . '</p> |
|
107 | + ).'</p> |
|
108 | 108 | </div>'; |
109 | 109 | } |
110 | 110 | } |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | public static function unset_pp_standard($payment_method_types) |
137 | 137 | { |
138 | 138 | $pps = EEM_Payment_Method::instance()->get_one_of_type('Paypal_Standard'); |
139 | - $ppstandard_active = (! empty($pps)) ? $pps->active() : false; |
|
139 | + $ppstandard_active = ( ! empty($pps)) ? $pps->active() : false; |
|
140 | 140 | $ppstandard_active_before = false; |
141 | 141 | if ($pps) { |
142 | 142 | // PP Standard used before ? |