Completed
Push — master ( 34c813...b76a6f )
by Devin
71:10 queued 51:11
created
includes/admin/payments/view-order-details.php 1 patch
Spacing   +129 added lines, -129 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
  */
11 11
 
12 12
 // Exit if accessed directly
13
-if ( ! defined( 'ABSPATH' ) ) {
13
+if ( ! defined('ABSPATH')) {
14 14
 	exit;
15 15
 }
16 16
 
@@ -20,27 +20,27 @@  discard block
 block discarded – undo
20 20
  * @since 1.0
21 21
  * @return void
22 22
  */
23
-if ( ! isset( $_GET['id'] ) || ! is_numeric( $_GET['id'] ) ) {
24
-	wp_die( esc_html__( 'Donation ID not supplied. Please try again.', 'give' ), esc_html__( 'Error', 'give' ), array( 'response' => 400 ) );
23
+if ( ! isset($_GET['id']) || ! is_numeric($_GET['id'])) {
24
+	wp_die(esc_html__('Donation ID not supplied. Please try again.', 'give'), esc_html__('Error', 'give'), array('response' => 400));
25 25
 }
26 26
 
27 27
 // Setup the variables
28
-$payment_id = absint( $_GET['id'] );
29
-$payment    = new Give_Payment( $payment_id );
28
+$payment_id = absint($_GET['id']);
29
+$payment    = new Give_Payment($payment_id);
30 30
 
31 31
 // Sanity check... fail if purchase ID is invalid
32 32
 $payment_exists = $payment->ID;
33
-if ( empty( $payment_exists ) ) {
34
-	wp_die( esc_html__( 'The specified ID does not belong to a payment. Please try again.', 'give' ), esc_html__( 'Error', 'give' ), array( 'response' => 400 ) );
33
+if (empty($payment_exists)) {
34
+	wp_die(esc_html__('The specified ID does not belong to a payment. Please try again.', 'give'), esc_html__('Error', 'give'), array('response' => 400));
35 35
 }
36 36
 
37 37
 $number         = $payment->number;
38 38
 $payment_meta   = $payment->get_meta();
39
-$transaction_id = esc_attr( $payment->transaction_id );
39
+$transaction_id = esc_attr($payment->transaction_id);
40 40
 $user_id        = $payment->user_id;
41 41
 $customer_id    = $payment->customer_id;
42
-$payment_date   = strtotime( $payment->date );
43
-$user_info      = give_get_payment_meta_user_info( $payment_id );
42
+$payment_date   = strtotime($payment->date);
43
+$user_info      = give_get_payment_meta_user_info($payment_id);
44 44
 $address        = $payment->address;
45 45
 $gateway        = $payment->gateway;
46 46
 $currency_code  = $payment->currency;
@@ -53,75 +53,75 @@  discard block
 block discarded – undo
53 53
 	<h1 id="transaction-details-heading"><?php
54 54
 		printf(
55 55
 		/* translators: %s: payment number */
56
-			esc_html__( 'Payment %s', 'give' ),
56
+			esc_html__('Payment %s', 'give'),
57 57
 			$number
58 58
 		);
59
-		if ( $payment_mode == 'test' ) {
60
-			echo '<span id="test-payment-label" class="give-item-label give-item-label-orange" data-tooltip="' . esc_attr__( 'This payment was made in Test Mode', 'give' ) . '" data-tooltip-my-position="center left" data-tooltip-target-position="center right">' . esc_html__( 'Test Payment', 'give' ) . '</span>';
59
+		if ($payment_mode == 'test') {
60
+			echo '<span id="test-payment-label" class="give-item-label give-item-label-orange" data-tooltip="'.esc_attr__('This payment was made in Test Mode', 'give').'" data-tooltip-my-position="center left" data-tooltip-target-position="center right">'.esc_html__('Test Payment', 'give').'</span>';
61 61
 		}
62 62
 		?></h1>
63 63
 
64
-	<?php do_action( 'give_view_order_details_before', $payment_id ); ?>
64
+	<?php do_action('give_view_order_details_before', $payment_id); ?>
65 65
 	<form id="give-edit-order-form" method="post">
66
-		<?php do_action( 'give_view_order_details_form_top', $payment_id ); ?>
66
+		<?php do_action('give_view_order_details_form_top', $payment_id); ?>
67 67
 		<div id="poststuff">
68 68
 			<div id="give-dashboard-widgets-wrap">
69 69
 				<div id="post-body" class="metabox-holder columns-2">
70 70
 					<div id="postbox-container-1" class="postbox-container">
71 71
 						<div id="side-sortables" class="meta-box-sortables ui-sortable">
72 72
 
73
-							<?php do_action( 'give_view_order_details_sidebar_before', $payment_id ); ?>
73
+							<?php do_action('give_view_order_details_sidebar_before', $payment_id); ?>
74 74
 
75 75
 							<div id="give-order-update" class="postbox give-order-data">
76 76
 
77 77
 								<h3 class="hndle">
78
-									<span><?php esc_html_e( 'Update Payment', 'give' ); ?></span>
78
+									<span><?php esc_html_e('Update Payment', 'give'); ?></span>
79 79
 								</h3>
80 80
 
81 81
 								<div class="inside">
82 82
 									<div class="give-admin-box">
83 83
 
84
-										<?php do_action( 'give_view_order_details_totals_before', $payment_id ); ?>
84
+										<?php do_action('give_view_order_details_totals_before', $payment_id); ?>
85 85
 
86 86
 										<div class="give-admin-box-inside">
87 87
 											<p>
88
-												<span class="label"><?php esc_html_e( 'Status:', 'give' ); ?></span>&nbsp;
88
+												<span class="label"><?php esc_html_e('Status:', 'give'); ?></span>&nbsp;
89 89
 												<select name="give-payment-status" class="medium-text">
90
-													<?php foreach ( give_get_payment_statuses() as $key => $status ) : ?>
91
-														<option value="<?php echo esc_attr( $key ); ?>"<?php selected( $payment->status, $key, true ); ?>><?php echo esc_html( $status ); ?></option>
90
+													<?php foreach (give_get_payment_statuses() as $key => $status) : ?>
91
+														<option value="<?php echo esc_attr($key); ?>"<?php selected($payment->status, $key, true); ?>><?php echo esc_html($status); ?></option>
92 92
 													<?php endforeach; ?>
93 93
 												</select>
94
-												<span class="give-donation-status status-<?php echo sanitize_title( $payment->status ); ?>"><span class="give-donation-status-icon"></span></span>
94
+												<span class="give-donation-status status-<?php echo sanitize_title($payment->status); ?>"><span class="give-donation-status-icon"></span></span>
95 95
 											</p>
96 96
 										</div>
97 97
 
98 98
 										<div class="give-admin-box-inside">
99 99
 											<p>
100
-												<span class="label"><?php esc_html_e( 'Date:', 'give' ); ?></span>&nbsp;
101
-												<input type="text" name="give-payment-date" value="<?php echo esc_attr( date( 'm/d/Y', $payment_date ) ); ?>" class="medium-text give_datepicker"/>
100
+												<span class="label"><?php esc_html_e('Date:', 'give'); ?></span>&nbsp;
101
+												<input type="text" name="give-payment-date" value="<?php echo esc_attr(date('m/d/Y', $payment_date)); ?>" class="medium-text give_datepicker"/>
102 102
 											</p>
103 103
 										</div>
104 104
 
105 105
 										<div class="give-admin-box-inside">
106 106
 											<p>
107
-												<span class="label"><?php esc_html_e( 'Time:', 'give' ); ?></span>&nbsp;
108
-												<input type="number" step="1" max="24" name="give-payment-time-hour" value="<?php echo esc_attr( date_i18n( 'H', $payment_date ) ); ?>" class="small-text give-payment-time-hour"/>&nbsp;:&nbsp;
109
-												<input type="number" step="1" max="59" name="give-payment-time-min" value="<?php echo esc_attr( date( 'i', $payment_date ) ); ?>" class="small-text give-payment-time-min"/>
107
+												<span class="label"><?php esc_html_e('Time:', 'give'); ?></span>&nbsp;
108
+												<input type="number" step="1" max="24" name="give-payment-time-hour" value="<?php echo esc_attr(date_i18n('H', $payment_date)); ?>" class="small-text give-payment-time-hour"/>&nbsp;:&nbsp;
109
+												<input type="number" step="1" max="59" name="give-payment-time-min" value="<?php echo esc_attr(date('i', $payment_date)); ?>" class="small-text give-payment-time-min"/>
110 110
 											</p>
111 111
 										</div>
112 112
 
113
-										<?php do_action( 'give_view_order_details_update_inner', $payment_id ); ?>
113
+										<?php do_action('give_view_order_details_update_inner', $payment_id); ?>
114 114
 
115 115
 										<?php
116 116
 										//@TODO: Fees
117
-										$fees = give_get_payment_fees( $payment_id );
118
-										if ( ! empty( $fees ) ) : ?>
117
+										$fees = give_get_payment_fees($payment_id);
118
+										if ( ! empty($fees)) : ?>
119 119
 											<div class="give-order-fees give-admin-box-inside">
120
-												<p class="strong"><?php esc_html_e( 'Fees', 'give' ); ?>:</p>
120
+												<p class="strong"><?php esc_html_e('Fees', 'give'); ?>:</p>
121 121
 												<ul class="give-payment-fees">
122
-													<?php foreach ( $fees as $fee ) : ?>
122
+													<?php foreach ($fees as $fee) : ?>
123 123
 														<li>
124
-															<span class="fee-label"><?php echo $fee['label'] . ':</span> ' . '<span class="fee-amount" data-fee="' . esc_attr( $fee['amount'] ) . '">' . give_currency_filter( $fee['amount'], $currency_code ); ?></span>
124
+															<span class="fee-label"><?php echo $fee['label'].':</span> '.'<span class="fee-amount" data-fee="'.esc_attr($fee['amount']).'">'.give_currency_filter($fee['amount'], $currency_code); ?></span>
125 125
 														</li>
126 126
 													<?php endforeach; ?>
127 127
 												</ul>
@@ -131,12 +131,12 @@  discard block
 block discarded – undo
131 131
 
132 132
 										<div class="give-order-payment give-admin-box-inside">
133 133
 											<p>
134
-												<span class="label"><?php esc_html_e( 'Total Donation', 'give' ); ?>:</span>&nbsp;
135
-												<?php echo give_currency_symbol( $payment->currency ); ?>&nbsp;<input name="give-payment-total" type="text" class="small-text give-price-field" value="<?php echo esc_attr( give_format_decimal( give_get_payment_amount( $payment_id ) ) ); ?>"/>
134
+												<span class="label"><?php esc_html_e('Total Donation', 'give'); ?>:</span>&nbsp;
135
+												<?php echo give_currency_symbol($payment->currency); ?>&nbsp;<input name="give-payment-total" type="text" class="small-text give-price-field" value="<?php echo esc_attr(give_format_decimal(give_get_payment_amount($payment_id))); ?>"/>
136 136
 											</p>
137 137
 										</div>
138 138
 
139
-										<?php do_action( 'give_view_order_details_totals_after', $payment_id ); ?>
139
+										<?php do_action('give_view_order_details_totals_after', $payment_id); ?>
140 140
 
141 141
 									</div>
142 142
 									<!-- /.give-admin-box -->
@@ -145,20 +145,20 @@  discard block
 block discarded – undo
145 145
 								<!-- /.inside -->
146 146
 
147 147
 								<div class="give-order-update-box give-admin-box">
148
-									<?php do_action( 'give_view_order_details_update_before', $payment_id ); ?>
148
+									<?php do_action('give_view_order_details_update_before', $payment_id); ?>
149 149
 									<div id="major-publishing-actions">
150 150
 										<div id="publishing-action">
151
-											<input type="submit" class="button button-primary right" value="<?php esc_attr_e( 'Save Payment', 'give' ); ?>"/>
152
-											<?php if ( give_is_payment_complete( $payment_id ) ) : ?>
153
-												<a href="<?php echo esc_url( add_query_arg( array(
151
+											<input type="submit" class="button button-primary right" value="<?php esc_attr_e('Save Payment', 'give'); ?>"/>
152
+											<?php if (give_is_payment_complete($payment_id)) : ?>
153
+												<a href="<?php echo esc_url(add_query_arg(array(
154 154
 													'give-action' => 'email_links',
155 155
 													'purchase_id' => $payment_id
156
-												) ) ); ?>" id="give-resend-receipt" class="button-secondary right"><?php esc_html_e( 'Resend Receipt', 'give' ); ?></a>
156
+												))); ?>" id="give-resend-receipt" class="button-secondary right"><?php esc_html_e('Resend Receipt', 'give'); ?></a>
157 157
 											<?php endif; ?>
158 158
 										</div>
159 159
 										<div class="clear"></div>
160 160
 									</div>
161
-									<?php do_action( 'give_view_order_details_update_after', $payment_id ); ?>
161
+									<?php do_action('give_view_order_details_update_after', $payment_id); ?>
162 162
 								</div>
163 163
 								<!-- /.give-order-update-box -->
164 164
 
@@ -168,55 +168,55 @@  discard block
 block discarded – undo
168 168
 							<div id="give-order-details" class="postbox give-order-data">
169 169
 
170 170
 								<h3 class="hndle">
171
-									<span><?php esc_html_e( 'Payment Meta', 'give' ); ?></span>
171
+									<span><?php esc_html_e('Payment Meta', 'give'); ?></span>
172 172
 								</h3>
173 173
 
174 174
 								<div class="inside">
175 175
 									<div class="give-admin-box">
176 176
 
177
-										<?php do_action( 'give_view_order_details_payment_meta_before', $payment_id ); ?>
177
+										<?php do_action('give_view_order_details_payment_meta_before', $payment_id); ?>
178 178
 
179 179
 										<?php
180
-										$gateway = give_get_payment_gateway( $payment_id );
181
-										if ( $gateway ) : ?>
180
+										$gateway = give_get_payment_gateway($payment_id);
181
+										if ($gateway) : ?>
182 182
 											<div class="give-order-gateway give-admin-box-inside">
183 183
 												<p>
184
-													<span class="label"><?php esc_html_e( 'Gateway:', 'give' ); ?></span>&nbsp;
185
-													<?php echo give_get_gateway_admin_label( $gateway ); ?>
184
+													<span class="label"><?php esc_html_e('Gateway:', 'give'); ?></span>&nbsp;
185
+													<?php echo give_get_gateway_admin_label($gateway); ?>
186 186
 												</p>
187 187
 											</div>
188 188
 										<?php endif; ?>
189 189
 
190 190
 										<div class="give-order-payment-key give-admin-box-inside">
191 191
 											<p>
192
-												<span class="label"><?php esc_html_e( 'Key:', 'give' ); ?></span>&nbsp;
193
-												<span><?php echo give_get_payment_key( $payment_id ); ?></span>
192
+												<span class="label"><?php esc_html_e('Key:', 'give'); ?></span>&nbsp;
193
+												<span><?php echo give_get_payment_key($payment_id); ?></span>
194 194
 											</p>
195 195
 										</div>
196 196
 
197 197
 										<div class="give-order-ip give-admin-box-inside">
198 198
 											<p>
199
-												<span class="label"><?php esc_html_e( 'IP:', 'give' ); ?></span>&nbsp;
200
-												<span><?php echo esc_html( give_get_payment_user_ip( $payment_id ) ); ?></span>
199
+												<span class="label"><?php esc_html_e('IP:', 'give'); ?></span>&nbsp;
200
+												<span><?php echo esc_html(give_get_payment_user_ip($payment_id)); ?></span>
201 201
 											</p>
202 202
 										</div>
203 203
 
204
-										<?php if ( $transaction_id ) : ?>
204
+										<?php if ($transaction_id) : ?>
205 205
 											<div class="give-order-tx-id give-admin-box-inside">
206 206
 												<p>
207
-													<span class="label"><?php esc_html_e( 'Transaction ID:', 'give' ); ?></span>&nbsp;
208
-													<span><?php echo apply_filters( 'give_payment_details_transaction_id-' . $gateway, $transaction_id, $payment_id ); ?></span>
207
+													<span class="label"><?php esc_html_e('Transaction ID:', 'give'); ?></span>&nbsp;
208
+													<span><?php echo apply_filters('give_payment_details_transaction_id-'.$gateway, $transaction_id, $payment_id); ?></span>
209 209
 												</p>
210 210
 											</div>
211 211
 										<?php endif; ?>
212 212
 
213 213
 										<div class="give-admin-box-inside">
214
-											<p><?php $purchase_url = admin_url( 'edit.php?post_type=give_forms&page=give-payment-history&user=' . urlencode( esc_attr( give_get_payment_user_email( $payment_id ) ) ) ); ?>
215
-												<a href="<?php echo $purchase_url; ?>"><?php esc_html_e( 'View all donations for this donor &raquo;', 'give' ); ?></a>
214
+											<p><?php $purchase_url = admin_url('edit.php?post_type=give_forms&page=give-payment-history&user='.urlencode(esc_attr(give_get_payment_user_email($payment_id)))); ?>
215
+												<a href="<?php echo $purchase_url; ?>"><?php esc_html_e('View all donations for this donor &raquo;', 'give'); ?></a>
216 216
 											</p>
217 217
 										</div>
218 218
 
219
-										<?php do_action( 'give_view_order_details_payment_meta_after', $payment_id ); ?>
219
+										<?php do_action('give_view_order_details_payment_meta_after', $payment_id); ?>
220 220
 
221 221
 									</div>
222 222
 									<!-- /.column-container -->
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
 							</div>
228 228
 							<!-- /#give-order-data -->
229 229
 
230
-							<?php do_action( 'give_view_order_details_sidebar_after', $payment_id ); ?>
230
+							<?php do_action('give_view_order_details_sidebar_after', $payment_id); ?>
231 231
 
232 232
 						</div>
233 233
 						<!-- /#side-sortables -->
@@ -238,12 +238,12 @@  discard block
 block discarded – undo
238 238
 
239 239
 						<div id="normal-sortables" class="meta-box-sortables ui-sortable">
240 240
 
241
-							<?php do_action( 'give_view_order_details_main_before', $payment_id ); ?>
241
+							<?php do_action('give_view_order_details_main_before', $payment_id); ?>
242 242
 
243 243
 							<?php $column_count = 'columns-3'; ?>
244 244
 							<div id="give-donation-overview" class="postbox <?php echo $column_count; ?>">
245 245
 								<h3 class="hndle">
246
-									<span><?php esc_html_e( 'Donation Information', 'give' ); ?></span>
246
+									<span><?php esc_html_e('Donation Information', 'give'); ?></span>
247 247
 								</h3>
248 248
 
249 249
 								<div class="inside">
@@ -251,32 +251,32 @@  discard block
 block discarded – undo
251 251
 									<table style="width:100%;">
252 252
 										<thead>
253 253
 										<tr>
254
-											<?php do_action( 'give_donation_details_thead_before', $payment_id ); ?>
255
-											<th><?php esc_html_e( 'Donation Form ID', 'give' ) ?></th>
256
-											<th><?php esc_html_e( 'Donation Form Title', 'give' ) ?></th>
257
-											<th><?php esc_html_e( 'Donation Level', 'give' ) ?></th>
258
-											<th><?php esc_html_e( 'Donation Date', 'give' ) ?></th>
259
-											<th><?php esc_html_e( 'Total Donation', 'give' ) ?></th>
260
-											<?php do_action( 'give_donation_details_thead_after', $payment_id ); ?>
254
+											<?php do_action('give_donation_details_thead_before', $payment_id); ?>
255
+											<th><?php esc_html_e('Donation Form ID', 'give') ?></th>
256
+											<th><?php esc_html_e('Donation Form Title', 'give') ?></th>
257
+											<th><?php esc_html_e('Donation Level', 'give') ?></th>
258
+											<th><?php esc_html_e('Donation Date', 'give') ?></th>
259
+											<th><?php esc_html_e('Total Donation', 'give') ?></th>
260
+											<?php do_action('give_donation_details_thead_after', $payment_id); ?>
261 261
 										</tr>
262 262
 										</thead>
263 263
 										<tr>
264
-											<?php do_action( 'give_donation_details_tbody_before', $payment_id ); ?>
264
+											<?php do_action('give_donation_details_tbody_before', $payment_id); ?>
265 265
 											<td>
266 266
 												<?php echo $payment_meta['form_id']; ?>
267 267
 											</td>
268 268
 											<td>
269
-												<?php give_get_form_dropdown( array(
269
+												<?php give_get_form_dropdown(array(
270 270
 													'id'       => $payment_meta['form_id'],
271 271
 													'selected' => $payment_meta['form_id'],
272 272
 													'chosen'   => true
273
-												), true ); ?>
273
+												), true); ?>
274 274
 											</td>
275 275
 											<td>
276 276
 												<?php
277
-												$var_prices = give_has_variable_prices( $payment_meta['form_id'] );
278
-												if ( empty( $var_prices ) ) {
279
-													echo esc_html__( 'n/a', 'give' );
277
+												$var_prices = give_has_variable_prices($payment_meta['form_id']);
278
+												if (empty($var_prices)) {
279
+													echo esc_html__('n/a', 'give');
280 280
 												} else {
281 281
 													// Variable price dropdown options.
282 282
 													$variable_price_dropdown_option = array(
@@ -288,20 +288,20 @@  discard block
 block discarded – undo
288 288
 													);
289 289
 
290 290
 													// Render variable prices select tag html.
291
-													give_get_form_variable_price_dropdown( $variable_price_dropdown_option, true );
291
+													give_get_form_variable_price_dropdown($variable_price_dropdown_option, true);
292 292
 												}
293 293
 												?>
294 294
 											</td>
295 295
 											<td>
296 296
 												<?php
297 297
 												//Transaction Date
298
-												$date_format = get_option( 'date_format' );
299
-												echo date_i18n( $date_format, strtotime( $payment_date ) );
298
+												$date_format = get_option('date_format');
299
+												echo date_i18n($date_format, strtotime($payment_date));
300 300
 												?>
301 301
 											</td>
302 302
 											<td>
303
-												<?php echo esc_html( give_currency_filter( give_format_amount( give_get_payment_amount( $payment_id ) ) ) ); ?></td>
304
-											<?php do_action( 'give_donation_details_tbody_after', $payment_id ); ?>
303
+												<?php echo esc_html(give_currency_filter(give_format_amount(give_get_payment_amount($payment_id)))); ?></td>
304
+											<?php do_action('give_donation_details_tbody_after', $payment_id); ?>
305 305
 
306 306
 										</tr>
307 307
 									</table>
@@ -313,64 +313,64 @@  discard block
 block discarded – undo
313 313
 							</div>
314 314
 							<!-- /#give-donation-overview -->
315 315
 
316
-							<?php do_action( 'give_view_order_details_files_after', $payment_id ); ?>
316
+							<?php do_action('give_view_order_details_files_after', $payment_id); ?>
317 317
 
318
-							<?php do_action( 'give_view_order_details_billing_before', $payment_id ); ?>
318
+							<?php do_action('give_view_order_details_billing_before', $payment_id); ?>
319 319
 
320 320
 
321 321
 							<div id="give-customer-details" class="postbox">
322 322
 								<h3 class="hndle">
323
-									<span><?php esc_html_e( 'Donor Details', 'give' ); ?></span>
323
+									<span><?php esc_html_e('Donor Details', 'give'); ?></span>
324 324
 								</h3>
325 325
 
326 326
 								<div class="inside give-clearfix">
327 327
 
328
-									<?php $customer = new Give_Customer( $customer_id ); ?>
328
+									<?php $customer = new Give_Customer($customer_id); ?>
329 329
 
330 330
 									<div class="column-container customer-info">
331 331
 										<div class="column">
332
-											<?php echo Give()->html->donor_dropdown( array(
332
+											<?php echo Give()->html->donor_dropdown(array(
333 333
 												'selected' => $customer->id,
334 334
 												'name'     => 'customer-id'
335
-											) ); ?>
335
+											)); ?>
336 336
 										</div>
337 337
 										<div class="column">
338 338
 											<input type="hidden" name="give-current-customer" value="<?php echo $customer->id; ?>"/>
339 339
 										</div>
340 340
 										<div class="column">
341
-											<?php if ( ! empty( $customer->id ) ) : ?>
342
-												<?php $customer_url = admin_url( 'edit.php?post_type=give_forms&page=give-donors&view=overview&id=' . $customer->id ); ?>
343
-												<a href="<?php echo $customer_url; ?>" title="<?php esc_attr_e( 'View Donor Details', 'give' ); ?>"><?php esc_html_e( 'View Donor Details', 'give' ); ?></a>
341
+											<?php if ( ! empty($customer->id)) : ?>
342
+												<?php $customer_url = admin_url('edit.php?post_type=give_forms&page=give-donors&view=overview&id='.$customer->id); ?>
343
+												<a href="<?php echo $customer_url; ?>" title="<?php esc_attr_e('View Donor Details', 'give'); ?>"><?php esc_html_e('View Donor Details', 'give'); ?></a>
344 344
 												&nbsp;|&nbsp;
345 345
 											<?php endif; ?>
346
-											<a href="#new" class="give-payment-new-customer" title="<?php esc_attr_e( 'New Donor', 'give' ); ?>"><?php esc_html_e( 'New Donor', 'give' ); ?></a>
346
+											<a href="#new" class="give-payment-new-customer" title="<?php esc_attr_e('New Donor', 'give'); ?>"><?php esc_html_e('New Donor', 'give'); ?></a>
347 347
 										</div>
348 348
 									</div>
349 349
 
350 350
 									<div class="column-container new-customer" style="display: none">
351 351
 										<div class="column">
352
-											<label for="give-new-customer-name"><?php esc_html_e( 'Name:', 'give' ); ?></label>&nbsp;
352
+											<label for="give-new-customer-name"><?php esc_html_e('Name:', 'give'); ?></label>&nbsp;
353 353
 											<input id="give-new-customer-name" type="text" name="give-new-customer-name" value="" class="medium-text"/>
354 354
 										</div>
355 355
 										<div class="column">
356
-											<label for="give-new-customer-email"><?php esc_html_e( 'Email:', 'give' ); ?></label>&nbsp;
356
+											<label for="give-new-customer-email"><?php esc_html_e('Email:', 'give'); ?></label>&nbsp;
357 357
 											<input id="give-new-customer-email" type="email" name="give-new-customer-email" value="" class="medium-text"/>
358 358
 										</div>
359 359
 										<div class="column">
360 360
 											<input type="hidden" id="give-new-customer" name="give-new-customer" value="0"/>
361
-											<a href="#cancel" class="give-payment-new-customer-cancel give-delete"><?php esc_html_e( 'Cancel', 'give' ); ?></a>
361
+											<a href="#cancel" class="give-payment-new-customer-cancel give-delete"><?php esc_html_e('Cancel', 'give'); ?></a>
362 362
 										</div>
363 363
 										<div class="column">
364 364
 											<small>
365
-												<em>*<?php esc_html_e( 'Click "Save Payment" to create new donor', 'give' ); ?></em>
365
+												<em>*<?php esc_html_e('Click "Save Payment" to create new donor', 'give'); ?></em>
366 366
 											</small>
367 367
 										</div>
368 368
 									</div>
369 369
 
370 370
 									<?php
371 371
 									// The give_payment_personal_details_list hook is left here for backwards compatibility
372
-									do_action( 'give_payment_personal_details_list', $payment_meta, $user_info );
373
-									do_action( 'give_payment_view_details', $payment_id );
372
+									do_action('give_payment_personal_details_list', $payment_meta, $user_info);
373
+									do_action('give_payment_view_details', $payment_id);
374 374
 									?>
375 375
 
376 376
 								</div>
@@ -381,7 +381,7 @@  discard block
 block discarded – undo
381 381
 
382 382
 							<div id="give-billing-details" class="postbox">
383 383
 								<h3 class="hndle">
384
-									<span><?php esc_html_e( 'Billing Address', 'give' ); ?></span>
384
+									<span><?php esc_html_e('Billing Address', 'give'); ?></span>
385 385
 								</h3>
386 386
 
387 387
 								<div class="inside give-clearfix">
@@ -392,62 +392,62 @@  discard block
 block discarded – undo
392 392
 											<div class="data column-container">
393 393
 												<div class="column">
394 394
 													<div class="give-wrap-address-line1">
395
-														<label for="give-payment-address-line1" class="order-data-address"><?php esc_html_e( 'Street Address Line 1:', 'give' ); ?></label>
396
-														<input id="give-payment-address-line1" type="text" name="give-payment-address[0][line1]" value="<?php echo esc_attr( $address['line1'] ); ?>" class="medium-text"/>
395
+														<label for="give-payment-address-line1" class="order-data-address"><?php esc_html_e('Street Address Line 1:', 'give'); ?></label>
396
+														<input id="give-payment-address-line1" type="text" name="give-payment-address[0][line1]" value="<?php echo esc_attr($address['line1']); ?>" class="medium-text"/>
397 397
 													</div>
398 398
 
399 399
 													<div class="give-wrap-address-line2">
400
-														<label for="give-payment-address-line2" class="order-data-address-line"><?php esc_html_e( 'Street Address Line 2:', 'give' ); ?></label>
401
-														<input id="give-payment-address-line2" type="text" name="give-payment-address[0][line2]" value="<?php echo esc_attr( $address['line2'] ); ?>" class="medium-text"/>
400
+														<label for="give-payment-address-line2" class="order-data-address-line"><?php esc_html_e('Street Address Line 2:', 'give'); ?></label>
401
+														<input id="give-payment-address-line2" type="text" name="give-payment-address[0][line2]" value="<?php echo esc_attr($address['line2']); ?>" class="medium-text"/>
402 402
 													</div>
403 403
 
404 404
 												</div>
405 405
 												<div class="column">
406 406
 													<div class="give-wrap-address-city">
407
-														<label for="give-payment-address-city" class="order-data-address-line"><?php esc_html_e( 'City:', 'give' ); ?></label>
408
-														<input id="give-payment-address-city" type="text" name="give-payment-address[0][city]" value="<?php echo esc_attr( $address['city'] ); ?>" class="medium-text"/>
407
+														<label for="give-payment-address-city" class="order-data-address-line"><?php esc_html_e('City:', 'give'); ?></label>
408
+														<input id="give-payment-address-city" type="text" name="give-payment-address[0][city]" value="<?php echo esc_attr($address['city']); ?>" class="medium-text"/>
409 409
 
410 410
 													</div>
411 411
 
412 412
 													<div class="give-wrap-address-zip">
413
-														<label for="give-payment-address-zip" class="order-data-address-line"><?php esc_html_e( 'Zip / Postal Code:', 'give' ); ?></label>
414
-														<input id="give-payment-address-zip" type="text" name="give-payment-address[0][zip]" value="<?php echo esc_attr( $address['zip'] ); ?>" class="medium-text"/>
413
+														<label for="give-payment-address-zip" class="order-data-address-line"><?php esc_html_e('Zip / Postal Code:', 'give'); ?></label>
414
+														<input id="give-payment-address-zip" type="text" name="give-payment-address[0][zip]" value="<?php echo esc_attr($address['zip']); ?>" class="medium-text"/>
415 415
 
416 416
 													</div>
417 417
 												</div>
418 418
 												<div class="column">
419 419
 													<div id="give-order-address-country-wrap">
420
-														<label class="order-data-address-line"><?php esc_html_e( 'Country:', 'give' ); ?></label>
420
+														<label class="order-data-address-line"><?php esc_html_e('Country:', 'give'); ?></label>
421 421
 														<?php
422
-														echo Give()->html->select( array(
422
+														echo Give()->html->select(array(
423 423
 															'options'          => give_get_country_list(),
424 424
 															'name'             => 'give-payment-address[0][country]',
425 425
 															'selected'         => $address['country'],
426 426
 															'show_option_all'  => false,
427 427
 															'show_option_none' => false,
428 428
 															'chosen'           => true,
429
-															'placeholder'      => esc_attr__( 'Select a country', 'give' )
430
-														) );
429
+															'placeholder'      => esc_attr__('Select a country', 'give')
430
+														));
431 431
 														?>
432 432
 													</div>
433 433
 
434 434
 													<div id="give-order-address-state-wrap">
435
-														<label for="give-payment-address-state" class="order-data-address-line"><?php esc_html_e( 'State / Province:', 'give' ); ?></label>
435
+														<label for="give-payment-address-state" class="order-data-address-line"><?php esc_html_e('State / Province:', 'give'); ?></label>
436 436
 														<?php
437
-														$states = give_get_states( $address['country'] );
438
-														if ( ! empty( $states ) ) {
439
-															echo Give()->html->select( array(
437
+														$states = give_get_states($address['country']);
438
+														if ( ! empty($states)) {
439
+															echo Give()->html->select(array(
440 440
 																'options'          => $states,
441 441
 																'name'             => 'give-payment-address[0][state]',
442 442
 																'selected'         => $address['state'],
443 443
 																'show_option_all'  => false,
444 444
 																'show_option_none' => false,
445 445
 																'chosen'           => true,
446
-																'placeholder'      => esc_attr__( 'Select a state', 'give' )
447
-															) );
446
+																'placeholder'      => esc_attr__('Select a state', 'give')
447
+															));
448 448
 														} else {
449 449
 															?>
450
-															<input id="give-payment-address-state" type="text" name="give-payment-address[0][state]" value="<?php echo esc_attr( $address['state'] ); ?>" class="medium-text"/>
450
+															<input id="give-payment-address-state" type="text" name="give-payment-address[0][state]" value="<?php echo esc_attr($address['state']); ?>" class="medium-text"/>
451 451
 															<?php
452 452
 														} ?>
453 453
 													</div>
@@ -457,38 +457,38 @@  discard block
 block discarded – undo
457 457
 									</div>
458 458
 									<!-- /#give-order-address -->
459 459
 
460
-									<?php do_action( 'give_payment_billing_details', $payment_id ); ?>
460
+									<?php do_action('give_payment_billing_details', $payment_id); ?>
461 461
 
462 462
 								</div>
463 463
 								<!-- /.inside -->
464 464
 							</div>
465 465
 							<!-- /#give-billing-details -->
466 466
 
467
-							<?php do_action( 'give_view_order_details_billing_after', $payment_id ); ?>
467
+							<?php do_action('give_view_order_details_billing_after', $payment_id); ?>
468 468
 
469 469
 							<div id="give-payment-notes" class="postbox">
470
-								<h3 class="hndle"><span><?php esc_html_e( 'Payment Notes', 'give' ); ?></span></h3>
470
+								<h3 class="hndle"><span><?php esc_html_e('Payment Notes', 'give'); ?></span></h3>
471 471
 
472 472
 								<div class="inside">
473 473
 									<div id="give-payment-notes-inner">
474 474
 										<?php
475
-										$notes = give_get_payment_notes( $payment_id );
476
-										if ( ! empty( $notes ) ) :
475
+										$notes = give_get_payment_notes($payment_id);
476
+										if ( ! empty($notes)) :
477 477
 											$no_notes_display = ' style="display:none;"';
478
-											foreach ( $notes as $note ) :
478
+											foreach ($notes as $note) :
479 479
 
480
-												echo give_get_payment_note_html( $note, $payment_id );
480
+												echo give_get_payment_note_html($note, $payment_id);
481 481
 
482 482
 											endforeach;
483 483
 										else :
484 484
 											$no_notes_display = '';
485 485
 										endif;
486
-										echo '<p class="give-no-payment-notes"' . $no_notes_display . '>' . esc_html__( 'No payment notes', 'give' ) . '</p>'; ?>
486
+										echo '<p class="give-no-payment-notes"'.$no_notes_display.'>'.esc_html__('No payment notes', 'give').'</p>'; ?>
487 487
 									</div>
488 488
 									<textarea name="give-payment-note" id="give-payment-note" class="large-text"></textarea>
489 489
 
490 490
 									<div class="give-clearfix">
491
-										<button id="give-add-payment-note" class="button button-secondary button-small" data-payment-id="<?php echo absint( $payment_id ); ?>"><?php esc_html_e( 'Add Note', 'give' ); ?></button>
491
+										<button id="give-add-payment-note" class="button button-secondary button-small" data-payment-id="<?php echo absint($payment_id); ?>"><?php esc_html_e('Add Note', 'give'); ?></button>
492 492
 									</div>
493 493
 
494 494
 								</div>
@@ -496,7 +496,7 @@  discard block
 block discarded – undo
496 496
 							</div>
497 497
 							<!-- /#give-payment-notes -->
498 498
 
499
-							<?php do_action( 'give_view_order_details_main_after', $payment_id ); ?>
499
+							<?php do_action('give_view_order_details_main_after', $payment_id); ?>
500 500
 						</div>
501 501
 						<!-- /#normal-sortables -->
502 502
 					</div>
@@ -507,10 +507,10 @@  discard block
 block discarded – undo
507 507
 			<!-- #give-dashboard-widgets-wrap -->
508 508
 		</div>
509 509
 		<!-- /#post-stuff -->
510
-		<?php do_action( 'give_view_order_details_form_bottom', $payment_id ); ?>
511
-		<?php wp_nonce_field( 'give_update_payment_details_nonce' ); ?>
512
-		<input type="hidden" name="give_payment_id" value="<?php echo esc_attr( $payment_id ); ?>"/>
510
+		<?php do_action('give_view_order_details_form_bottom', $payment_id); ?>
511
+		<?php wp_nonce_field('give_update_payment_details_nonce'); ?>
512
+		<input type="hidden" name="give_payment_id" value="<?php echo esc_attr($payment_id); ?>"/>
513 513
 		<input type="hidden" name="give_action" value="update_payment_details"/>
514 514
 	</form>
515
-	<?php do_action( 'give_view_order_details_after', $payment_id ); ?>
515
+	<?php do_action('give_view_order_details_after', $payment_id); ?>
516 516
 </div><!-- /.wrap -->
Please login to merge, or discard this patch.