Completed
Branch BUG-8751-widget-external-url (c85a30)
by
unknown
157:35 queued 143:18
created
admin_pages/transactions/Transactions_Admin_Page.core.php 4 patches
Indentation   +49 added lines, -49 removed lines patch added patch discarded remove patch
@@ -89,9 +89,9 @@  discard block
 block discarded – undo
89 89
 
90 90
 	/**
91 91
 	 * 		grab url requests and route them
92
-	*		@access private
93
-	*		@return void
94
-	*/
92
+	 *		@access private
93
+	 *		@return void
94
+	 */
95 95
 	public function _set_page_routes() {
96 96
 
97 97
 		$this->_set_transaction_status_array();
@@ -226,10 +226,10 @@  discard block
 block discarded – undo
226 226
 	/**
227 227
 	 * _set_transaction_status_array
228 228
 	 * sets list of transaction statuses
229
-	*
229
+	 *
230 230
 	 * @access private
231
-	*	@return void
232
-	*/
231
+	 *	@return void
232
+	 */
233 233
 	private function _set_transaction_status_array() {
234 234
 		self::$_txn_status = EEM_Transaction::instance()->status_array(TRUE);
235 235
 	}
@@ -251,10 +251,10 @@  discard block
 block discarded – undo
251 251
 
252 252
 	/**
253 253
 	 * 	get list of payment statuses
254
-	*
254
+	 *
255 255
 	 * @access private
256
-	*	@return void
257
-	*/
256
+	 *	@return void
257
+	 */
258 258
 	private function _get_payment_status_array() {
259 259
 		self::$_pay_status = EEM_Payment::instance()->status_array(TRUE);
260 260
 		$this->_template_args['payment_status'] = self::$_pay_status;
@@ -362,18 +362,18 @@  discard block
 block discarded – undo
362 362
 		if ( is_object( $this->_transaction) )
363 363
 			return; //get out we've already set the object
364 364
 
365
-	    $TXN = EEM_Transaction::instance();
365
+		$TXN = EEM_Transaction::instance();
366 366
 
367
-	    $TXN_ID = ( ! empty( $this->_req_data['TXN_ID'] )) ? absint( $this->_req_data['TXN_ID'] ) : FALSE;
367
+		$TXN_ID = ( ! empty( $this->_req_data['TXN_ID'] )) ? absint( $this->_req_data['TXN_ID'] ) : FALSE;
368 368
 
369
-	    //get transaction object
370
-	    $this->_transaction = $TXN->get_one_by_ID($TXN_ID);
371
-	    $this->_session = !empty( $this->_transaction ) ? $this->_transaction->get('TXN_session_data') : NULL;
369
+		//get transaction object
370
+		$this->_transaction = $TXN->get_one_by_ID($TXN_ID);
371
+		$this->_session = !empty( $this->_transaction ) ? $this->_transaction->get('TXN_session_data') : NULL;
372 372
 
373 373
 	 	if ( empty( $this->_transaction ) ) {
374
-	    	$error_msg = __('An error occurred and the details for Transaction ID #', 'event_espresso') . $TXN_ID .  __(' could not be retrieved.', 'event_espresso');
374
+			$error_msg = __('An error occurred and the details for Transaction ID #', 'event_espresso') . $TXN_ID .  __(' could not be retrieved.', 'event_espresso');
375 375
 			EE_Error::add_error( $error_msg, __FILE__, __FUNCTION__, __LINE__ );
376
-	    }
376
+		}
377 377
 	}
378 378
 
379 379
 
@@ -475,12 +475,12 @@  discard block
 block discarded – undo
475 475
 
476 476
 
477 477
 	/**
478
-	* 	_transaction_details
478
+	 * 	_transaction_details
479 479
 	 * generates HTML for the View Transaction Details Admin page
480
-	*
480
+	 *
481 481
 	 * @access protected
482
-	*	@return void
483
-	*/
482
+	 *	@return void
483
+	 */
484 484
 	protected function _transaction_details() {
485 485
 		do_action( 'AHEE__Transactions_Admin_Page__transaction_details__start', $this->_transaction );
486 486
 		EE_Registry::instance()->load_helper( 'MSG_Template' );
@@ -603,10 +603,10 @@  discard block
 block discarded – undo
603 603
 	/**
604 604
 	 * txn_details_meta_box
605 605
 	 * generates HTML for the Transaction main meta box
606
-	*
606
+	 *
607 607
 	 * @access public
608
-	*	@return void
609
-	*/
608
+	 *	@return void
609
+	 */
610 610
 	public function txn_details_meta_box() {
611 611
 
612 612
 		$this->_set_transaction_object();
@@ -947,10 +947,10 @@  discard block
 block discarded – undo
947 947
 	/**
948 948
 	 * txn_billing_info_side_meta_box
949 949
 	 * 	generates HTML for the Edit Transaction side meta box
950
-	*
950
+	 *
951 951
 	 * @access public
952
-	*	@return void
953
-	*/
952
+	 *	@return void
953
+	 */
954 954
 	public function txn_billing_info_side_meta_box() {
955 955
 
956 956
 		$this->_template_args['billing_form'] = $this->_transaction->billing_info();
@@ -965,10 +965,10 @@  discard block
 block discarded – undo
965 965
 	/**
966 966
 	 * apply_payments_or_refunds
967 967
 	 * 	registers a payment or refund made towards a transaction
968
-	*
968
+	 *
969 969
 	 * @access public
970
-	*	@return void
971
-	*/
970
+	 *	@return void
971
+	 */
972 972
 	public function apply_payments_or_refunds() {
973 973
 
974 974
 		$json_response_data = array( 'return_data' => FALSE );
@@ -1206,10 +1206,10 @@  discard block
 block discarded – undo
1206 1206
 	/**
1207 1207
 	 * delete_payment
1208 1208
 	 * 	delete a payment or refund made towards a transaction
1209
-	*
1209
+	 *
1210 1210
 	 * @access public
1211
-	*	@return void
1212
-	*/
1211
+	 *	@return void
1212
+	 */
1213 1213
 	public function delete_payment() {
1214 1214
 
1215 1215
 		$json_response_data = array( 'return_data' => FALSE );
@@ -1273,12 +1273,12 @@  discard block
 block discarded – undo
1273 1273
 	/**
1274 1274
 	 * _send_payment_reminder
1275 1275
 	 * 	generates HTML for the View Transaction Details Admin page
1276
-	*
1276
+	 *
1277 1277
 	 * @access protected
1278
-	*	@return void
1279
-	*/
1278
+	 *	@return void
1279
+	 */
1280 1280
 	protected function _send_payment_reminder() {
1281
-	    $TXN_ID = ( ! empty( $this->_req_data['TXN_ID'] )) ? absint( $this->_req_data['TXN_ID'] ) : FALSE;
1281
+		$TXN_ID = ( ! empty( $this->_req_data['TXN_ID'] )) ? absint( $this->_req_data['TXN_ID'] ) : FALSE;
1282 1282
 		$transaction = EEM_Transaction::instance()->get_one_by_ID( $TXN_ID );
1283 1283
 		$query_args = isset($this->_req_data['redirect_to'] ) ? array('action' => $this->_req_data['redirect_to'], 'TXN_ID' => $this->_req_data['TXN_ID'] ) : array();
1284 1284
 		do_action( 'AHEE__Transactions_Admin_Page___send_payment_reminder__process_admin_payment_reminder', $transaction );
@@ -1301,29 +1301,29 @@  discard block
 block discarded – undo
1301 1301
 
1302 1302
 		$TXN = EEM_Transaction::instance();
1303 1303
 
1304
-	    $start_date = isset( $this->_req_data['txn-filter-start-date'] ) ? wp_strip_all_tags( $this->_req_data['txn-filter-start-date'] ) : date( 'm/d/Y', strtotime( '-10 year' ));
1305
-	    $end_date = isset( $this->_req_data['txn-filter-end-date'] ) ? wp_strip_all_tags( $this->_req_data['txn-filter-end-date'] ) : date( 'm/d/Y' );
1304
+		$start_date = isset( $this->_req_data['txn-filter-start-date'] ) ? wp_strip_all_tags( $this->_req_data['txn-filter-start-date'] ) : date( 'm/d/Y', strtotime( '-10 year' ));
1305
+		$end_date = isset( $this->_req_data['txn-filter-end-date'] ) ? wp_strip_all_tags( $this->_req_data['txn-filter-end-date'] ) : date( 'm/d/Y' );
1306 1306
 
1307
-	    //make sure our timestamps start and end right at the boundaries for each day
1308
-	    $start_date = date( 'Y-m-d', strtotime( $start_date ) ) . ' 00:00:00';
1309
-	    $end_date = date( 'Y-m-d', strtotime( $end_date ) ) . ' 23:59:59';
1307
+		//make sure our timestamps start and end right at the boundaries for each day
1308
+		$start_date = date( 'Y-m-d', strtotime( $start_date ) ) . ' 00:00:00';
1309
+		$end_date = date( 'Y-m-d', strtotime( $end_date ) ) . ' 23:59:59';
1310 1310
 
1311 1311
 
1312
-	    //convert to timestamps
1313
-	    $start_date = strtotime( $start_date );
1314
-	    $end_date = strtotime( $end_date );
1312
+		//convert to timestamps
1313
+		$start_date = strtotime( $start_date );
1314
+		$end_date = strtotime( $end_date );
1315 1315
 
1316
-	    //makes sure start date is the lowest value and vice versa
1317
-	    $start_date = min( $start_date, $end_date );
1318
-	    $end_date = max( $start_date, $end_date );
1316
+		//makes sure start date is the lowest value and vice versa
1317
+		$start_date = min( $start_date, $end_date );
1318
+		$end_date = max( $start_date, $end_date );
1319 1319
 
1320
-	    //convert to correct format for query
1320
+		//convert to correct format for query
1321 1321
 	$start_date = EEM_Transaction::instance()->convert_datetime_for_query( 'TXN_timestamp', date( 'Y-m-d H:i:s', $start_date ), 'Y-m-d H:i:s' );
1322 1322
 	$end_date = EEM_Transaction::instance()->convert_datetime_for_query( 'TXN_timestamp', date( 'Y-m-d H:i:s', $end_date ), 'Y-m-d H:i:s' );
1323 1323
 
1324 1324
 
1325 1325
 
1326
-	    //set orderby
1326
+		//set orderby
1327 1327
 		$this->_req_data['orderby'] = ! empty($this->_req_data['orderby']) ? $this->_req_data['orderby'] : '';
1328 1328
 
1329 1329
 		switch ( $this->_req_data['orderby'] ) {
Please login to merge, or discard this patch.
Braces   +8 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@  discard block
 block discarded – undo
1
-<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed');
1
+<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) {
2
+	exit('No direct script access allowed');
3
+}
2 4
 /**
3 5
  * Event Espresso
4 6
  *
@@ -359,8 +361,10 @@  discard block
 block discarded – undo
359 361
 	 *	@return void
360 362
 	 */
361 363
 	private function _set_transaction_object() {
362
-		if ( is_object( $this->_transaction) )
363
-			return; //get out we've already set the object
364
+		if ( is_object( $this->_transaction) ) {
365
+					return;
366
+		}
367
+		//get out we've already set the object
364 368
 
365 369
 	    $TXN = EEM_Transaction::instance();
366 370
 
@@ -836,7 +840,7 @@  discard block
 block discarded – undo
836 840
 			$query_args = array( array( 'OR*payment_method_for_payment' => array(
837 841
 					'PMD_ID' => array( 'IN', $payment_methods_of_payments ),
838 842
 					'PMD_scope' => array( 'LIKE', '%' . EEM_Payment_Method::scope_admin . '%' ) ) ) );
839
-		}else{
843
+		} else{
840 844
 			$query_args = array( array( 'PMD_scope' => array( 'LIKE', '%' . EEM_Payment_Method::scope_admin . '%' ) ) );
841 845
 		}
842 846
 		$this->_template_args['payment_methods'] = EEM_Payment_Method::instance()->get_all( $query_args );
Please login to merge, or discard this patch.
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1176,7 +1176,7 @@  discard block
 block discarded – undo
1176 1176
 	 * _create_payment_from_request_data
1177 1177
 	 *
1178 1178
 	 * @param array $valid_data
1179
-	 * @return EE_Payment
1179
+	 * @return EE_Attendee
1180 1180
 	 */
1181 1181
 	protected function _create_payment_from_request_data( $valid_data ) {
1182 1182
 		$PAY_ID = $valid_data[ 'PAY_ID' ];
@@ -1348,7 +1348,7 @@  discard block
 block discarded – undo
1348 1348
 	 * @param  EE_Transaction $transaction
1349 1349
 	 * @param \EE_Payment $payment
1350 1350
 	 * @param array $REG_IDs
1351
-	 * @return bool
1351
+	 * @return boolean|null
1352 1352
 	 */
1353 1353
 	protected function _update_registration_payments( EE_Transaction $transaction, EE_Payment $payment, $REG_IDs = array() ) {
1354 1354
 		// we can pass our own custom set of registrations to EE_Payment_Processor::process_registration_payments()
Please login to merge, or discard this patch.
Spacing   +383 added lines, -383 removed lines patch added patch discarded remove patch
@@ -56,8 +56,8 @@  discard block
 block discarded – undo
56 56
 	 * @param bool $routing
57 57
 	 * @return Transactions_Admin_Page
58 58
 	 */
59
-	public function __construct( $routing = TRUE ) {
60
-		parent::__construct( $routing );
59
+	public function __construct($routing = TRUE) {
60
+		parent::__construct($routing);
61 61
 	}
62 62
 
63 63
 
@@ -80,9 +80,9 @@  discard block
 block discarded – undo
80 80
 	 * @return void
81 81
 	 */
82 82
 	protected function _ajax_hooks() {
83
-		add_action('wp_ajax_espresso_apply_payment', array( $this, 'apply_payments_or_refunds'));
84
-		add_action('wp_ajax_espresso_apply_refund', array( $this, 'apply_payments_or_refunds'));
85
-		add_action('wp_ajax_espresso_delete_payment', array( $this, 'delete_payment'));
83
+		add_action('wp_ajax_espresso_apply_payment', array($this, 'apply_payments_or_refunds'));
84
+		add_action('wp_ajax_espresso_apply_refund', array($this, 'apply_payments_or_refunds'));
85
+		add_action('wp_ajax_espresso_delete_payment', array($this, 'delete_payment'));
86 86
 	}
87 87
 
88 88
 
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 			'buttons' => array(
98 98
 				'add' => __('Add New Transaction', 'event_espresso'),
99 99
 				'edit' => __('Edit Transaction', 'event_espresso'),
100
-				'delete' => __('Delete Transaction','event_espresso')
100
+				'delete' => __('Delete Transaction', 'event_espresso')
101 101
 				)
102 102
 			);
103 103
 	}
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
 
114 114
 		$this->_set_transaction_status_array();
115 115
 
116
-		$txn_id = ! empty( $this->_req_data['TXN_ID'] ) && ! is_array( $this->_req_data['TXN_ID'] ) ? $this->_req_data['TXN_ID'] : 0;
116
+		$txn_id = ! empty($this->_req_data['TXN_ID']) && ! is_array($this->_req_data['TXN_ID']) ? $this->_req_data['TXN_ID'] : 0;
117 117
 
118 118
 		$this->_page_routes = array(
119 119
 
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
 						'filename' => 'transactions_overview_views_filters_search'
186 186
 					),
187 187
 				),
188
-				'help_tour' => array( 'Transactions_Overview_Help_Tour' ),
188
+				'help_tour' => array('Transactions_Overview_Help_Tour'),
189 189
 				/**
190 190
 				 * commented out because currently we are not displaying tips for transaction list table status but this
191 191
 				 * may change in a later iteration so want to keep the code for then.
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
 				'nav' => array(
198 198
 					'label' => __('View Transaction', 'event_espresso'),
199 199
 					'order' => 5,
200
-					'url' => isset($this->_req_data['TXN_ID']) ? add_query_arg(array('TXN_ID' => $this->_req_data['TXN_ID'] ), $this->_current_page_view_url )  : $this->_admin_base_url,
200
+					'url' => isset($this->_req_data['TXN_ID']) ? add_query_arg(array('TXN_ID' => $this->_req_data['TXN_ID']), $this->_current_page_view_url) : $this->_admin_base_url,
201 201
 					'persistent' => FALSE
202 202
 					),
203 203
 				'help_tabs' => array(
@@ -218,8 +218,8 @@  discard block
 block discarded – undo
218 218
 						'filename' => 'transactions_view_transaction_primary_registrant_billing_information'
219 219
 					),
220 220
 				),
221
-				'qtips' => array( 'Transaction_Details_Tips' ),
222
-				'help_tour' => array( 'Transaction_Details_Help_Tour' ),
221
+				'qtips' => array('Transaction_Details_Tips'),
222
+				'help_tour' => array('Transaction_Details_Help_Tour'),
223 223
 				'metaboxes' => array('_transaction_details_metaboxes'),
224 224
 
225 225
 				'require_nonce' => FALSE
@@ -234,10 +234,10 @@  discard block
 block discarded – undo
234 234
 	protected function _add_screen_options() {}
235 235
 	protected function _add_feature_pointers() {}
236 236
 	public function admin_init() {
237
-		EE_Registry::$i18n_js_strings[ 'invalid_server_response' ] = __( 'An error occurred! Your request may have been processed, but a valid response from the server was not received. Please refresh the page and try again.', 'event_espresso' );
238
-		EE_Registry::$i18n_js_strings[ 'error_occurred' ] = __( 'An error occurred! Please refresh the page and try again.', 'event_espresso' );
239
-		EE_Registry::$i18n_js_strings[ 'txn_status_array' ] = self::$_txn_status;
240
-		EE_Registry::$i18n_js_strings[ 'pay_status_array' ] = self::$_pay_status;
237
+		EE_Registry::$i18n_js_strings['invalid_server_response'] = __('An error occurred! Your request may have been processed, but a valid response from the server was not received. Please refresh the page and try again.', 'event_espresso');
238
+		EE_Registry::$i18n_js_strings['error_occurred'] = __('An error occurred! Please refresh the page and try again.', 'event_espresso');
239
+		EE_Registry::$i18n_js_strings['txn_status_array'] = self::$_txn_status;
240
+		EE_Registry::$i18n_js_strings['pay_status_array'] = self::$_pay_status;
241 241
 	}
242 242
 	public function admin_notices() {}
243 243
 	public function admin_footer_scripts() {}
@@ -304,14 +304,14 @@  discard block
 block discarded – undo
304 304
 	 */
305 305
 	public function load_scripts_styles() {
306 306
 		//enqueue style
307
-		wp_register_style( 'espresso_txn', TXN_ASSETS_URL . 'espresso_transactions_admin.css', array(), EVENT_ESPRESSO_VERSION );
307
+		wp_register_style('espresso_txn', TXN_ASSETS_URL.'espresso_transactions_admin.css', array(), EVENT_ESPRESSO_VERSION);
308 308
 		wp_enqueue_style('espresso_txn');
309 309
 
310 310
 		//scripts
311 311
 		add_filter('FHEE_load_accounting_js', '__return_true');
312 312
 
313 313
 		//scripts
314
-		wp_register_script('espresso_txn', TXN_ASSETS_URL . 'espresso_transactions_admin.js', array('ee_admin_js', 'ee-datepicker', 'jquery-ui-datepicker', 'jquery-ui-draggable', 'ee-dialog', 'ee-accounting', 'ee-serialize-full-array'), EVENT_ESPRESSO_VERSION, TRUE);
314
+		wp_register_script('espresso_txn', TXN_ASSETS_URL.'espresso_transactions_admin.js', array('ee_admin_js', 'ee-datepicker', 'jquery-ui-datepicker', 'jquery-ui-draggable', 'ee-dialog', 'ee-accounting', 'ee-serialize-full-array'), EVENT_ESPRESSO_VERSION, TRUE);
315 315
 		wp_enqueue_script('espresso_txn');
316 316
 
317 317
 	}
@@ -351,8 +351,8 @@  discard block
 block discarded – undo
351 351
 	 *	@return void
352 352
 	 */
353 353
 	protected function _set_list_table_views_default() {
354
-		$this->_views = array (
355
-			'all' => array (
354
+		$this->_views = array(
355
+			'all' => array(
356 356
 				'slug' 		=> 'all',
357 357
 				'label' 		=> __('View All Transactions', 'event_espresso'),
358 358
 				'count' 	=> 0
@@ -380,20 +380,20 @@  discard block
 block discarded – undo
380 380
 	 *	@return void
381 381
 	 */
382 382
 	private function _set_transaction_object() {
383
-		if ( is_object( $this->_transaction) )
383
+		if (is_object($this->_transaction))
384 384
 			return; //get out we've already set the object
385 385
 
386 386
 	    $TXN = EEM_Transaction::instance();
387 387
 
388
-	    $TXN_ID = ( ! empty( $this->_req_data['TXN_ID'] )) ? absint( $this->_req_data['TXN_ID'] ) : FALSE;
388
+	    $TXN_ID = ( ! empty($this->_req_data['TXN_ID'])) ? absint($this->_req_data['TXN_ID']) : FALSE;
389 389
 
390 390
 	    //get transaction object
391 391
 	    $this->_transaction = $TXN->get_one_by_ID($TXN_ID);
392
-	    $this->_session = !empty( $this->_transaction ) ? $this->_transaction->get('TXN_session_data') : NULL;
392
+	    $this->_session = ! empty($this->_transaction) ? $this->_transaction->get('TXN_session_data') : NULL;
393 393
 
394
-	 	if ( empty( $this->_transaction ) ) {
395
-	    	$error_msg = __('An error occurred and the details for Transaction ID #', 'event_espresso') . $TXN_ID .  __(' could not be retrieved.', 'event_espresso');
396
-			EE_Error::add_error( $error_msg, __FILE__, __FUNCTION__, __LINE__ );
394
+	 	if (empty($this->_transaction)) {
395
+	    	$error_msg = __('An error occurred and the details for Transaction ID #', 'event_espresso').$TXN_ID.__(' could not be retrieved.', 'event_espresso');
396
+			EE_Error::add_error($error_msg, __FILE__, __FUNCTION__, __LINE__);
397 397
 	    }
398 398
 	}
399 399
 
@@ -419,7 +419,7 @@  discard block
 block discarded – undo
419 419
 				),
420 420
 				'view_receipt' => array(
421 421
 					'class' => 'dashicons dashicons-media-default',
422
-					'desc' => __('View Transaction Receipt', 'event_espresso' )
422
+					'desc' => __('View Transaction Receipt', 'event_espresso')
423 423
 				),
424 424
 				'view_registration' => array(
425 425
 					'class' => 'dashicons dashicons-clipboard',
@@ -428,10 +428,10 @@  discard block
 block discarded – undo
428 428
 			)
429 429
 		);
430 430
 
431
-		if ( EE_Registry::instance()->CAP->current_user_can( 'ee_send_message', 'espresso_transactions_send_payment_reminder' ) ) {
431
+		if (EE_Registry::instance()->CAP->current_user_can('ee_send_message', 'espresso_transactions_send_payment_reminder')) {
432 432
 
433
-			EE_Registry::instance()->load_helper( 'MSG_Template' );
434
-			if ( EEH_MSG_Template::is_mt_active( 'payment_reminder' ) ) {
433
+			EE_Registry::instance()->load_helper('MSG_Template');
434
+			if (EEH_MSG_Template::is_mt_active('payment_reminder')) {
435 435
 				$items['send_payment_reminder'] = array(
436 436
 					'class' => 'dashicons dashicons-email-alt',
437 437
 					'desc' => __('Send Payment Reminder', 'event_espresso')
@@ -452,29 +452,29 @@  discard block
 block discarded – undo
452 452
 			'FHEE__Transactions_Admin_Page___transaction_legend_items__more_items',
453 453
 			array(
454 454
 				'overpaid'   => array(
455
-					'class' => 'ee-status-legend ee-status-legend-' . EEM_Transaction::overpaid_status_code,
456
-					'desc'  => EEH_Template::pretty_status( EEM_Transaction::overpaid_status_code, FALSE, 'sentence' )
455
+					'class' => 'ee-status-legend ee-status-legend-'.EEM_Transaction::overpaid_status_code,
456
+					'desc'  => EEH_Template::pretty_status(EEM_Transaction::overpaid_status_code, FALSE, 'sentence')
457 457
 				),
458 458
 				'complete'   => array(
459
-					'class' => 'ee-status-legend ee-status-legend-' . EEM_Transaction::complete_status_code,
460
-					'desc'  => EEH_Template::pretty_status( EEM_Transaction::complete_status_code, FALSE, 'sentence' )
459
+					'class' => 'ee-status-legend ee-status-legend-'.EEM_Transaction::complete_status_code,
460
+					'desc'  => EEH_Template::pretty_status(EEM_Transaction::complete_status_code, FALSE, 'sentence')
461 461
 				),
462 462
 				'incomplete' => array(
463
-					'class' => 'ee-status-legend ee-status-legend-' . EEM_Transaction::incomplete_status_code,
464
-					'desc'  => EEH_Template::pretty_status( EEM_Transaction::incomplete_status_code, FALSE, 'sentence' )
463
+					'class' => 'ee-status-legend ee-status-legend-'.EEM_Transaction::incomplete_status_code,
464
+					'desc'  => EEH_Template::pretty_status(EEM_Transaction::incomplete_status_code, FALSE, 'sentence')
465 465
 				),
466 466
 				'abandoned'  => array(
467
-					'class' => 'ee-status-legend ee-status-legend-' . EEM_Transaction::abandoned_status_code,
468
-					'desc'  => EEH_Template::pretty_status( EEM_Transaction::abandoned_status_code, FALSE, 'sentence' )
467
+					'class' => 'ee-status-legend ee-status-legend-'.EEM_Transaction::abandoned_status_code,
468
+					'desc'  => EEH_Template::pretty_status(EEM_Transaction::abandoned_status_code, FALSE, 'sentence')
469 469
 				),
470 470
 				'failed'     => array(
471
-					'class' => 'ee-status-legend ee-status-legend-' . EEM_Transaction::failed_status_code,
472
-					'desc'  => EEH_Template::pretty_status( EEM_Transaction::failed_status_code, FALSE, 'sentence' )
471
+					'class' => 'ee-status-legend ee-status-legend-'.EEM_Transaction::failed_status_code,
472
+					'desc'  => EEH_Template::pretty_status(EEM_Transaction::failed_status_code, FALSE, 'sentence')
473 473
 				)
474 474
 			)
475 475
 		);
476 476
 
477
-		return array_merge( $items, $more_items);
477
+		return array_merge($items, $more_items);
478 478
 	}
479 479
 
480 480
 
@@ -487,9 +487,9 @@  discard block
 block discarded – undo
487 487
 	 */
488 488
 	protected function _transactions_overview_list_table() {
489 489
 		$this->_admin_page_title = __('Transactions', 'event_espresso');
490
-		$event = isset($this->_req_data['EVT_ID']) ? EEM_Event::instance()->get_one_by_ID($this->_req_data['EVT_ID'] ) : NULL;
491
-		$this->_template_args['admin_page_header'] = $event instanceof EE_Event ? sprintf( __('%sViewing Transactions for the Event: %s%s', 'event_espresso'), '<h3>', '<a href="' . EE_Admin_Page::add_query_args_and_nonce(array('action' => 'edit', 'post' => $event->ID()), EVENTS_ADMIN_URL ) . '" title="' . esc_attr__('Click to Edit event', 'event_espresso') . '">' . $event->get('EVT_name') . '</a>', '</h3>' ) : '';
492
-		$this->_template_args['after_list_table'] = $this->_display_legend( $this->_transaction_legend_items() );
490
+		$event = isset($this->_req_data['EVT_ID']) ? EEM_Event::instance()->get_one_by_ID($this->_req_data['EVT_ID']) : NULL;
491
+		$this->_template_args['admin_page_header'] = $event instanceof EE_Event ? sprintf(__('%sViewing Transactions for the Event: %s%s', 'event_espresso'), '<h3>', '<a href="'.EE_Admin_Page::add_query_args_and_nonce(array('action' => 'edit', 'post' => $event->ID()), EVENTS_ADMIN_URL).'" title="'.esc_attr__('Click to Edit event', 'event_espresso').'">'.$event->get('EVT_name').'</a>', '</h3>') : '';
492
+		$this->_template_args['after_list_table'] = $this->_display_legend($this->_transaction_legend_items());
493 493
 		$this->display_admin_list_table_page_with_no_sidebar();
494 494
 	}
495 495
 
@@ -503,8 +503,8 @@  discard block
 block discarded – undo
503 503
 	*	@return void
504 504
 	*/
505 505
 	protected function _transaction_details() {
506
-		do_action( 'AHEE__Transactions_Admin_Page__transaction_details__start', $this->_transaction );
507
-		EE_Registry::instance()->load_helper( 'MSG_Template' );
506
+		do_action('AHEE__Transactions_Admin_Page__transaction_details__start', $this->_transaction);
507
+		EE_Registry::instance()->load_helper('MSG_Template');
508 508
 
509 509
 		$this->_set_transaction_status_array();
510 510
 
@@ -517,75 +517,75 @@  discard block
 block discarded – undo
517 517
 		$attendee = $primary_registration instanceof EE_Registration ? $primary_registration->attendee() : NULL;
518 518
 
519 519
 		$this->_template_args['txn_nmbr']['value'] = $this->_transaction->ID();
520
-		$this->_template_args['txn_nmbr']['label'] = __( 'Transaction Number', 'event_espresso' );
520
+		$this->_template_args['txn_nmbr']['label'] = __('Transaction Number', 'event_espresso');
521 521
 
522
-		$this->_template_args['txn_datetime']['value'] = $this->_transaction->get_datetime('TXN_timestamp', 'l F j, Y', 'g:i:s a' );
523
-		$this->_template_args['txn_datetime']['label'] = __( 'Date', 'event_espresso' );
522
+		$this->_template_args['txn_datetime']['value'] = $this->_transaction->get_datetime('TXN_timestamp', 'l F j, Y', 'g:i:s a');
523
+		$this->_template_args['txn_datetime']['label'] = __('Date', 'event_espresso');
524 524
 
525
-		$this->_template_args['txn_status']['value'] = self::$_txn_status[ $this->_transaction->get('STS_ID') ];
526
-		$this->_template_args['txn_status']['label'] = __( 'Transaction Status', 'event_espresso' );
527
-		$this->_template_args['txn_status']['class'] = 'status-' . $this->_transaction->get('STS_ID');
525
+		$this->_template_args['txn_status']['value'] = self::$_txn_status[$this->_transaction->get('STS_ID')];
526
+		$this->_template_args['txn_status']['label'] = __('Transaction Status', 'event_espresso');
527
+		$this->_template_args['txn_status']['class'] = 'status-'.$this->_transaction->get('STS_ID');
528 528
 
529 529
 		$this->_template_args['grand_total'] = $this->_transaction->get('TXN_total');
530 530
 		$this->_template_args['total_paid'] = $this->_transaction->get('TXN_paid');
531 531
 
532
-		if ( $attendee instanceof EE_Attendee && EE_Registry::instance()->CAP->current_user_can( 'ee_send_message', 'espresso_transactions_send_payment_reminder' ) ) {
533
-			EE_Registry::instance()->load_helper( 'MSG_Template' );
534
-			$this->_template_args['send_payment_reminder_button'] = EEH_MSG_Template::is_mt_active( 'payment_reminder' )
532
+		if ($attendee instanceof EE_Attendee && EE_Registry::instance()->CAP->current_user_can('ee_send_message', 'espresso_transactions_send_payment_reminder')) {
533
+			EE_Registry::instance()->load_helper('MSG_Template');
534
+			$this->_template_args['send_payment_reminder_button'] = EEH_MSG_Template::is_mt_active('payment_reminder')
535 535
 				 && $this->_transaction->get('STS_ID') != EEM_Transaction::complete_status_code
536 536
 				 && $this->_transaction->get('STS_ID') != EEM_Transaction::overpaid_status_code
537
-				 ? EEH_Template::get_button_or_link( EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'send_payment_reminder', 'TXN_ID'=>$this->_transaction->ID(), 'redirect_to' => 'view_transaction' ), TXN_ADMIN_URL ), __(' Send Payment Reminder'), 'button secondary-button right',  'dashicons dashicons-email-alt' )
537
+				 ? EEH_Template::get_button_or_link(EE_Admin_Page::add_query_args_and_nonce(array('action'=>'send_payment_reminder', 'TXN_ID'=>$this->_transaction->ID(), 'redirect_to' => 'view_transaction'), TXN_ADMIN_URL), __(' Send Payment Reminder'), 'button secondary-button right', 'dashicons dashicons-email-alt')
538 538
 				 : '';
539 539
 		} else {
540 540
 			$this->_template_args['send_payment_reminder_button'] = '';
541 541
 		}
542 542
 
543 543
 		$amount_due = $this->_transaction->get('TXN_total') - $this->_transaction->get('TXN_paid');
544
-		$this->_template_args['amount_due'] = EEH_Template::format_currency( $amount_due, TRUE );
545
-		if ( EE_Registry::instance()->CFG->currency->sign_b4 ) {
546
-			$this->_template_args['amount_due'] = EE_Registry::instance()->CFG->currency->sign . $this->_template_args['amount_due'];
544
+		$this->_template_args['amount_due'] = EEH_Template::format_currency($amount_due, TRUE);
545
+		if (EE_Registry::instance()->CFG->currency->sign_b4) {
546
+			$this->_template_args['amount_due'] = EE_Registry::instance()->CFG->currency->sign.$this->_template_args['amount_due'];
547 547
 		} else {
548
-			$this->_template_args['amount_due'] = $this->_template_args['amount_due'] . EE_Registry::instance()->CFG->currency->sign;
548
+			$this->_template_args['amount_due'] = $this->_template_args['amount_due'].EE_Registry::instance()->CFG->currency->sign;
549 549
 		}
550
-		$this->_template_args['amount_due_class'] =  '';
550
+		$this->_template_args['amount_due_class'] = '';
551 551
 
552
-		if ( $this->_transaction->get('TXN_paid') == $this->_transaction->get('TXN_total') ) {
552
+		if ($this->_transaction->get('TXN_paid') == $this->_transaction->get('TXN_total')) {
553 553
 			// paid in full
554
-			$this->_template_args['amount_due'] =  FALSE;
555
-		} elseif ( $this->_transaction->get('TXN_paid') > $this->_transaction->get('TXN_total') ) {
554
+			$this->_template_args['amount_due'] = FALSE;
555
+		} elseif ($this->_transaction->get('TXN_paid') > $this->_transaction->get('TXN_total')) {
556 556
 			// overpaid
557
-			$this->_template_args['amount_due_class'] =  'txn-overview-no-payment-spn';
558
-		} elseif (( $this->_transaction->get('TXN_total') > 0 ) && ( $this->_transaction->get('TXN_paid') > 0 )) {
557
+			$this->_template_args['amount_due_class'] = 'txn-overview-no-payment-spn';
558
+		} elseif (($this->_transaction->get('TXN_total') > 0) && ($this->_transaction->get('TXN_paid') > 0)) {
559 559
 			// monies owing
560
-			$this->_template_args['amount_due_class'] =  'txn-overview-part-payment-spn';
561
-		} elseif (( $this->_transaction->get('TXN_total') > 0 ) && ( $this->_transaction->get('TXN_paid') == 0 )) {
560
+			$this->_template_args['amount_due_class'] = 'txn-overview-part-payment-spn';
561
+		} elseif (($this->_transaction->get('TXN_total') > 0) && ($this->_transaction->get('TXN_paid') == 0)) {
562 562
 			// no payments made yet
563
-			$this->_template_args['amount_due_class'] =  'txn-overview-no-payment-spn';
564
-		} elseif ( $this->_transaction->get('TXN_total') == 0 ) {
563
+			$this->_template_args['amount_due_class'] = 'txn-overview-no-payment-spn';
564
+		} elseif ($this->_transaction->get('TXN_total') == 0) {
565 565
 			// free event
566
-			$this->_template_args['amount_due'] =  FALSE;
566
+			$this->_template_args['amount_due'] = FALSE;
567 567
 		}
568 568
 
569 569
 		$payment_method = $this->_transaction->payment_method();
570 570
 
571
-		$this->_template_args['method_of_payment_name'] = $payment_method instanceof EE_Payment_Method ? $payment_method->admin_name() : __( 'Unknown', 'event_espresso' );
571
+		$this->_template_args['method_of_payment_name'] = $payment_method instanceof EE_Payment_Method ? $payment_method->admin_name() : __('Unknown', 'event_espresso');
572 572
 		$this->_template_args['currency_sign'] = EE_Registry::instance()->CFG->currency->sign;
573 573
 		// link back to overview
574
-		$this->_template_args['txn_overview_url'] = ! empty ( $_SERVER['HTTP_REFERER'] ) ? $_SERVER['HTTP_REFERER'] : TXN_ADMIN_URL;
574
+		$this->_template_args['txn_overview_url'] = ! empty ($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : TXN_ADMIN_URL;
575 575
 
576 576
 
577 577
 		//next and previous links
578
-		$next_txn = $this->_transaction->next(null, array( array( 'STS_ID' => array( '!=', EEM_Transaction::failed_status_code ) ) ), 'TXN_ID' );
579
-		$this->_template_args['next_transaction'] = $next_txn ? $this->_next_link( EE_Admin_Page::add_query_args_and_nonce( array( 'action' => 'view_transaction', 'TXN_ID' => $next_txn['TXN_ID'] ), TXN_ADMIN_URL ), 'dashicons dashicons-arrow-right ee-icon-size-22' ) : '';
580
-		$previous_txn = $this->_transaction->previous( null, array( array( 'STS_ID' => array( '!=', EEM_Transaction::failed_status_code ) ) ), 'TXN_ID' );
581
-		$this->_template_args['previous_transaction'] = $previous_txn ? $this->_previous_link( EE_Admin_Page::add_query_args_and_nonce( array( 'action' => 'view_transaction', 'TXN_ID' => $previous_txn['TXN_ID'] ), TXN_ADMIN_URL ), 'dashicons dashicons-arrow-left ee-icon-size-22' ) : '';
578
+		$next_txn = $this->_transaction->next(null, array(array('STS_ID' => array('!=', EEM_Transaction::failed_status_code))), 'TXN_ID');
579
+		$this->_template_args['next_transaction'] = $next_txn ? $this->_next_link(EE_Admin_Page::add_query_args_and_nonce(array('action' => 'view_transaction', 'TXN_ID' => $next_txn['TXN_ID']), TXN_ADMIN_URL), 'dashicons dashicons-arrow-right ee-icon-size-22') : '';
580
+		$previous_txn = $this->_transaction->previous(null, array(array('STS_ID' => array('!=', EEM_Transaction::failed_status_code))), 'TXN_ID');
581
+		$this->_template_args['previous_transaction'] = $previous_txn ? $this->_previous_link(EE_Admin_Page::add_query_args_and_nonce(array('action' => 'view_transaction', 'TXN_ID' => $previous_txn['TXN_ID']), TXN_ADMIN_URL), 'dashicons dashicons-arrow-left ee-icon-size-22') : '';
582 582
 
583 583
 
584 584
 		// grab messages at the last second
585 585
 		$this->_template_args['notices'] = EE_Error::get_notices();
586 586
 		// path to template
587
-		$template_path = TXN_TEMPLATE_PATH . 'txn_admin_details_header.template.php';
588
-		$this->_template_args['admin_page_header'] = EEH_Template::display_template( $template_path, $this->_template_args, TRUE );
587
+		$template_path = TXN_TEMPLATE_PATH.'txn_admin_details_header.template.php';
588
+		$this->_template_args['admin_page_header'] = EEH_Template::display_template($template_path, $this->_template_args, TRUE);
589 589
 
590 590
 		// the details template wrapper
591 591
 		$this->display_admin_page_with_sidebar();
@@ -604,18 +604,18 @@  discard block
 block discarded – undo
604 604
 
605 605
 		$this->_set_transaction_object();
606 606
 
607
-		add_meta_box( 'edit-txn-details-mbox', __( 'Transaction Details', 'event_espresso' ), array( $this, 'txn_details_meta_box' ), $this->_wp_page_slug, 'normal', 'high' );
607
+		add_meta_box('edit-txn-details-mbox', __('Transaction Details', 'event_espresso'), array($this, 'txn_details_meta_box'), $this->_wp_page_slug, 'normal', 'high');
608 608
 		add_meta_box(
609 609
 			'edit-txn-attendees-mbox',
610
-			__( 'Attendees Registered in this Transaction', 'event_espresso' ),
611
-			array( $this, 'txn_attendees_meta_box' ),
610
+			__('Attendees Registered in this Transaction', 'event_espresso'),
611
+			array($this, 'txn_attendees_meta_box'),
612 612
 			$this->_wp_page_slug,
613 613
 			'normal',
614 614
 			'high',
615
-			array( 'TXN_ID' => $this->_transaction->ID() )
615
+			array('TXN_ID' => $this->_transaction->ID())
616 616
 		);
617
-		add_meta_box( 'edit-txn-registrant-mbox', __( 'Primary Contact', 'event_espresso' ), array( $this, 'txn_registrant_side_meta_box' ), $this->_wp_page_slug, 'side', 'high' );
618
-		add_meta_box( 'edit-txn-billing-info-mbox', __( 'Billing Information', 'event_espresso' ), array( $this, 'txn_billing_info_side_meta_box' ), $this->_wp_page_slug, 'side', 'high' );
617
+		add_meta_box('edit-txn-registrant-mbox', __('Primary Contact', 'event_espresso'), array($this, 'txn_registrant_side_meta_box'), $this->_wp_page_slug, 'side', 'high');
618
+		add_meta_box('edit-txn-billing-info-mbox', __('Billing Information', 'event_espresso'), array($this, 'txn_billing_info_side_meta_box'), $this->_wp_page_slug, 'side', 'high');
619 619
 
620 620
 	}
621 621
 
@@ -636,15 +636,15 @@  discard block
 block discarded – undo
636 636
 
637 637
 		//get line table
638 638
 		EEH_Autoloader::register_line_item_display_autoloaders();
639
-		$Line_Item_Display = new EE_Line_Item_Display( 'admin_table', 'EE_Admin_Table_Line_Item_Display_Strategy' );
640
-		$this->_template_args['line_item_table'] = $Line_Item_Display->display_line_item( $this->_transaction->total_line_item() );
639
+		$Line_Item_Display = new EE_Line_Item_Display('admin_table', 'EE_Admin_Table_Line_Item_Display_Strategy');
640
+		$this->_template_args['line_item_table'] = $Line_Item_Display->display_line_item($this->_transaction->total_line_item());
641 641
 		$this->_template_args['REG_code'] = $this->_transaction->get_first_related('Registration')->get('REG_code');
642 642
 
643 643
 		// process taxes
644
-		$taxes = $this->_transaction->get_many_related( 'Line_Item', array( array( 'LIN_type' => EEM_Line_Item::type_tax )));
645
-		$this->_template_args['taxes'] = ! empty( $taxes ) ? $taxes : FALSE;
644
+		$taxes = $this->_transaction->get_many_related('Line_Item', array(array('LIN_type' => EEM_Line_Item::type_tax)));
645
+		$this->_template_args['taxes'] = ! empty($taxes) ? $taxes : FALSE;
646 646
 
647
-		$this->_template_args['grand_total'] = EEH_Template::format_currency($this->_transaction->get('TXN_total'), FALSE, FALSE );
647
+		$this->_template_args['grand_total'] = EEH_Template::format_currency($this->_transaction->get('TXN_total'), FALSE, FALSE);
648 648
 		$this->_template_args['grand_raw_total'] = $this->_transaction->get('TXN_total');
649 649
 		$this->_template_args['TXN_status'] = $this->_transaction->get('STS_ID');
650 650
 
@@ -652,63 +652,63 @@  discard block
 block discarded – undo
652 652
 
653 653
 		// process payment details
654 654
 		$payments = $this->_transaction->get_many_related('Payment');
655
-		if( ! empty(  $payments ) ) {
656
-			$this->_template_args[ 'payments' ] = $payments;
657
-			$this->_template_args[ 'existing_reg_payments' ] = $this->_get_registration_payment_IDs( $payments );
655
+		if ( ! empty($payments)) {
656
+			$this->_template_args['payments'] = $payments;
657
+			$this->_template_args['existing_reg_payments'] = $this->_get_registration_payment_IDs($payments);
658 658
 		} else {
659
-			$this->_template_args[ 'payments' ] = false;
660
-			$this->_template_args[ 'existing_reg_payments' ] = array();
659
+			$this->_template_args['payments'] = false;
660
+			$this->_template_args['existing_reg_payments'] = array();
661 661
 		}
662 662
 
663
-		$this->_template_args['edit_payment_url'] = add_query_arg( array( 'action' => 'edit_payment'  ), TXN_ADMIN_URL );
664
-		$this->_template_args['delete_payment_url'] = add_query_arg( array( 'action' => 'espresso_delete_payment' ), TXN_ADMIN_URL );
663
+		$this->_template_args['edit_payment_url'] = add_query_arg(array('action' => 'edit_payment'), TXN_ADMIN_URL);
664
+		$this->_template_args['delete_payment_url'] = add_query_arg(array('action' => 'espresso_delete_payment'), TXN_ADMIN_URL);
665 665
 
666
-		if ( isset( $txn_details['invoice_number'] )) {
666
+		if (isset($txn_details['invoice_number'])) {
667 667
 			$this->_template_args['txn_details']['invoice_number']['value'] = $this->_template_args['REG_code'];
668
-			$this->_template_args['txn_details']['invoice_number']['label'] = __( 'Invoice Number', 'event_espresso' );
668
+			$this->_template_args['txn_details']['invoice_number']['label'] = __('Invoice Number', 'event_espresso');
669 669
 		}
670 670
 
671 671
 		$this->_template_args['txn_details']['registration_session']['value'] = $this->_transaction->get_first_related('Registration')->get('REG_session');
672
-		$this->_template_args['txn_details']['registration_session']['label'] = __( 'Registration Session', 'event_espresso' );
672
+		$this->_template_args['txn_details']['registration_session']['label'] = __('Registration Session', 'event_espresso');
673 673
 
674
-		$this->_template_args['txn_details']['ip_address']['value'] = isset( $this->_session['ip_address'] ) ? $this->_session['ip_address'] : '';
675
-		$this->_template_args['txn_details']['ip_address']['label'] = __( 'Transaction placed from IP', 'event_espresso' );
674
+		$this->_template_args['txn_details']['ip_address']['value'] = isset($this->_session['ip_address']) ? $this->_session['ip_address'] : '';
675
+		$this->_template_args['txn_details']['ip_address']['label'] = __('Transaction placed from IP', 'event_espresso');
676 676
 
677
-		$this->_template_args['txn_details']['user_agent']['value'] = isset( $this->_session['user_agent'] ) ? $this->_session['user_agent'] : '';
678
-		$this->_template_args['txn_details']['user_agent']['label'] = __( 'Registrant User Agent', 'event_espresso' );
677
+		$this->_template_args['txn_details']['user_agent']['value'] = isset($this->_session['user_agent']) ? $this->_session['user_agent'] : '';
678
+		$this->_template_args['txn_details']['user_agent']['label'] = __('Registrant User Agent', 'event_espresso');
679 679
 
680 680
 		$reg_steps = '<ul>';
681
-		foreach ( $this->_transaction->reg_steps() as $reg_step => $reg_step_status ) {
682
-			if ( $reg_step_status === true ) {
683
-				$reg_steps .= '<li style="color:#70cc50">' . sprintf( __( '%1$s : Completed', 'event_espresso' ), ucwords( str_replace( '_', ' ', $reg_step ) ) ) . '</li>';
684
-			} else if ( is_numeric( $reg_step_status ) && $reg_step_status !== false ) {
685
-					$reg_steps .= '<li style="color:#2EA2CC">' . sprintf(
686
-							__( '%1$s : Initiated %2$s', 'event_espresso' ),
687
-							ucwords( str_replace( '_', ' ', $reg_step ) ),
688
-							gmdate( get_option( 'date_format' ) . ' ' . get_option( 'time_format' ), ( $reg_step_status + ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS ) ) )
689
-						) . '</li>';
681
+		foreach ($this->_transaction->reg_steps() as $reg_step => $reg_step_status) {
682
+			if ($reg_step_status === true) {
683
+				$reg_steps .= '<li style="color:#70cc50">'.sprintf(__('%1$s : Completed', 'event_espresso'), ucwords(str_replace('_', ' ', $reg_step))).'</li>';
684
+			} else if (is_numeric($reg_step_status) && $reg_step_status !== false) {
685
+					$reg_steps .= '<li style="color:#2EA2CC">'.sprintf(
686
+							__('%1$s : Initiated %2$s', 'event_espresso'),
687
+							ucwords(str_replace('_', ' ', $reg_step)),
688
+							gmdate(get_option('date_format').' '.get_option('time_format'), ($reg_step_status + (get_option('gmt_offset') * HOUR_IN_SECONDS)))
689
+						).'</li>';
690 690
 				} else {
691
-				$reg_steps .= '<li style="color:#E76700">' . sprintf( __( '%1$s : Never Initiated', 'event_espresso' ), ucwords( str_replace( '_', ' ', $reg_step ) ) ) . '</li>';
691
+				$reg_steps .= '<li style="color:#E76700">'.sprintf(__('%1$s : Never Initiated', 'event_espresso'), ucwords(str_replace('_', ' ', $reg_step))).'</li>';
692 692
 			}
693 693
 		}
694 694
 		$reg_steps .= '</ul>';
695 695
 		$this->_template_args['txn_details']['reg_steps']['value'] = $reg_steps;
696
-		$this->_template_args['txn_details']['reg_steps']['label'] = __( 'Registration Step Progress', 'event_espresso' );
696
+		$this->_template_args['txn_details']['reg_steps']['label'] = __('Registration Step Progress', 'event_espresso');
697 697
 
698 698
 
699 699
 		$this->_get_registrations_to_apply_payment_to();
700
-		$this->_get_payment_methods( $payments );
700
+		$this->_get_payment_methods($payments);
701 701
 		$this->_get_payment_status_array();
702 702
 		$this->_get_reg_status_selection(); //sets up the template args for the reg status array for the transaction.
703 703
 
704
-		$this->_template_args['transaction_form_url'] = add_query_arg( array( 'action' => 'edit_transaction', 'process' => 'transaction'  ), TXN_ADMIN_URL );
705
-		$this->_template_args['apply_payment_form_url'] = add_query_arg( array( 'page' => 'espresso_transactions', 'action' => 'espresso_apply_payment' ), WP_AJAX_URL );
706
-		$this->_template_args['delete_payment_form_url'] = add_query_arg( array( 'page' => 'espresso_transactions', 'action' => 'espresso_delete_payment' ), WP_AJAX_URL );
704
+		$this->_template_args['transaction_form_url'] = add_query_arg(array('action' => 'edit_transaction', 'process' => 'transaction'), TXN_ADMIN_URL);
705
+		$this->_template_args['apply_payment_form_url'] = add_query_arg(array('page' => 'espresso_transactions', 'action' => 'espresso_apply_payment'), WP_AJAX_URL);
706
+		$this->_template_args['delete_payment_form_url'] = add_query_arg(array('page' => 'espresso_transactions', 'action' => 'espresso_delete_payment'), WP_AJAX_URL);
707 707
 
708 708
 		// 'espresso_delete_payment_nonce'
709 709
 
710
-		$template_path = TXN_TEMPLATE_PATH . 'txn_admin_details_main_meta_box_txn_details.template.php';
711
-		echo EEH_Template::display_template( $template_path, $this->_template_args, TRUE );
710
+		$template_path = TXN_TEMPLATE_PATH.'txn_admin_details_main_meta_box_txn_details.template.php';
711
+		echo EEH_Template::display_template($template_path, $this->_template_args, TRUE);
712 712
 
713 713
 	}
714 714
 
@@ -723,27 +723,27 @@  discard block
 block discarded – undo
723 723
 	 * @param EE_Payment[] $payments
724 724
 	 * @return array
725 725
 	 */
726
-	protected function _get_registration_payment_IDs( $payments = array() ) {
726
+	protected function _get_registration_payment_IDs($payments = array()) {
727 727
 		$existing_reg_payments = array();
728 728
 		// get all reg payments for these payments
729
-		$reg_payments = EEM_Registration_Payment::instance()->get_all( array(
729
+		$reg_payments = EEM_Registration_Payment::instance()->get_all(array(
730 730
 			array(
731 731
 				'PAY_ID' => array(
732 732
 					'IN',
733
-					array_keys( $payments )
733
+					array_keys($payments)
734 734
 				)
735 735
 			)
736
-		) );
737
-		if ( ! empty( $reg_payments ) ) {
738
-			foreach ( $payments as $payment ) {
739
-				if ( ! $payment instanceof EE_Payment ) {
736
+		));
737
+		if ( ! empty($reg_payments)) {
738
+			foreach ($payments as $payment) {
739
+				if ( ! $payment instanceof EE_Payment) {
740 740
 					continue;
741
-				} else if ( ! isset( $existing_reg_payments[ $payment->ID() ] ) ) {
742
-					$existing_reg_payments[ $payment->ID() ] = array();
741
+				} else if ( ! isset($existing_reg_payments[$payment->ID()])) {
742
+					$existing_reg_payments[$payment->ID()] = array();
743 743
 				}
744
-				foreach ( $reg_payments as $reg_payment ) {
745
-					if ( $reg_payment instanceof EE_Registration_Payment && $reg_payment->payment_ID() === $payment->ID() ) {
746
-						$existing_reg_payments[ $payment->ID() ][ ] = $reg_payment->registration_ID();
744
+				foreach ($reg_payments as $reg_payment) {
745
+					if ($reg_payment instanceof EE_Registration_Payment && $reg_payment->payment_ID() === $payment->ID()) {
746
+						$existing_reg_payments[$payment->ID()][] = $reg_payment->registration_ID();
747 747
 					}
748 748
 				}
749 749
 			}
@@ -780,39 +780,39 @@  discard block
 block discarded – undo
780 780
 		$registrations_to_apply_payment_to .= '<br /><div class="admin-primary-mbox-tbl-wrap">';
781 781
 		$registrations_to_apply_payment_to .= '<table class="admin-primary-mbox-tbl">';
782 782
 		$registrations_to_apply_payment_to .= '<thead><tr>';
783
-		$registrations_to_apply_payment_to .= '<td>' . __( 'ID', 'event_espresso' ) . '</td>';
784
-		$registrations_to_apply_payment_to .= '<td>' . __( 'Registrant', 'event_espresso' ) . '</td>';
785
-		$registrations_to_apply_payment_to .= '<td>' . __( 'Ticket', 'event_espresso' ) . '</td>';
786
-		$registrations_to_apply_payment_to .= '<td>' . __( 'Event', 'event_espresso' ) . '</td>';
787
-		$registrations_to_apply_payment_to .= '<td class="txn-admin-payment-paid-td jst-cntr">' . __( 'Paid', 'event_espresso' ) . '</td>';
788
-		$registrations_to_apply_payment_to .= '<td class="txn-admin-payment-owing-td jst-cntr">' . __( 'Owing', 'event_espresso' ) . '</td>';
789
-		$registrations_to_apply_payment_to .= '<td class="jst-cntr">' . __( 'Apply', 'event_espresso' ) . '</td>';
783
+		$registrations_to_apply_payment_to .= '<td>'.__('ID', 'event_espresso').'</td>';
784
+		$registrations_to_apply_payment_to .= '<td>'.__('Registrant', 'event_espresso').'</td>';
785
+		$registrations_to_apply_payment_to .= '<td>'.__('Ticket', 'event_espresso').'</td>';
786
+		$registrations_to_apply_payment_to .= '<td>'.__('Event', 'event_espresso').'</td>';
787
+		$registrations_to_apply_payment_to .= '<td class="txn-admin-payment-paid-td jst-cntr">'.__('Paid', 'event_espresso').'</td>';
788
+		$registrations_to_apply_payment_to .= '<td class="txn-admin-payment-owing-td jst-cntr">'.__('Owing', 'event_espresso').'</td>';
789
+		$registrations_to_apply_payment_to .= '<td class="jst-cntr">'.__('Apply', 'event_espresso').'</td>';
790 790
 		$registrations_to_apply_payment_to .= '</tr></thead><tbody>';
791 791
 		// get registrations for TXN
792
-		$registrations = $this->_transaction->registrations( $query_params );
793
-		foreach ( $registrations as $registration ) {
794
-			if ( $registration instanceof EE_Registration ) {
792
+		$registrations = $this->_transaction->registrations($query_params);
793
+		foreach ($registrations as $registration) {
794
+			if ($registration instanceof EE_Registration) {
795 795
 				$owing = $registration->final_price() - $registration->paid();
796
-				$taxable = $registration->ticket()->taxable() ? ' <span class="smaller-text lt-grey-text"> ' . __( '+ tax', 'event_espresso' ) . '</span>' : '';
797
-				$checked = empty( $existing_reg_payments ) || in_array( $registration->ID(), $existing_reg_payments ) ? ' checked="checked"' : '';
798
-				$registrations_to_apply_payment_to .= '<tr id="apply-payment-registration-row-' . $registration->ID() . '">';
796
+				$taxable = $registration->ticket()->taxable() ? ' <span class="smaller-text lt-grey-text"> '.__('+ tax', 'event_espresso').'</span>' : '';
797
+				$checked = empty($existing_reg_payments) || in_array($registration->ID(), $existing_reg_payments) ? ' checked="checked"' : '';
798
+				$registrations_to_apply_payment_to .= '<tr id="apply-payment-registration-row-'.$registration->ID().'">';
799 799
 				// add html for checkbox input and label
800
-				$registrations_to_apply_payment_to .= '<td>' . $registration->ID() . '</td>';
801
-				$registrations_to_apply_payment_to .= '<td>' . $registration->attendee()->full_name() . '</td>';
802
-				$registrations_to_apply_payment_to .= '<td>' . $registration->ticket()->name() . ' : ' . $registration->ticket()->pretty_price() . $taxable . '</td>';
803
-				$registrations_to_apply_payment_to .= '<td>' . $registration->event_name() . '</td>';
804
-				$registrations_to_apply_payment_to .= '<td class="txn-admin-payment-paid-td jst-rght">' . $registration->pretty_paid() . '</td>';
805
-				$registrations_to_apply_payment_to .= '<td class="txn-admin-payment-owing-td jst-rght">' . EEH_Template::format_currency( $owing ) . '</td>';
800
+				$registrations_to_apply_payment_to .= '<td>'.$registration->ID().'</td>';
801
+				$registrations_to_apply_payment_to .= '<td>'.$registration->attendee()->full_name().'</td>';
802
+				$registrations_to_apply_payment_to .= '<td>'.$registration->ticket()->name().' : '.$registration->ticket()->pretty_price().$taxable.'</td>';
803
+				$registrations_to_apply_payment_to .= '<td>'.$registration->event_name().'</td>';
804
+				$registrations_to_apply_payment_to .= '<td class="txn-admin-payment-paid-td jst-rght">'.$registration->pretty_paid().'</td>';
805
+				$registrations_to_apply_payment_to .= '<td class="txn-admin-payment-owing-td jst-rght">'.EEH_Template::format_currency($owing).'</td>';
806 806
 				$registrations_to_apply_payment_to .= '<td class="jst-cntr">';
807 807
 				$disabled = $registration->final_price() > 0 ? '' : ' disabled';
808
-				$registrations_to_apply_payment_to .= '<input type="checkbox" value="' . $registration->ID() . '" name="txn_admin_payment[registrations]"' . $checked . $disabled . '>';
808
+				$registrations_to_apply_payment_to .= '<input type="checkbox" value="'.$registration->ID().'" name="txn_admin_payment[registrations]"'.$checked.$disabled.'>';
809 809
 				$registrations_to_apply_payment_to .= '</td>';
810 810
 				$registrations_to_apply_payment_to .= '</tr>';
811 811
 			}
812 812
 		}
813 813
 		$registrations_to_apply_payment_to .= '</tbody></table></div>';
814
-		$registrations_to_apply_payment_to .= '<p class="clear description">' . __( 'The payment will only be applied to the registrations that have a check mark in their corresponding check box. Checkboxes for free registrations have been disabled.', 'event_espresso' ) . '</p></div>';
815
-		$this->_template_args[ 'registrations_to_apply_payment_to' ] = $registrations_to_apply_payment_to;
814
+		$registrations_to_apply_payment_to .= '<p class="clear description">'.__('The payment will only be applied to the registrations that have a check mark in their corresponding check box. Checkboxes for free registrations have been disabled.', 'event_espresso').'</p></div>';
815
+		$this->_template_args['registrations_to_apply_payment_to'] = $registrations_to_apply_payment_to;
816 816
 	}
817 817
 
818 818
 
@@ -829,9 +829,9 @@  discard block
 block discarded – undo
829 829
 		$statuses = EEM_Registration::reg_status_array(array(), TRUE);
830 830
 		//let's add a "don't change" option.
831 831
 		$status_array['NAN'] = __('Leave the Same', 'event_espresso');
832
-		$status_array = array_merge( $status_array, $statuses );
833
-		$this->_template_args['status_change_select'] = EEH_Form_Fields::select_input( 'txn_reg_status_change[reg_status]', $status_array, 'NAN', 'id="txn-admin-payment-reg-status-inp"', 'txn-reg-status-change-reg-status' );
834
-		$this->_template_args['delete_status_change_select'] = EEH_Form_Fields::select_input( 'delete_txn_reg_status_change[reg_status]', $status_array, 'NAN', 'delete-txn-admin-payment-reg-status-inp', 'delete-txn-reg-status-change-reg-status' );
832
+		$status_array = array_merge($status_array, $statuses);
833
+		$this->_template_args['status_change_select'] = EEH_Form_Fields::select_input('txn_reg_status_change[reg_status]', $status_array, 'NAN', 'id="txn-admin-payment-reg-status-inp"', 'txn-reg-status-change-reg-status');
834
+		$this->_template_args['delete_status_change_select'] = EEH_Form_Fields::select_input('delete_txn_reg_status_change[reg_status]', $status_array, 'NAN', 'delete-txn-admin-payment-reg-status-inp', 'delete-txn-reg-status-change-reg-status');
835 835
 
836 836
 	}
837 837
 
@@ -846,21 +846,21 @@  discard block
 block discarded – undo
846 846
 	 * @param EE_Payment[] to show on this page
847 847
 	 *	@return void
848 848
 	 */
849
-	private function _get_payment_methods( $payments = array() ) {
849
+	private function _get_payment_methods($payments = array()) {
850 850
 		$payment_methods_of_payments = array();
851
-		foreach( $payments as $payment ){
852
-			if( $payment instanceof EE_Payment ){
853
-				$payment_methods_of_payments[] = $payment->get( 'PMD_ID' );
851
+		foreach ($payments as $payment) {
852
+			if ($payment instanceof EE_Payment) {
853
+				$payment_methods_of_payments[] = $payment->get('PMD_ID');
854 854
 			}
855 855
 		}
856
-		if( $payment_methods_of_payments ){
857
-			$query_args = array( array( 'OR*payment_method_for_payment' => array(
858
-					'PMD_ID' => array( 'IN', $payment_methods_of_payments ),
859
-					'PMD_scope' => array( 'LIKE', '%' . EEM_Payment_Method::scope_admin . '%' ) ) ) );
860
-		}else{
861
-			$query_args = array( array( 'PMD_scope' => array( 'LIKE', '%' . EEM_Payment_Method::scope_admin . '%' ) ) );
856
+		if ($payment_methods_of_payments) {
857
+			$query_args = array(array('OR*payment_method_for_payment' => array(
858
+					'PMD_ID' => array('IN', $payment_methods_of_payments),
859
+					'PMD_scope' => array('LIKE', '%'.EEM_Payment_Method::scope_admin.'%') )));
860
+		} else {
861
+			$query_args = array(array('PMD_scope' => array('LIKE', '%'.EEM_Payment_Method::scope_admin.'%')));
862 862
 		}
863
-		$this->_template_args['payment_methods'] = EEM_Payment_Method::instance()->get_all( $query_args );
863
+		$this->_template_args['payment_methods'] = EEM_Payment_Method::instance()->get_all($query_args);
864 864
 	}
865 865
 
866 866
 
@@ -874,46 +874,46 @@  discard block
 block discarded – undo
874 874
 	 * @param array $metabox
875 875
 	 * @return void
876 876
 	 */
877
-	public function txn_attendees_meta_box( $post, $metabox = array( 'args' => array() )) {
877
+	public function txn_attendees_meta_box($post, $metabox = array('args' => array())) {
878 878
 
879
-		extract( $metabox['args'] );
879
+		extract($metabox['args']);
880 880
 		$this->_template_args['post'] = $post;
881 881
 		$this->_template_args['event_attendees'] = array();
882 882
 		// process items in cart
883
-		$line_items = $this->_transaction->get_many_related('Line_Item', array( array( 'LIN_type' => 'line-item' ) ) );
884
-		if ( ! empty( $line_items )) {
885
-			foreach ( $line_items as $item ) {
886
-				if ( $item instanceof EE_Line_Item ) {
887
-					switch( $item->OBJ_type() ) {
883
+		$line_items = $this->_transaction->get_many_related('Line_Item', array(array('LIN_type' => 'line-item')));
884
+		if ( ! empty($line_items)) {
885
+			foreach ($line_items as $item) {
886
+				if ($item instanceof EE_Line_Item) {
887
+					switch ($item->OBJ_type()) {
888 888
 
889 889
 						case 'Event' :
890 890
 							break;
891 891
 
892 892
 						case 'Ticket' :
893 893
 							$ticket = $item->ticket();
894
-							if ( empty( $ticket )) {
894
+							if (empty($ticket)) {
895 895
 								continue; //right now we're only handling tickets here.  Cause its expected that only tickets will have attendees right?
896 896
 							}
897
-							$ticket_price = EEH_Template::format_currency( $item->get( 'LIN_unit_price' ));
897
+							$ticket_price = EEH_Template::format_currency($item->get('LIN_unit_price'));
898 898
 							$event = $ticket->get_first_related('Registration')->get_first_related('Event');
899
-							$event_name = $event instanceof EE_Event ? $event->get('EVT_name') . ' - ' . $item->get('LIN_name') : '';
899
+							$event_name = $event instanceof EE_Event ? $event->get('EVT_name').' - '.$item->get('LIN_name') : '';
900 900
 
901
-							$registrations = $ticket->get_many_related('Registration', array( array('TXN_ID' => $this->_transaction->ID() )));
902
-							foreach( $registrations as $registration ) {
903
-								$this->_template_args['event_attendees'][$registration->ID()]['att_num'] 						= $registration->get('REG_count');
904
-								$this->_template_args['event_attendees'][$registration->ID()]['event_ticket_name'] 	= $event_name;
905
-								$this->_template_args['event_attendees'][$registration->ID()]['ticket_price'] 				= $ticket_price;
901
+							$registrations = $ticket->get_many_related('Registration', array(array('TXN_ID' => $this->_transaction->ID())));
902
+							foreach ($registrations as $registration) {
903
+								$this->_template_args['event_attendees'][$registration->ID()]['att_num'] = $registration->get('REG_count');
904
+								$this->_template_args['event_attendees'][$registration->ID()]['event_ticket_name'] = $event_name;
905
+								$this->_template_args['event_attendees'][$registration->ID()]['ticket_price'] = $ticket_price;
906 906
 								// attendee info
907 907
 								$attendee = $registration->get_first_related('Attendee');
908
-								if ( $attendee instanceof EE_Attendee ) {
908
+								if ($attendee instanceof EE_Attendee) {
909 909
 									$this->_template_args['event_attendees'][$registration->ID()]['att_id'] 			= $attendee->ID();
910 910
 									$this->_template_args['event_attendees'][$registration->ID()]['attendee'] 	= $attendee->full_name();
911
-									$this->_template_args['event_attendees'][$registration->ID()]['email'] 			= '<a href="mailto:' . $attendee->email() . '?subject=' . $event->get('EVT_name') . __(' Event', 'event_espresso') . '">' . $attendee->email() . '</a>';
912
-									$this->_template_args['event_attendees'][$registration->ID()]['address'] 		=  implode(',<br>', $attendee->full_address_as_array() );
911
+									$this->_template_args['event_attendees'][$registration->ID()]['email'] = '<a href="mailto:'.$attendee->email().'?subject='.$event->get('EVT_name').__(' Event', 'event_espresso').'">'.$attendee->email().'</a>';
912
+									$this->_template_args['event_attendees'][$registration->ID()]['address'] 		= implode(',<br>', $attendee->full_address_as_array());
913 913
 								} else {
914 914
 									$this->_template_args['event_attendees'][$registration->ID()]['att_id'] 			= '';
915 915
 									$this->_template_args['event_attendees'][$registration->ID()]['attendee'] 	= '';
916
-									$this->_template_args['event_attendees'][$registration->ID()]['email'] 			= '';
916
+									$this->_template_args['event_attendees'][$registration->ID()]['email'] = '';
917 917
 									$this->_template_args['event_attendees'][$registration->ID()]['address'] 		= '';
918 918
 								}
919 919
 							}
@@ -923,12 +923,12 @@  discard block
 block discarded – undo
923 923
 				}
924 924
 			}
925 925
 
926
-			$this->_template_args['transaction_form_url'] = add_query_arg( array( 'action' => 'edit_transaction', 'process' => 'attendees'  ), TXN_ADMIN_URL );
927
-			echo EEH_Template::display_template( TXN_TEMPLATE_PATH . 'txn_admin_details_main_meta_box_attendees.template.php', $this->_template_args, TRUE );
926
+			$this->_template_args['transaction_form_url'] = add_query_arg(array('action' => 'edit_transaction', 'process' => 'attendees'), TXN_ADMIN_URL);
927
+			echo EEH_Template::display_template(TXN_TEMPLATE_PATH.'txn_admin_details_main_meta_box_attendees.template.php', $this->_template_args, TRUE);
928 928
 
929 929
 		} else {
930 930
 			echo sprintf(
931
-				__( '%1$sFor some reason, there are no attendees registered for this transaction. Likely the registration was abandoned in process.%2$s', 'event_espresso' ),
931
+				__('%1$sFor some reason, there are no attendees registered for this transaction. Likely the registration was abandoned in process.%2$s', 'event_espresso'),
932 932
 				'<p class="important-notice">',
933 933
 				'</p>'
934 934
 			);
@@ -947,20 +947,20 @@  discard block
 block discarded – undo
947 947
 	 */
948 948
 	public function txn_registrant_side_meta_box() {
949 949
 		$primary_att = $this->_transaction->primary_registration() instanceof EE_Registration ? $this->_transaction->primary_registration()->get_first_related('Attendee') : null;
950
-		if ( ! $primary_att instanceof EE_Attendee ) {
950
+		if ( ! $primary_att instanceof EE_Attendee) {
951 951
 			$this->_template_args['no_attendee_message'] = __('There is no attached contact for this transaction.  The transaction either failed due to an error or was abandoned.', 'event_espresso');
952 952
 			$primary_att = EEM_Attendee::instance()->create_default_object();
953 953
 		}
954
-		$this->_template_args['ATT_ID'] 						= $primary_att->ID();
954
+		$this->_template_args['ATT_ID'] = $primary_att->ID();
955 955
 		$this->_template_args['prime_reg_fname']		= $primary_att->fname();
956 956
 		$this->_template_args['prime_reg_lname']		= $primary_att->lname();
957
-		$this->_template_args['prime_reg_email'] 		= $primary_att->email();
957
+		$this->_template_args['prime_reg_email'] = $primary_att->email();
958 958
 		$this->_template_args['prime_reg_phone'] 	= $primary_att->phone();
959
-		$this->_template_args['edit_attendee_url'] 	= EE_Admin_Page::add_query_args_and_nonce( array( 'action' => 'edit_attendee', 'post' => $primary_att->ID()  ), REG_ADMIN_URL );
959
+		$this->_template_args['edit_attendee_url'] = EE_Admin_Page::add_query_args_and_nonce(array('action' => 'edit_attendee', 'post' => $primary_att->ID()), REG_ADMIN_URL);
960 960
 		// get formatted address for registrant
961
-		EE_Registry::instance()->load_helper( 'Formatter' );
962
-		$this->_template_args[ 'formatted_address' ] = EEH_Address::format( $primary_att );
963
-		echo EEH_Template::display_template( TXN_TEMPLATE_PATH . 'txn_admin_details_side_meta_box_registrant.template.php', $this->_template_args, TRUE );
961
+		EE_Registry::instance()->load_helper('Formatter');
962
+		$this->_template_args['formatted_address'] = EEH_Address::format($primary_att);
963
+		echo EEH_Template::display_template(TXN_TEMPLATE_PATH.'txn_admin_details_side_meta_box_registrant.template.php', $this->_template_args, TRUE);
964 964
 	}
965 965
 
966 966
 
@@ -976,12 +976,12 @@  discard block
 block discarded – undo
976 976
 
977 977
 		$this->_template_args['billing_form'] = $this->_transaction->billing_info();
978 978
 		$this->_template_args['billing_form_url'] = add_query_arg(
979
-			array( 'action' => 'edit_transaction', 'process' => 'billing'  ),
979
+			array('action' => 'edit_transaction', 'process' => 'billing'),
980 980
 			TXN_ADMIN_URL
981 981
 		);
982 982
 
983
-		$template_path = TXN_TEMPLATE_PATH . 'txn_admin_details_side_meta_box_billing_info.template.php';
984
-		echo EEH_Template::display_template( $template_path, $this->_template_args, TRUE );/**/
983
+		$template_path = TXN_TEMPLATE_PATH.'txn_admin_details_side_meta_box_billing_info.template.php';
984
+		echo EEH_Template::display_template($template_path, $this->_template_args, TRUE); /**/
985 985
 	}
986 986
 
987 987
 
@@ -994,42 +994,42 @@  discard block
 block discarded – undo
994 994
 	*	@return void
995 995
 	*/
996 996
 	public function apply_payments_or_refunds() {
997
-		$json_response_data = array( 'return_data' => FALSE );
997
+		$json_response_data = array('return_data' => FALSE);
998 998
 		$valid_data = $this->_validate_payment_request_data();
999
-		if ( ! empty( $valid_data ) ) {
1000
-			$PAY_ID = $valid_data[ 'PAY_ID' ];
999
+		if ( ! empty($valid_data)) {
1000
+			$PAY_ID = $valid_data['PAY_ID'];
1001 1001
 			//save  the new payment
1002
-			$payment = $this->_create_payment_from_request_data( $valid_data );
1002
+			$payment = $this->_create_payment_from_request_data($valid_data);
1003 1003
 			// get the TXN for this payment
1004 1004
 			$transaction = $payment->transaction();
1005 1005
 			// verify transaction
1006
-			if ( $transaction instanceof EE_Transaction ) {
1006
+			if ($transaction instanceof EE_Transaction) {
1007 1007
 				// calculate_total_payments_and_update_status
1008
-				$this->_process_transaction_payments( $transaction );
1009
-				$REG_IDs = $this->_get_REG_IDs_to_apply_payment_to( $payment );
1010
-				$this->_remove_existing_registration_payments( $payment, $PAY_ID );
1008
+				$this->_process_transaction_payments($transaction);
1009
+				$REG_IDs = $this->_get_REG_IDs_to_apply_payment_to($payment);
1010
+				$this->_remove_existing_registration_payments($payment, $PAY_ID);
1011 1011
 				// apply payment to registrations (if applicable)
1012
-				if ( ! empty( $REG_IDs ) ) {
1013
-					$this->_update_registration_payments( $transaction, $payment, $REG_IDs );
1012
+				if ( ! empty($REG_IDs)) {
1013
+					$this->_update_registration_payments($transaction, $payment, $REG_IDs);
1014 1014
 					// now process status changes for the same registrations
1015
-					if ( isset( $this->_req_data['txn_reg_status_change'] ) ) {
1016
-						$this->_process_registration_status_change( $transaction, array( $REG_IDs ) );
1015
+					if (isset($this->_req_data['txn_reg_status_change'])) {
1016
+						$this->_process_registration_status_change($transaction, array($REG_IDs));
1017 1017
 					}
1018 1018
 				}
1019
-				$this->_process_payment_notification( $payment );
1019
+				$this->_process_payment_notification($payment);
1020 1020
 				//prepare to render page
1021
-				$json_response_data[ 'return_data' ] = $this->_build_payment_json_response( $payment, $REG_IDs );
1021
+				$json_response_data['return_data'] = $this->_build_payment_json_response($payment, $REG_IDs);
1022 1022
 			} else {
1023 1023
 				EE_Error::add_error(
1024
-					__( 'A valid Transaction for this payment could not be retrieved.', 'event_espresso' ),
1024
+					__('A valid Transaction for this payment could not be retrieved.', 'event_espresso'),
1025 1025
 					__FILE__, __FUNCTION__, __LINE__
1026 1026
 				);
1027 1027
 			}
1028 1028
 		} else {
1029
-			EE_Error::add_error( __( 'The payment form data could not be loaded.', 'event_espresso' ), __FILE__, __FUNCTION__, __LINE__ );
1029
+			EE_Error::add_error(__('The payment form data could not be loaded.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
1030 1030
 		}
1031
-		$notices = EE_Error::get_notices( FALSE, FALSE, FALSE );
1032
-		echo json_encode( array_merge( $json_response_data, $notices ));
1031
+		$notices = EE_Error::get_notices(FALSE, FALSE, FALSE);
1032
+		echo json_encode(array_merge($json_response_data, $notices));
1033 1033
 		die();
1034 1034
 	}
1035 1035
 
@@ -1041,30 +1041,30 @@  discard block
 block discarded – undo
1041 1041
 	 * @return array
1042 1042
 	 */
1043 1043
 	protected function _validate_payment_request_data() {
1044
-		if ( ! isset( $this->_req_data[ 'txn_admin_payment' ] ) ) {
1044
+		if ( ! isset($this->_req_data['txn_admin_payment'])) {
1045 1045
 			return false;
1046 1046
 		}
1047 1047
 		$payment_form = $this->_generate_payment_form_section();
1048 1048
 		try {
1049
-			if ( $payment_form->was_submitted() ) {
1049
+			if ($payment_form->was_submitted()) {
1050 1050
 				$payment_form->receive_form_submission();
1051
-				if ( ! $payment_form->is_valid() ) {
1051
+				if ( ! $payment_form->is_valid()) {
1052 1052
 					$submission_error_messages = array();
1053
-					foreach ( $payment_form->get_validation_errors_accumulated() as $validation_error ) {
1054
-						if ( $validation_error instanceof EE_Validation_Error ) {
1053
+					foreach ($payment_form->get_validation_errors_accumulated() as $validation_error) {
1054
+						if ($validation_error instanceof EE_Validation_Error) {
1055 1055
 							$submission_error_messages[] = sprintf(
1056
-								_x( '%s : %s', 'Form Section Name : Form Validation Error', 'event_espresso' ),
1056
+								_x('%s : %s', 'Form Section Name : Form Validation Error', 'event_espresso'),
1057 1057
 								$validation_error->get_form_section()->html_label_text(),
1058 1058
 								$validation_error->getMessage()
1059 1059
 							);
1060 1060
 						}
1061 1061
 					}
1062
-					EE_Error::add_error( join( '<br />', $submission_error_messages ), __FILE__, __FUNCTION__, __LINE__ );
1062
+					EE_Error::add_error(join('<br />', $submission_error_messages), __FILE__, __FUNCTION__, __LINE__);
1063 1063
 					return array();
1064 1064
 				}
1065 1065
 			}
1066
-		} catch ( EE_Error $e ) {
1067
-			EE_Error::add_error( $e->getMessage(), __FILE__, __FUNCTION__, __LINE__ );
1066
+		} catch (EE_Error $e) {
1067
+			EE_Error::add_error($e->getMessage(), __FILE__, __FUNCTION__, __LINE__);
1068 1068
 			return array();
1069 1069
 		}
1070 1070
 		return $payment_form->valid_data();
@@ -1086,75 +1086,75 @@  discard block
 block discarded – undo
1086 1086
 						array(
1087 1087
 							'default' => 0,
1088 1088
 							'required' => false,
1089
-							'html_label_text' => __( 'Payment ID', 'event_espresso' ),
1090
-							'validation_strategies' => array( new EE_Int_Normalization() )
1089
+							'html_label_text' => __('Payment ID', 'event_espresso'),
1090
+							'validation_strategies' => array(new EE_Int_Normalization())
1091 1091
 						)
1092 1092
 					),
1093 1093
 					'TXN_ID' => new EE_Text_Input(
1094 1094
 						array(
1095 1095
 							'default' => 0,
1096 1096
 							'required' => true,
1097
-							'html_label_text' => __( 'Transaction ID', 'event_espresso' ),
1098
-							'validation_strategies' => array( new EE_Int_Normalization() )
1097
+							'html_label_text' => __('Transaction ID', 'event_espresso'),
1098
+							'validation_strategies' => array(new EE_Int_Normalization())
1099 1099
 						)
1100 1100
 					),
1101 1101
 					'type' => new EE_Text_Input(
1102 1102
 						array(
1103 1103
 							'default' => 1,
1104 1104
 							'required' => true,
1105
-							'html_label_text' => __( 'Payment or Refund', 'event_espresso' ),
1106
-							'validation_strategies' => array( new EE_Int_Normalization() )
1105
+							'html_label_text' => __('Payment or Refund', 'event_espresso'),
1106
+							'validation_strategies' => array(new EE_Int_Normalization())
1107 1107
 						)
1108 1108
 					),
1109 1109
 					'amount' => new EE_Text_Input(
1110 1110
 						array(
1111 1111
 							'default' => 0,
1112 1112
 							'required' => true,
1113
-							'html_label_text' => __( 'Payment amount', 'event_espresso' ),
1114
-							'validation_strategies' => array( new EE_Float_Normalization() )
1113
+							'html_label_text' => __('Payment amount', 'event_espresso'),
1114
+							'validation_strategies' => array(new EE_Float_Normalization())
1115 1115
 						)
1116 1116
 					),
1117 1117
 					'status' => new EE_Text_Input(
1118 1118
 						array(
1119 1119
 							'default' => EEM_Payment::status_id_approved,
1120 1120
 							'required' => true,
1121
-							'html_label_text' => __( 'Payment status', 'event_espresso' ),
1121
+							'html_label_text' => __('Payment status', 'event_espresso'),
1122 1122
 						)
1123 1123
 					),
1124 1124
 					'PMD_ID' => new EE_Text_Input(
1125 1125
 						array(
1126 1126
 							'default' => 2,
1127 1127
 							'required' => true,
1128
-							'html_label_text' => __( 'Payment Method', 'event_espresso' ),
1129
-							'validation_strategies' => array( new EE_Int_Normalization() )
1128
+							'html_label_text' => __('Payment Method', 'event_espresso'),
1129
+							'validation_strategies' => array(new EE_Int_Normalization())
1130 1130
 						)
1131 1131
 					),
1132 1132
 					'date' => new EE_Text_Input(
1133 1133
 						array(
1134 1134
 							'default' => time(),
1135 1135
 							'required' => true,
1136
-							'html_label_text' => __( 'Payment date', 'event_espresso' ),
1136
+							'html_label_text' => __('Payment date', 'event_espresso'),
1137 1137
 						)
1138 1138
 					),
1139 1139
 					'txn_id_chq_nmbr' => new EE_Text_Input(
1140 1140
 						array(
1141 1141
 							'default' => '',
1142 1142
 							'required' => false,
1143
-							'html_label_text' => __( 'Transaction or Cheque Number', 'event_espresso' ),
1143
+							'html_label_text' => __('Transaction or Cheque Number', 'event_espresso'),
1144 1144
 						)
1145 1145
 					),
1146 1146
 					'po_number' => new EE_Text_Input(
1147 1147
 						array(
1148 1148
 							'default' => '',
1149 1149
 							'required' => false,
1150
-							'html_label_text' => __( 'Purchase Order Number', 'event_espresso' ),
1150
+							'html_label_text' => __('Purchase Order Number', 'event_espresso'),
1151 1151
 						)
1152 1152
 					),
1153 1153
 					'accounting' => new EE_Text_Input(
1154 1154
 						array(
1155 1155
 							'default' => '',
1156 1156
 							'required' => false,
1157
-							'html_label_text' => __( 'Extra Field for Accounting', 'event_espresso' ),
1157
+							'html_label_text' => __('Extra Field for Accounting', 'event_espresso'),
1158 1158
 						)
1159 1159
 					),
1160 1160
 				)
@@ -1170,34 +1170,34 @@  discard block
 block discarded – undo
1170 1170
 	 * @param array $valid_data
1171 1171
 	 * @return EE_Payment
1172 1172
 	 */
1173
-	protected function _create_payment_from_request_data( $valid_data ) {
1174
-		$PAY_ID = $valid_data[ 'PAY_ID' ];
1173
+	protected function _create_payment_from_request_data($valid_data) {
1174
+		$PAY_ID = $valid_data['PAY_ID'];
1175 1175
 		// get payment amount
1176
-		$amount = $valid_data[ 'amount' ] ? abs( $valid_data[ 'amount' ] ) : 0;
1176
+		$amount = $valid_data['amount'] ? abs($valid_data['amount']) : 0;
1177 1177
 		// payments have a type value of 1 and refunds have a type value of -1
1178 1178
 		// so multiplying amount by type will give a positive value for payments, and negative values for refunds
1179
-		$amount = $valid_data[ 'type' ] < 0 ? $amount * -1 : $amount;
1179
+		$amount = $valid_data['type'] < 0 ? $amount * -1 : $amount;
1180 1180
 		$payment = EE_Payment::new_instance(
1181 1181
 			array(
1182
-				'TXN_ID' 								=> $valid_data[ 'TXN_ID' ],
1183
-				'STS_ID' 								=> $valid_data[ 'status' ],
1184
-				'PAY_timestamp' 				=> $valid_data[ 'date' ],
1182
+				'TXN_ID' 								=> $valid_data['TXN_ID'],
1183
+				'STS_ID' 								=> $valid_data['status'],
1184
+				'PAY_timestamp' 				=> $valid_data['date'],
1185 1185
 				'PAY_source'           			=> EEM_Payment_Method::scope_admin,
1186
-				'PMD_ID'               				=> $valid_data[ 'PMD_ID' ],
1186
+				'PMD_ID'               				=> $valid_data['PMD_ID'],
1187 1187
 				'PAY_amount'           			=> $amount,
1188
-				'PAY_txn_id_chq_nmbr'  	=> $valid_data[ 'txn_id_chq_nmbr' ],
1189
-				'PAY_po_number'        		=> $valid_data[ 'po_number' ],
1190
-				'PAY_extra_accntng'    		=> $valid_data[ 'accounting' ],
1188
+				'PAY_txn_id_chq_nmbr'  	=> $valid_data['txn_id_chq_nmbr'],
1189
+				'PAY_po_number'        		=> $valid_data['po_number'],
1190
+				'PAY_extra_accntng'    		=> $valid_data['accounting'],
1191 1191
 				'PAY_details'          				=> $valid_data,
1192 1192
 				'PAY_ID'               				=> $PAY_ID
1193 1193
 			),
1194 1194
 			'',
1195
-			array( 'Y-m-d', 'H:i a' )
1195
+			array('Y-m-d', 'H:i a')
1196 1196
 		);
1197
-		if ( ! $payment->save() ) {
1197
+		if ( ! $payment->save()) {
1198 1198
 			EE_Error::add_error(
1199 1199
 				sprintf(
1200
-					__( 'Payment %1$d has not been successfully saved to the database.', 'event_espresso' ),
1200
+					__('Payment %1$d has not been successfully saved to the database.', 'event_espresso'),
1201 1201
 					$payment->ID()
1202 1202
 				),
1203 1203
 				__FILE__, __FUNCTION__, __LINE__
@@ -1214,15 +1214,15 @@  discard block
 block discarded – undo
1214 1214
 	 * @param \EE_Transaction $transaction
1215 1215
 	 * @return array
1216 1216
 	 */
1217
-	protected function _process_transaction_payments( EE_Transaction $transaction ) {
1217
+	protected function _process_transaction_payments(EE_Transaction $transaction) {
1218 1218
 		/** @type EE_Transaction_Payments $transaction_payments */
1219
-		$transaction_payments = EE_Registry::instance()->load_class( 'Transaction_Payments' );
1219
+		$transaction_payments = EE_Registry::instance()->load_class('Transaction_Payments');
1220 1220
 		//update the transaction with this payment
1221
-		if ( $transaction_payments->calculate_total_payments_and_update_status( $transaction ) ) {
1222
-			EE_Error::add_success( __( 'The payment has been processed successfully.', 'event_espresso' ), __FILE__, __FUNCTION__, __LINE__ );
1221
+		if ($transaction_payments->calculate_total_payments_and_update_status($transaction)) {
1222
+			EE_Error::add_success(__('The payment has been processed successfully.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
1223 1223
 		} else {
1224 1224
 			EE_Error::add_error(
1225
-				__( 'The payment was processed successfully but the amount paid for the transaction was not updated.', 'event_espresso' )
1225
+				__('The payment was processed successfully but the amount paid for the transaction was not updated.', 'event_espresso')
1226 1226
 				, __FILE__, __FUNCTION__, __LINE__
1227 1227
 			);
1228 1228
 		}
@@ -1238,19 +1238,19 @@  discard block
 block discarded – undo
1238 1238
 	 * @param \EE_Payment $payment
1239 1239
 	 * @return array
1240 1240
 	 */
1241
-	protected function _get_REG_IDs_to_apply_payment_to( EE_Payment $payment ) {
1241
+	protected function _get_REG_IDs_to_apply_payment_to(EE_Payment $payment) {
1242 1242
 		$REG_IDs = array();
1243 1243
 		// grab array of IDs for specific registrations to apply changes to
1244
-		if ( isset( $this->_req_data[ 'txn_admin_payment' ][ 'registrations' ] ) ) {
1245
-			$REG_IDs = (array)$this->_req_data[ 'txn_admin_payment' ][ 'registrations' ];
1244
+		if (isset($this->_req_data['txn_admin_payment']['registrations'])) {
1245
+			$REG_IDs = (array) $this->_req_data['txn_admin_payment']['registrations'];
1246 1246
 		}
1247 1247
 		//nothing specified ? then get all reg IDs
1248
-		if ( empty( $REG_IDs ) ) {
1248
+		if (empty($REG_IDs)) {
1249 1249
 			$registrations = $payment->transaction()->registrations();
1250
-			$REG_IDs = ! empty( $registrations ) ? array_keys( $registrations ) : $this->_get_existing_reg_payment_REG_IDs( $payment );
1250
+			$REG_IDs = ! empty($registrations) ? array_keys($registrations) : $this->_get_existing_reg_payment_REG_IDs($payment);
1251 1251
 		}
1252 1252
 		// ensure that REG_IDs are integers and NOT strings
1253
-		return array_map( 'intval', $REG_IDs );
1253
+		return array_map('intval', $REG_IDs);
1254 1254
 	}
1255 1255
 
1256 1256
 
@@ -1267,7 +1267,7 @@  discard block
 block discarded – undo
1267 1267
 	/**
1268 1268
 	 * @param array $existing_reg_payment_REG_IDs
1269 1269
 	 */
1270
-	public function set_existing_reg_payment_REG_IDs( $existing_reg_payment_REG_IDs = null ) {
1270
+	public function set_existing_reg_payment_REG_IDs($existing_reg_payment_REG_IDs = null) {
1271 1271
 		$this->_existing_reg_payment_REG_IDs = $existing_reg_payment_REG_IDs;
1272 1272
 	}
1273 1273
 
@@ -1282,13 +1282,13 @@  discard block
 block discarded – undo
1282 1282
 	 * @param \EE_Payment $payment
1283 1283
 	 * @return array
1284 1284
 	 */
1285
-	protected function _get_existing_reg_payment_REG_IDs( EE_Payment $payment ) {
1286
-		if ( $this->existing_reg_payment_REG_IDs() === null ) {
1285
+	protected function _get_existing_reg_payment_REG_IDs(EE_Payment $payment) {
1286
+		if ($this->existing_reg_payment_REG_IDs() === null) {
1287 1287
 			// let's get any existing reg payment records for this payment
1288
-			$existing_reg_payment_REG_IDs = $payment->get_many_related( 'Registration' );
1288
+			$existing_reg_payment_REG_IDs = $payment->get_many_related('Registration');
1289 1289
 			// but we only want the REG IDs, so grab the array keys
1290
-			$existing_reg_payment_REG_IDs = ! empty( $existing_reg_payment_REG_IDs ) ? array_keys( $existing_reg_payment_REG_IDs ) : array();
1291
-			$this->set_existing_reg_payment_REG_IDs( $existing_reg_payment_REG_IDs );
1290
+			$existing_reg_payment_REG_IDs = ! empty($existing_reg_payment_REG_IDs) ? array_keys($existing_reg_payment_REG_IDs) : array();
1291
+			$this->set_existing_reg_payment_REG_IDs($existing_reg_payment_REG_IDs);
1292 1292
 		}
1293 1293
 		return $this->existing_reg_payment_REG_IDs();
1294 1294
 	}
@@ -1307,23 +1307,23 @@  discard block
 block discarded – undo
1307 1307
 	 * @param int         $PAY_ID
1308 1308
 	 * @return bool;
1309 1309
 	 */
1310
-	protected function _remove_existing_registration_payments( EE_Payment $payment, $PAY_ID = 0 ) {
1310
+	protected function _remove_existing_registration_payments(EE_Payment $payment, $PAY_ID = 0) {
1311 1311
 		// newly created payments will have nothing recorded for $PAY_ID
1312
-		if ( $PAY_ID == 0 ) {
1312
+		if ($PAY_ID == 0) {
1313 1313
 			return false;
1314 1314
 		}
1315
-		$existing_reg_payment_REG_IDs = $this->_get_existing_reg_payment_REG_IDs( $payment );
1316
-		if ( empty( $existing_reg_payment_REG_IDs )) {
1315
+		$existing_reg_payment_REG_IDs = $this->_get_existing_reg_payment_REG_IDs($payment);
1316
+		if (empty($existing_reg_payment_REG_IDs)) {
1317 1317
 			return false;
1318 1318
 		}
1319 1319
 		/** @type EE_Transaction_Payments $transaction_payments */
1320
-		$transaction_payments = EE_Registry::instance()->load_class( 'Transaction_Payments' );
1320
+		$transaction_payments = EE_Registry::instance()->load_class('Transaction_Payments');
1321 1321
 		return $transaction_payments->delete_registration_payments_and_update_registrations(
1322 1322
 			$payment,
1323 1323
 			array(
1324 1324
 				array(
1325 1325
 					'PAY_ID' => $payment->ID(),
1326
-					'REG_ID' => array( 'IN', $existing_reg_payment_REG_IDs ),
1326
+					'REG_ID' => array('IN', $existing_reg_payment_REG_IDs),
1327 1327
 				)
1328 1328
 			)
1329 1329
 		);
@@ -1342,25 +1342,25 @@  discard block
 block discarded – undo
1342 1342
 	 * @param array $REG_IDs
1343 1343
 	 * @return bool
1344 1344
 	 */
1345
-	protected function _update_registration_payments( EE_Transaction $transaction, EE_Payment $payment, $REG_IDs = array() ) {
1345
+	protected function _update_registration_payments(EE_Transaction $transaction, EE_Payment $payment, $REG_IDs = array()) {
1346 1346
 		// we can pass our own custom set of registrations to EE_Payment_Processor::process_registration_payments()
1347 1347
 		// so let's do that using our set of REG_IDs from the form
1348 1348
 		$registration_query_where_params = array(
1349
-			'REG_ID' => array( 'IN', $REG_IDs )
1349
+			'REG_ID' => array('IN', $REG_IDs)
1350 1350
 		);
1351 1351
 		// but add in some conditions regarding payment,
1352 1352
 		// so that we don't apply payments to registrations that are free or have already been paid for
1353 1353
 		// but ONLY if the payment is NOT a refund ( ie: the payment amount is not negative )
1354
-		if ( ! $payment->is_a_refund() ) {
1355
-			$registration_query_where_params[ 'REG_final_price' ]  = array( '!=', 0 );
1356
-			$registration_query_where_params[ 'REG_final_price*' ]  = array( '!=', 'REG_paid', true );
1354
+		if ( ! $payment->is_a_refund()) {
1355
+			$registration_query_where_params['REG_final_price'] = array('!=', 0);
1356
+			$registration_query_where_params['REG_final_price*'] = array('!=', 'REG_paid', true);
1357 1357
 		}
1358 1358
 		//EEH_Debug_Tools::printr( $registration_query_where_params, '$registration_query_where_params', __FILE__, __LINE__ );
1359
-		$registrations = $transaction->registrations( array( $registration_query_where_params ) );
1360
-		if ( ! empty( $registrations ) ) {
1359
+		$registrations = $transaction->registrations(array($registration_query_where_params));
1360
+		if ( ! empty($registrations)) {
1361 1361
 			/** @type EE_Payment_Processor $payment_processor */
1362
-			$payment_processor = EE_Registry::instance()->load_core( 'Payment_Processor' );
1363
-			$payment_processor->process_registration_payments( $transaction, $payment, $registrations );
1362
+			$payment_processor = EE_Registry::instance()->load_core('Payment_Processor');
1363
+			$payment_processor->process_registration_payments($transaction, $payment, $registrations);
1364 1364
 		}
1365 1365
 	}
1366 1366
 
@@ -1376,22 +1376,22 @@  discard block
 block discarded – undo
1376 1376
 	 * @param array $REG_IDs
1377 1377
 	 * @return bool
1378 1378
 	 */
1379
-	protected function _process_registration_status_change( EE_Transaction $transaction, $REG_IDs = array() ) {
1379
+	protected function _process_registration_status_change(EE_Transaction $transaction, $REG_IDs = array()) {
1380 1380
 		// first if there is no change in status then we get out.
1381 1381
 		if (
1382
-			! isset( $this->_req_data['txn_reg_status_change'], $this->_req_data[ 'txn_reg_status_change' ][ 'reg_status' ] )
1382
+			! isset($this->_req_data['txn_reg_status_change'], $this->_req_data['txn_reg_status_change']['reg_status'])
1383 1383
 			|| $this->_req_data['txn_reg_status_change']['reg_status'] == 'NAN'
1384 1384
 		) {
1385 1385
 			//no error message, no change requested, just nothing to do man.
1386 1386
 			return FALSE;
1387 1387
 		}
1388 1388
 		/** @type EE_Transaction_Processor $transaction_processor */
1389
-		$transaction_processor = EE_Registry::instance()->load_class( 'Transaction_Processor' );
1389
+		$transaction_processor = EE_Registry::instance()->load_class('Transaction_Processor');
1390 1390
 		// made it here dude?  Oh WOW.  K, let's take care of changing the statuses
1391 1391
 		return $transaction_processor->manually_update_registration_statuses(
1392 1392
 			$transaction,
1393
-			sanitize_text_field( $this->_req_data[ 'txn_reg_status_change' ][ 'reg_status' ] ),
1394
-			array( array( 'REG_ID' => array( 'IN', $REG_IDs ) ) )
1393
+			sanitize_text_field($this->_req_data['txn_reg_status_change']['reg_status']),
1394
+			array(array('REG_ID' => array('IN', $REG_IDs)))
1395 1395
 		);
1396 1396
 //		$transaction_processor->finalize( $transaction, TRUE, FALSE);
1397 1397
 	}
@@ -1407,16 +1407,16 @@  discard block
 block discarded – undo
1407 1407
 	 * @param bool | null        $delete_txn_reg_status_change
1408 1408
 	 * @return array
1409 1409
 	 */
1410
-	protected function _build_payment_json_response( EE_Payment $payment, $REG_IDs = array(), $delete_txn_reg_status_change = null ) {
1410
+	protected function _build_payment_json_response(EE_Payment $payment, $REG_IDs = array(), $delete_txn_reg_status_change = null) {
1411 1411
 		// was the payment deleted ?
1412
-		if ( is_bool( $delete_txn_reg_status_change )) {
1412
+		if (is_bool($delete_txn_reg_status_change)) {
1413 1413
 			return array(
1414 1414
 				'PAY_ID' 				=> $payment->ID(),
1415 1415
 				'amount' 			=> $payment->amount(),
1416 1416
 				'total_paid' 			=> $payment->transaction()->paid(),
1417 1417
 				'txn_status' 			=> $payment->transaction()->status_ID(),
1418 1418
 				'pay_status' 		=> $payment->STS_ID(),
1419
-				'registrations' 	=> $this->_registration_payment_data_array( $REG_IDs ),
1419
+				'registrations' 	=> $this->_registration_payment_data_array($REG_IDs),
1420 1420
 				'delete_txn_reg_status_change' => $delete_txn_reg_status_change,
1421 1421
 			);
1422 1422
 		} else {
@@ -1428,16 +1428,16 @@  discard block
 block discarded – undo
1428 1428
 				'pay_status' 	=> $payment->STS_ID(),
1429 1429
 				'PAY_ID'           => $payment->ID(),
1430 1430
 				'STS_ID' 			=> $payment->STS_ID(),
1431
-				'status' 			=> self::$_pay_status[ $payment->STS_ID() ],
1432
-				'date' 				=> $payment->timestamp( 'Y-m-d', 'h:i a' ),
1433
-				'method' 		=> strtoupper( $payment->source() ),
1431
+				'status' 			=> self::$_pay_status[$payment->STS_ID()],
1432
+				'date' 				=> $payment->timestamp('Y-m-d', 'h:i a'),
1433
+				'method' 		=> strtoupper($payment->source()),
1434 1434
 				'PM_ID' 			=> $payment->payment_method() ? $payment->payment_method()->ID() : 1,
1435
-				'gateway' 		=> $payment->payment_method() ? $payment->payment_method()->admin_name() : __( "Unknown", 'event_espresso' ),
1435
+				'gateway' 		=> $payment->payment_method() ? $payment->payment_method()->admin_name() : __("Unknown", 'event_espresso'),
1436 1436
 				'gateway_response' 	=> $payment->gateway_response(),
1437 1437
 				'txn_id_chq_nmbr'  	=> $payment->txn_id_chq_nmbr(),
1438 1438
 				'po_number'        		=> $payment->po_number(),
1439 1439
 				'extra_accntng'    		=> $payment->extra_accntng(),
1440
-				'registrations'    			=> $this->_registration_payment_data_array( $REG_IDs ),
1440
+				'registrations'    			=> $this->_registration_payment_data_array($REG_IDs),
1441 1441
 			);
1442 1442
 		}
1443 1443
 	}
@@ -1452,40 +1452,40 @@  discard block
 block discarded – undo
1452 1452
 	*	@return void
1453 1453
 	*/
1454 1454
 	public function delete_payment() {
1455
-		$json_response_data = array( 'return_data' => FALSE );
1456
-		$PAY_ID = isset( $this->_req_data['delete_txn_admin_payment'], $this->_req_data['delete_txn_admin_payment']['PAY_ID'] ) ? absint( $this->_req_data['delete_txn_admin_payment']['PAY_ID'] ) : 0;
1457
-		if ( $PAY_ID ) {
1458
-			$delete_txn_reg_status_change = isset( $this->_req_data[ 'delete_txn_reg_status_change' ] ) ? $this->_req_data[ 'delete_txn_reg_status_change' ] : false;
1459
-			$payment = EEM_Payment::instance()->get_one_by_ID( $PAY_ID );
1460
-			if ( $payment instanceof EE_Payment ) {
1461
-				$REG_IDs = $this->_get_existing_reg_payment_REG_IDs( $payment );
1455
+		$json_response_data = array('return_data' => FALSE);
1456
+		$PAY_ID = isset($this->_req_data['delete_txn_admin_payment'], $this->_req_data['delete_txn_admin_payment']['PAY_ID']) ? absint($this->_req_data['delete_txn_admin_payment']['PAY_ID']) : 0;
1457
+		if ($PAY_ID) {
1458
+			$delete_txn_reg_status_change = isset($this->_req_data['delete_txn_reg_status_change']) ? $this->_req_data['delete_txn_reg_status_change'] : false;
1459
+			$payment = EEM_Payment::instance()->get_one_by_ID($PAY_ID);
1460
+			if ($payment instanceof EE_Payment) {
1461
+				$REG_IDs = $this->_get_existing_reg_payment_REG_IDs($payment);
1462 1462
 				/** @type EE_Transaction_Payments $transaction_payments */
1463
-				$transaction_payments = EE_Registry::instance()->load_class( 'Transaction_Payments' );
1464
-				if ( $transaction_payments->delete_payment_and_update_transaction( $payment )) {
1465
-					EE_Error::add_success( __( 'The Payment was successfully deleted.', 'event_espresso' ) );
1466
-					$json_response_data['return_data'] = $this->_build_payment_json_response( $payment, $REG_IDs, $delete_txn_reg_status_change );
1467
-					if ( $delete_txn_reg_status_change ) {
1463
+				$transaction_payments = EE_Registry::instance()->load_class('Transaction_Payments');
1464
+				if ($transaction_payments->delete_payment_and_update_transaction($payment)) {
1465
+					EE_Error::add_success(__('The Payment was successfully deleted.', 'event_espresso'));
1466
+					$json_response_data['return_data'] = $this->_build_payment_json_response($payment, $REG_IDs, $delete_txn_reg_status_change);
1467
+					if ($delete_txn_reg_status_change) {
1468 1468
 						$this->_req_data['txn_reg_status_change'] = $delete_txn_reg_status_change;
1469 1469
 						//MAKE sure we also add the delete_txn_req_status_change to the
1470 1470
 						//$_REQUEST global because that's how messages will be looking for it.
1471 1471
 						$_REQUEST['txn_reg_status_change'] = $delete_txn_reg_status_change;
1472
-						$this->_process_registration_status_change( $payment->transaction() );
1472
+						$this->_process_registration_status_change($payment->transaction());
1473 1473
 					}
1474 1474
 				}
1475 1475
 			} else {
1476 1476
 				EE_Error::add_error(
1477
-					__( 'Valid Payment data could not be retrieved from the database.', 'event_espresso' ),
1477
+					__('Valid Payment data could not be retrieved from the database.', 'event_espresso'),
1478 1478
 					__FILE__, __FUNCTION__, __LINE__
1479 1479
 				);
1480 1480
 			}
1481 1481
 		} else {
1482 1482
 			EE_Error::add_error(
1483
-				__( 'A valid Payment ID was not received, therefore payment form data could not be loaded.', 'event_espresso' ),
1483
+				__('A valid Payment ID was not received, therefore payment form data could not be loaded.', 'event_espresso'),
1484 1484
 				__FILE__, __FUNCTION__, __LINE__
1485 1485
 			);
1486 1486
 		}
1487
-		$notices = EE_Error::get_notices( FALSE, FALSE, FALSE );
1488
-		echo json_encode( array_merge( $json_response_data, $notices ));
1487
+		$notices = EE_Error::get_notices(FALSE, FALSE, FALSE);
1488
+		echo json_encode(array_merge($json_response_data, $notices));
1489 1489
 		die();
1490 1490
 	}
1491 1491
 
@@ -1499,17 +1499,17 @@  discard block
 block discarded – undo
1499 1499
 	 * @param array $REG_IDs
1500 1500
 	 * @return array
1501 1501
 	 */
1502
-	protected function _registration_payment_data_array( $REG_IDs ) {
1502
+	protected function _registration_payment_data_array($REG_IDs) {
1503 1503
 		$registration_payment_data = array();
1504 1504
 		//if non empty reg_ids lets get an array of registrations and update the values for the apply_payment/refund rows.
1505
-		if ( ! empty( $REG_IDs ) ) {
1506
-			EE_Registry::instance()->load_helper( 'Template' );
1507
-			$registrations = EEM_Registration::instance()->get_all( array( array( 'REG_ID' => array( 'IN', $REG_IDs ) ) ) );
1508
-			foreach ( $registrations as $registration ) {
1509
-				if ( $registration instanceof EE_Registration ) {
1510
-					$registration_payment_data[ $registration->ID() ] = array(
1505
+		if ( ! empty($REG_IDs)) {
1506
+			EE_Registry::instance()->load_helper('Template');
1507
+			$registrations = EEM_Registration::instance()->get_all(array(array('REG_ID' => array('IN', $REG_IDs))));
1508
+			foreach ($registrations as $registration) {
1509
+				if ($registration instanceof EE_Registration) {
1510
+					$registration_payment_data[$registration->ID()] = array(
1511 1511
 						'paid' => $registration->pretty_paid(),
1512
-						'owing' => EEH_Template::format_currency( $registration->final_price() - $registration->paid() ),
1512
+						'owing' => EEH_Template::format_currency($registration->final_price() - $registration->paid()),
1513 1513
 					);
1514 1514
 				}
1515 1515
 			}
@@ -1527,11 +1527,11 @@  discard block
 block discarded – undo
1527 1527
 	*	@return void
1528 1528
 	*/
1529 1529
 	protected function _send_payment_reminder() {
1530
-	    $TXN_ID = ( ! empty( $this->_req_data['TXN_ID'] )) ? absint( $this->_req_data['TXN_ID'] ) : FALSE;
1531
-		$transaction = EEM_Transaction::instance()->get_one_by_ID( $TXN_ID );
1532
-		$query_args = isset($this->_req_data['redirect_to'] ) ? array('action' => $this->_req_data['redirect_to'], 'TXN_ID' => $this->_req_data['TXN_ID'] ) : array();
1533
-		do_action( 'AHEE__Transactions_Admin_Page___send_payment_reminder__process_admin_payment_reminder', $transaction );
1534
-		$this->_redirect_after_action( FALSE, __('payment reminder', 'event_espresso'), __('sent', 'event_espresso'), $query_args, TRUE );
1530
+	    $TXN_ID = ( ! empty($this->_req_data['TXN_ID'])) ? absint($this->_req_data['TXN_ID']) : FALSE;
1531
+		$transaction = EEM_Transaction::instance()->get_one_by_ID($TXN_ID);
1532
+		$query_args = isset($this->_req_data['redirect_to']) ? array('action' => $this->_req_data['redirect_to'], 'TXN_ID' => $this->_req_data['TXN_ID']) : array();
1533
+		do_action('AHEE__Transactions_Admin_Page___send_payment_reminder__process_admin_payment_reminder', $transaction);
1534
+		$this->_redirect_after_action(FALSE, __('payment reminder', 'event_espresso'), __('sent', 'event_espresso'), $query_args, TRUE);
1535 1535
 	}
1536 1536
 
1537 1537
 
@@ -1545,36 +1545,36 @@  discard block
 block discarded – undo
1545 1545
 	 * @param string   $view
1546 1546
 	 * @return mixed int = count || array of transaction objects
1547 1547
 	 */
1548
-	public function get_transactions( $perpage, $count = FALSE, $view = '' ) {
1548
+	public function get_transactions($perpage, $count = FALSE, $view = '') {
1549 1549
 
1550 1550
 		$TXN = EEM_Transaction::instance();
1551 1551
 
1552
-	    $start_date = isset( $this->_req_data['txn-filter-start-date'] ) ? wp_strip_all_tags( $this->_req_data['txn-filter-start-date'] ) : date( 'm/d/Y', strtotime( '-10 year' ));
1553
-	    $end_date = isset( $this->_req_data['txn-filter-end-date'] ) ? wp_strip_all_tags( $this->_req_data['txn-filter-end-date'] ) : date( 'm/d/Y' );
1552
+	    $start_date = isset($this->_req_data['txn-filter-start-date']) ? wp_strip_all_tags($this->_req_data['txn-filter-start-date']) : date('m/d/Y', strtotime('-10 year'));
1553
+	    $end_date = isset($this->_req_data['txn-filter-end-date']) ? wp_strip_all_tags($this->_req_data['txn-filter-end-date']) : date('m/d/Y');
1554 1554
 
1555 1555
 	    //make sure our timestamps start and end right at the boundaries for each day
1556
-	    $start_date = date( 'Y-m-d', strtotime( $start_date ) ) . ' 00:00:00';
1557
-	    $end_date = date( 'Y-m-d', strtotime( $end_date ) ) . ' 23:59:59';
1556
+	    $start_date = date('Y-m-d', strtotime($start_date)).' 00:00:00';
1557
+	    $end_date = date('Y-m-d', strtotime($end_date)).' 23:59:59';
1558 1558
 
1559 1559
 
1560 1560
 	    //convert to timestamps
1561
-	    $start_date = strtotime( $start_date );
1562
-	    $end_date = strtotime( $end_date );
1561
+	    $start_date = strtotime($start_date);
1562
+	    $end_date = strtotime($end_date);
1563 1563
 
1564 1564
 	    //makes sure start date is the lowest value and vice versa
1565
-	    $start_date = min( $start_date, $end_date );
1566
-	    $end_date = max( $start_date, $end_date );
1565
+	    $start_date = min($start_date, $end_date);
1566
+	    $end_date = max($start_date, $end_date);
1567 1567
 
1568 1568
 	    //convert to correct format for query
1569
-	$start_date = EEM_Transaction::instance()->convert_datetime_for_query( 'TXN_timestamp', date( 'Y-m-d H:i:s', $start_date ), 'Y-m-d H:i:s' );
1570
-	$end_date = EEM_Transaction::instance()->convert_datetime_for_query( 'TXN_timestamp', date( 'Y-m-d H:i:s', $end_date ), 'Y-m-d H:i:s' );
1569
+	$start_date = EEM_Transaction::instance()->convert_datetime_for_query('TXN_timestamp', date('Y-m-d H:i:s', $start_date), 'Y-m-d H:i:s');
1570
+	$end_date = EEM_Transaction::instance()->convert_datetime_for_query('TXN_timestamp', date('Y-m-d H:i:s', $end_date), 'Y-m-d H:i:s');
1571 1571
 
1572 1572
 
1573 1573
 
1574 1574
 	    //set orderby
1575 1575
 		$this->_req_data['orderby'] = ! empty($this->_req_data['orderby']) ? $this->_req_data['orderby'] : '';
1576 1576
 
1577
-		switch ( $this->_req_data['orderby'] ) {
1577
+		switch ($this->_req_data['orderby']) {
1578 1578
 			case 'TXN_ID':
1579 1579
 				$orderby = 'TXN_ID';
1580 1580
 				break;
@@ -1588,66 +1588,66 @@  discard block
 block discarded – undo
1588 1588
 				$orderby = 'TXN_timestamp';
1589 1589
 		}
1590 1590
 
1591
-		$sort = ( isset( $this->_req_data['order'] ) && ! empty( $this->_req_data['order'] )) ? $this->_req_data['order'] : 'DESC';
1592
-		$current_page = isset( $this->_req_data['paged'] ) && !empty( $this->_req_data['paged'] ) ? $this->_req_data['paged'] : 1;
1593
-		$per_page = isset( $perpage ) && !empty( $perpage ) ? $perpage : 10;
1594
-		$per_page = isset( $this->_req_data['perpage'] ) && !empty( $this->_req_data['perpage'] ) ? $this->_req_data['perpage'] : $per_page;
1591
+		$sort = (isset($this->_req_data['order']) && ! empty($this->_req_data['order'])) ? $this->_req_data['order'] : 'DESC';
1592
+		$current_page = isset($this->_req_data['paged']) && ! empty($this->_req_data['paged']) ? $this->_req_data['paged'] : 1;
1593
+		$per_page = isset($perpage) && ! empty($perpage) ? $perpage : 10;
1594
+		$per_page = isset($this->_req_data['perpage']) && ! empty($this->_req_data['perpage']) ? $this->_req_data['perpage'] : $per_page;
1595 1595
 
1596
-		$offset = ($current_page-1)*$per_page;
1597
-		$limit = array( $offset, $per_page );
1596
+		$offset = ($current_page - 1) * $per_page;
1597
+		$limit = array($offset, $per_page);
1598 1598
 
1599 1599
 		$_where = array(
1600
-			'TXN_timestamp' => array('BETWEEN', array($start_date, $end_date) ),
1600
+			'TXN_timestamp' => array('BETWEEN', array($start_date, $end_date)),
1601 1601
 			'Registration.REG_count' => 1
1602 1602
 		);
1603 1603
 
1604
-		if ( isset( $this->_req_data['EVT_ID'] ) ) {
1604
+		if (isset($this->_req_data['EVT_ID'])) {
1605 1605
 			$_where['Registration.EVT_ID'] = $this->_req_data['EVT_ID'];
1606 1606
 		}
1607 1607
 
1608
-		if ( isset( $this->_req_data['s'] ) ) {
1609
-			$search_string = '%' . $this->_req_data['s'] . '%';
1608
+		if (isset($this->_req_data['s'])) {
1609
+			$search_string = '%'.$this->_req_data['s'].'%';
1610 1610
 			$_where['OR'] = array(
1611
-				'Registration.Event.EVT_name' => array( 'LIKE', $search_string ),
1612
-				'Registration.Event.EVT_desc' => array( 'LIKE', $search_string ),
1613
-				'Registration.Event.EVT_short_desc' => array( 'LIKE' , $search_string ),
1614
-				'Registration.Attendee.ATT_full_name' => array( 'LIKE', $search_string ),
1615
-				'Registration.Attendee.ATT_fname' => array( 'LIKE', $search_string ),
1616
-				'Registration.Attendee.ATT_lname' => array( 'LIKE', $search_string ),
1617
-				'Registration.Attendee.ATT_short_bio' => array( 'LIKE', $search_string ),
1618
-				'Registration.Attendee.ATT_email' => array('LIKE', $search_string ),
1619
-				'Registration.Attendee.ATT_address' => array( 'LIKE', $search_string ),
1620
-				'Registration.Attendee.ATT_address2' => array( 'LIKE', $search_string ),
1621
-				'Registration.Attendee.ATT_city' => array( 'LIKE', $search_string ),
1622
-				'Registration.REG_final_price' => array( 'LIKE', $search_string ),
1623
-				'Registration.REG_code' => array( 'LIKE', $search_string ),
1624
-				'Registration.REG_count' => array( 'LIKE' , $search_string ),
1625
-				'Registration.REG_group_size' => array( 'LIKE' , $search_string ),
1626
-				'Registration.Ticket.TKT_name' => array( 'LIKE', $search_string ),
1627
-				'Registration.Ticket.TKT_description' => array( 'LIKE', $search_string ),
1628
-				'Payment.PAY_source' => array('LIKE', $search_string ),
1629
-				'Payment.Payment_Method.PMD_name' => array('LIKE', $search_string ),
1630
-				'TXN_session_data' => array( 'LIKE', $search_string ),
1631
-				'Payment.PAY_txn_id_chq_nmbr' => array( 'LIKE', $search_string )
1611
+				'Registration.Event.EVT_name' => array('LIKE', $search_string),
1612
+				'Registration.Event.EVT_desc' => array('LIKE', $search_string),
1613
+				'Registration.Event.EVT_short_desc' => array('LIKE', $search_string),
1614
+				'Registration.Attendee.ATT_full_name' => array('LIKE', $search_string),
1615
+				'Registration.Attendee.ATT_fname' => array('LIKE', $search_string),
1616
+				'Registration.Attendee.ATT_lname' => array('LIKE', $search_string),
1617
+				'Registration.Attendee.ATT_short_bio' => array('LIKE', $search_string),
1618
+				'Registration.Attendee.ATT_email' => array('LIKE', $search_string),
1619
+				'Registration.Attendee.ATT_address' => array('LIKE', $search_string),
1620
+				'Registration.Attendee.ATT_address2' => array('LIKE', $search_string),
1621
+				'Registration.Attendee.ATT_city' => array('LIKE', $search_string),
1622
+				'Registration.REG_final_price' => array('LIKE', $search_string),
1623
+				'Registration.REG_code' => array('LIKE', $search_string),
1624
+				'Registration.REG_count' => array('LIKE', $search_string),
1625
+				'Registration.REG_group_size' => array('LIKE', $search_string),
1626
+				'Registration.Ticket.TKT_name' => array('LIKE', $search_string),
1627
+				'Registration.Ticket.TKT_description' => array('LIKE', $search_string),
1628
+				'Payment.PAY_source' => array('LIKE', $search_string),
1629
+				'Payment.Payment_Method.PMD_name' => array('LIKE', $search_string),
1630
+				'TXN_session_data' => array('LIKE', $search_string),
1631
+				'Payment.PAY_txn_id_chq_nmbr' => array('LIKE', $search_string)
1632 1632
 				);
1633 1633
 		}
1634 1634
 
1635 1635
 		//failed transactions
1636
-		$failed = ( ! empty( $this->_req_data['status'] ) && $this->_req_data['status'] == 'failed' && ! $count ) || ( $count && $view == 'failed' ) ? TRUE: FALSE;
1637
-		$abandoned = ( ! empty( $this->_req_data['status'] ) && $this->_req_data['status'] == 'abandoned' && ! $count ) || ( $count && $view == 'abandoned' ) ? TRUE: FALSE;
1636
+		$failed = ( ! empty($this->_req_data['status']) && $this->_req_data['status'] == 'failed' && ! $count) || ($count && $view == 'failed') ? TRUE : FALSE;
1637
+		$abandoned = ( ! empty($this->_req_data['status']) && $this->_req_data['status'] == 'abandoned' && ! $count) || ($count && $view == 'abandoned') ? TRUE : FALSE;
1638 1638
 
1639
-		if ( $failed ) {
1640
-			$_where[ 'STS_ID' ] = EEM_Transaction::failed_status_code;
1641
-		} else if ( $abandoned ) {
1639
+		if ($failed) {
1640
+			$_where['STS_ID'] = EEM_Transaction::failed_status_code;
1641
+		} else if ($abandoned) {
1642 1642
 				$_where['STS_ID'] = EEM_Transaction::abandoned_status_code;
1643 1643
 		} else {
1644
-				$_where['STS_ID'] = array( '!=', EEM_Transaction::failed_status_code );
1645
-				$_where['STS_ID*'] = array( '!=', EEM_Transaction::abandoned_status_code );
1644
+				$_where['STS_ID'] = array('!=', EEM_Transaction::failed_status_code);
1645
+				$_where['STS_ID*'] = array('!=', EEM_Transaction::abandoned_status_code);
1646 1646
 		}
1647 1647
 
1648
-		$query_params = array( $_where, 'order_by' => array( $orderby => $sort ), 'limit' => $limit );
1648
+		$query_params = array($_where, 'order_by' => array($orderby => $sort), 'limit' => $limit);
1649 1649
 
1650
-		$transactions = $count ? $TXN->count( array($_where), 'TXN_ID', TRUE ) : $TXN->get_all($query_params);
1650
+		$transactions = $count ? $TXN->count(array($_where), 'TXN_ID', TRUE) : $TXN->get_all($query_params);
1651 1651
 
1652 1652
 
1653 1653
 		return $transactions;
Please login to merge, or discard this patch.
help_tabs/transactions_overview_table_column_headings.help_tab.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -67,11 +67,11 @@
 block discarded – undo
67 67
 </li>
68 68
 <li style="list-style-type: none;">
69 69
 <strong><?php _e('View Registration Details <span class="dashicons dashicons-clipboard"></span>', 'event_espresso'); ?></strong><br />
70
-<?php echo sprintf(__('Clicking this icon will take you to the registration page for this transaction. You can also get there via the %sRegistrations page%s.', 'event_espresso'), '<a href="admin.php?page=espresso_registrations">','</a>'); ?>
70
+<?php echo sprintf(__('Clicking this icon will take you to the registration page for this transaction. You can also get there via the %sRegistrations page%s.', 'event_espresso'), '<a href="admin.php?page=espresso_registrations">', '</a>'); ?>
71 71
 </li>
72 72
 <li style="list-style-type: none;">
73 73
 <strong><?php _e('Send Payment Reminder <span class="dashicons dashicons-email-alt"></span>', 'event_espresso'); ?></strong><br />
74
-<?php echo sprintf(__('Emails the primary registrant the Payment Reminder message. This is set up in the %sMessages page%s.', 'event_espresso'),'<a href="admin.php?page=espresso_messages">','</a>'); ?>
74
+<?php echo sprintf(__('Emails the primary registrant the Payment Reminder message. This is set up in the %sMessages page%s.', 'event_espresso'), '<a href="admin.php?page=espresso_messages">', '</a>'); ?>
75 75
 </li>
76 76
 </ul>
77 77
 </li>
Please login to merge, or discard this patch.
admin_pages/transactions/help_tours/Transaction_Details_Help_Tour.class.php 2 patches
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
3 3
 	exit('NO direct script access allowed');
4 4
 
5 5
 /**
@@ -117,45 +117,45 @@  discard block
 block discarded – undo
117 117
 
118 118
 
119 119
 	protected function _start() {
120
-		$content = '<h3>' . __('View Transaction', 'event_espresso') . '</h3>';
121
-		$content .= '<p>' . __('This tour of the View Transaction page will go over different areas of the screen to help you understand what they are used for.', 'event_espresso') . '</p>';
120
+		$content = '<h3>'.__('View Transaction', 'event_espresso').'</h3>';
121
+		$content .= '<p>'.__('This tour of the View Transaction page will go over different areas of the screen to help you understand what they are used for.', 'event_espresso').'</p>';
122 122
 		return $content;
123 123
 	}
124 124
 
125 125
 	protected function _txn_date_h2_stop() {
126
-		return '<p>' . __('This is the date that the transaction occurred on.', 'event_espresso') . '</p>';
126
+		return '<p>'.__('This is the date that the transaction occurred on.', 'event_espresso').'</p>';
127 127
 	}
128 128
 
129 129
 	protected function _txn_status_h2_stop() {
130
-		return '<p>' . __('View current status of the transaction. Available statuses are Complete, Failed, Incomplete, and Overpaid.', 'event_espresso') . '</p>';
130
+		return '<p>'.__('View current status of the transaction. Available statuses are Complete, Failed, Incomplete, and Overpaid.', 'event_espresso').'</p>';
131 131
 	}
132 132
 
133 133
 	protected function _txn_amount_due_h2_stop() {
134
-		return '<p>' . __('View the amount due for a transaction (will not appear if the transaction has been paid in full).', 'event_espresso') . '</p>';
134
+		return '<p>'.__('View the amount due for a transaction (will not appear if the transaction has been paid in full).', 'event_espresso').'</p>';
135 135
 	}
136 136
 
137 137
 	protected function _txn_details_metabox_stop() {
138
-		return '<p>' . __('The transaction details area displays various information including Line Item ID, Event Name, Event Date, Ticket Option, Price, Quantity, Line Total, Sales Tax, and the Grand Total. You can also view details about any payments made towards this transaction.', 'event_espresso') . '</p>';
138
+		return '<p>'.__('The transaction details area displays various information including Line Item ID, Event Name, Event Date, Ticket Option, Price, Quantity, Line Total, Sales Tax, and the Grand Total. You can also view details about any payments made towards this transaction.', 'event_espresso').'</p>';
139 139
 	}
140 140
 
141 141
 	protected function _txn_session_info_stop() {
142
-		return '<p>' . __('You can view additional information about the transaction by clicking on the link below. Examples of available information includes IP Address and User Agent.', 'event_espresso') . '</p>';
142
+		return '<p>'.__('You can view additional information about the transaction by clicking on the link below. Examples of available information includes IP Address and User Agent.', 'event_espresso').'</p>';
143 143
 	}
144 144
 
145 145
 	protected function _txn_attendees_metabox_stop() {
146
-		return '<p>' . __('View information about registrants that are linked to this transaction.', 'event_espresso') . '</p>';
146
+		return '<p>'.__('View information about registrants that are linked to this transaction.', 'event_espresso').'</p>';
147 147
 	}
148 148
 
149 149
 	protected function _txn_primary_reg_metabox_stop() {
150
-		return '<p>' . __('View contact details on the primary registrant who is linked to this transaction.', 'event_espresso') . '</p>';
150
+		return '<p>'.__('View contact details on the primary registrant who is linked to this transaction.', 'event_espresso').'</p>';
151 151
 	}
152 152
 
153 153
 	protected function _txn_billing_metabox_stop() {
154
-		return '<p>' . __('View billing information for this transaction.', 'event_espresso') . '</p>';
154
+		return '<p>'.__('View billing information for this transaction.', 'event_espresso').'</p>';
155 155
 	}
156 156
 
157 157
 	protected function _event_name_stop() {
158
-		return '<p>' . __('event name', 'event_espresso') . '</p>';
158
+		return '<p>'.__('event name', 'event_espresso').'</p>';
159 159
 	}
160 160
 
161 161
 }
162 162
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,8 +6,9 @@
 block discarded – undo
6 6
  * @package Event Espresso
7 7
  * @subpackage messages
8 8
  */
9
-if (!defined('EVENT_ESPRESSO_VERSION') )
9
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
10 10
 	exit('NO direct script access allowed');
11
+}
11 12
 
12 13
 /**
13 14
  *
Please login to merge, or discard this patch.
admin_pages/transactions/help_tours/Transaction_Reports_Help_Tour.class.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
3 3
 	exit('NO direct script access allowed');
4 4
 
5 5
 /**
@@ -60,16 +60,16 @@  discard block
 block discarded – undo
60 60
 
61 61
 
62 62
 	protected function _start() {
63
-		$content = '<h3>' . __('Transaction Reports', 'event_espresso') . '</h3>';
64
-		$content .= '<p>' . __('This tour of the Transaction Reports page will go over different areas of the screen to help you understand what they are used for.', 'event_espresso') . '</p>';
63
+		$content = '<h3>'.__('Transaction Reports', 'event_espresso').'</h3>';
64
+		$content .= '<p>'.__('This tour of the Transaction Reports page will go over different areas of the screen to help you understand what they are used for.', 'event_espresso').'</p>';
65 65
 		return $content;
66 66
 	}
67 67
 
68 68
 	protected function _txn_per_day_report() {
69
-		return '<p>' . __('This graph shows revenue for each day.', 'event_espresso') . '</p>';
69
+		return '<p>'.__('This graph shows revenue for each day.', 'event_espresso').'</p>';
70 70
 	}
71 71
 
72 72
 	protected function _txn_per_event_report() {
73
-		return '<p>' . __('This graph shows revenue for each event.', 'event_espresso') . '</p>';
73
+		return '<p>'.__('This graph shows revenue for each event.', 'event_espresso').'</p>';
74 74
 	}
75 75
 }
76 76
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,8 +6,9 @@
 block discarded – undo
6 6
  * @package Event Espresso
7 7
  * @subpackage messages
8 8
  */
9
-if (!defined('EVENT_ESPRESSO_VERSION') )
9
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
10 10
 	exit('NO direct script access allowed');
11
+}
11 12
 
12 13
 /**
13 14
  *
Please login to merge, or discard this patch.
transactions/help_tours/Transactions_Overview_Help_Tour.class.php 2 patches
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
3 3
 	exit('NO direct script access allowed');
4 4
 
5 5
 /**
@@ -144,53 +144,53 @@  discard block
 block discarded – undo
144 144
 
145 145
 
146 146
 	protected function _start() {
147
-		$content = '<h3>' . __('Transactions Overview', 'event_espresso') . '</h3>';
148
-		$content .= '<p>' . __('This tour of the Transactions Overview page will go over different areas of the screen to help you understand what they are used for.', 'event_espresso') . '</p>';
147
+		$content = '<h3>'.__('Transactions Overview', 'event_espresso').'</h3>';
148
+		$content .= '<p>'.__('This tour of the Transactions Overview page will go over different areas of the screen to help you understand what they are used for.', 'event_espresso').'</p>';
149 149
 		return $content;
150 150
 	}
151 151
 
152 152
 	protected function _txn_id_stop() {
153
-		return '<p>' . __('View transaction ID. Can be sorted in ascending or descending order.', 'event_espresso') . '</p>';
153
+		return '<p>'.__('View transaction ID. Can be sorted in ascending or descending order.', 'event_espresso').'</p>';
154 154
 	}
155 155
 
156 156
 	protected function _txn_timestamp_stop() {
157
-		return '<p>' . __('View transaction date. Can be sorted in ascending or descending order.', 'event_espresso') . '</p>';
157
+		return '<p>'.__('View transaction date. Can be sorted in ascending or descending order.', 'event_espresso').'</p>';
158 158
 	}
159 159
 
160 160
 	protected function _txn_total_stop() {
161
-		return '<p>' . __('View total for transaction.', 'event_espresso') . '</p>';
161
+		return '<p>'.__('View total for transaction.', 'event_espresso').'</p>';
162 162
 	}
163 163
 	
164 164
 	protected function _txn_paid_stop() {
165
-		return '<p>' . __('View amount paid for transaction.', 'event_espresso') . '</p>';
165
+		return '<p>'.__('View amount paid for transaction.', 'event_espresso').'</p>';
166 166
 	}
167 167
 
168 168
 	protected function _attendee_name_stop() {
169
-		return '<p>' . __('View name for the primary registrant. Can be sorted in ascending or descending order.', 'event_espresso') . '</p>';
169
+		return '<p>'.__('View name for the primary registrant. Can be sorted in ascending or descending order.', 'event_espresso').'</p>';
170 170
 	}
171 171
 
172 172
 	protected function _att_email_stop() {
173
-		return '<p>' . __('View email address for primary registrant. Can be sorted in ascending or descending order.', 'event_espresso') . '</p>';
173
+		return '<p>'.__('View email address for primary registrant. Can be sorted in ascending or descending order.', 'event_espresso').'</p>';
174 174
 	}
175 175
 
176 176
 	protected function _event_name_stop() {
177
-		return '<p>' . __('View name of event. Can be sorted in ascending or descending order.', 'event_espresso') . '</p>';
177
+		return '<p>'.__('View name of event. Can be sorted in ascending or descending order.', 'event_espresso').'</p>';
178 178
 	}
179 179
 
180 180
 	protected function _actions_stop() {
181
-		return '<p>' . __('Perform an action to a transaction. See legend in bottom left corner.', 'event_espresso') . '</p>';
181
+		return '<p>'.__('Perform an action to a transaction. See legend in bottom left corner.', 'event_espresso').'</p>';
182 182
 	}
183 183
 
184 184
 	protected function _legend_stop() {
185
-		return '<p>' . __('This legend that describes the actions available in the actions column. Also shows available statuses for a transaction.', 'event_espresso') . '</p>';
185
+		return '<p>'.__('This legend that describes the actions available in the actions column. Also shows available statuses for a transaction.', 'event_espresso').'</p>';
186 186
 	}
187 187
 
188 188
 	protected function _stop_about_filters() {
189
-		return '<p>' . __('Filter transactions by date by selecting two dates and clicking on the filter button. You can clear your current date selection by clicking on the reset filters button.', 'event_espresso') . '</p>';
189
+		return '<p>'.__('Filter transactions by date by selecting two dates and clicking on the filter button. You can clear your current date selection by clicking on the reset filters button.', 'event_espresso').'</p>';
190 190
 	}
191 191
 
192 192
 	protected function _search_stop() {
193
-		return '<p>' . __('Search through transactions. The following sources will be searched: Event Name, Event Description, First Name, Last Name, Biography, Email Address, Address, Comments, Notes, Registration Final Price, Registration Code, Registration Group Size, Ticket Name, Ticket Description, Payment Method, Payment Gateway, Transaction Details, and Transaction Session.', 'event_espresso') . '</p>';
193
+		return '<p>'.__('Search through transactions. The following sources will be searched: Event Name, Event Description, First Name, Last Name, Biography, Email Address, Address, Comments, Notes, Registration Final Price, Registration Code, Registration Group Size, Ticket Name, Ticket Description, Payment Method, Payment Gateway, Transaction Details, and Transaction Session.', 'event_espresso').'</p>';
194 194
 	}
195 195
 
196 196
 }
197 197
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,8 +6,9 @@
 block discarded – undo
6 6
  * @package Event Espresso
7 7
  * @subpackage messages
8 8
  */
9
-if (!defined('EVENT_ESPRESSO_VERSION') )
9
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
10 10
 	exit('NO direct script access allowed');
11
+}
11 12
 
12 13
 /**
13 14
  *
Please login to merge, or discard this patch.
admin_pages/transactions/qtips/Transaction_Details_Tips.lib.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -31,8 +31,8 @@  discard block
 block discarded – undo
31 31
 	protected function _set_tips_array() {
32 32
 		$this->_qtipsa = array(
33 33
 			0 => array(
34
-				'content_id' => 'payment-status-' . EEM_Payment::status_id_approved,
35
-				'target' => '.pymt-status-' . EEM_Payment::status_id_approved,
34
+				'content_id' => 'payment-status-'.EEM_Payment::status_id_approved,
35
+				'target' => '.pymt-status-'.EEM_Payment::status_id_approved,
36 36
 				'content' => $this->_payment_status_legend(EEM_Payment::status_id_approved),
37 37
 				'options' => array(
38 38
 					'position' => array(
@@ -41,8 +41,8 @@  discard block
 block discarded – undo
41 41
 					)
42 42
 				),
43 43
 			1 => array(
44
-				'content_id' => 'payment-status-' . EEM_Payment::status_id_pending,
45
-				'target' => '.pymt-status-' . EEM_Payment::status_id_pending,
44
+				'content_id' => 'payment-status-'.EEM_Payment::status_id_pending,
45
+				'target' => '.pymt-status-'.EEM_Payment::status_id_pending,
46 46
 				'content' => $this->_payment_status_legend(EEM_Payment::status_id_pending),
47 47
 				'options' => array(
48 48
 					'position' => array(
@@ -51,8 +51,8 @@  discard block
 block discarded – undo
51 51
 					)
52 52
 				),
53 53
 			2 => array(
54
-				'content_id' => 'payment-status-' . EEM_Payment::status_id_cancelled,
55
-				'target' => '.pymt-status-' . EEM_Payment::status_id_cancelled,
54
+				'content_id' => 'payment-status-'.EEM_Payment::status_id_cancelled,
55
+				'target' => '.pymt-status-'.EEM_Payment::status_id_cancelled,
56 56
 				'content' => $this->_payment_status_legend(EEM_Payment::status_id_cancelled),
57 57
 				'options' => array(
58 58
 					'position' => array(
@@ -61,8 +61,8 @@  discard block
 block discarded – undo
61 61
 					)
62 62
 				),
63 63
 			3 => array(
64
-				'content_id' => 'payment-status-' . EEM_Payment::status_id_declined,
65
-				'target' => '.pymt-status-' . EEM_Payment::status_id_declined,
64
+				'content_id' => 'payment-status-'.EEM_Payment::status_id_declined,
65
+				'target' => '.pymt-status-'.EEM_Payment::status_id_declined,
66 66
 				'content' => $this->_payment_status_legend(EEM_Payment::status_id_declined),
67 67
 				'options' => array(
68 68
 					'position' => array(
@@ -71,8 +71,8 @@  discard block
 block discarded – undo
71 71
 					)
72 72
 				),
73 73
 			4 => array(
74
-				'content_id' => 'payment-status-' . EEM_Payment::status_id_failed,
75
-				'target' => '.pymt-status-' . EEM_Payment::status_id_failed,
74
+				'content_id' => 'payment-status-'.EEM_Payment::status_id_failed,
75
+				'target' => '.pymt-status-'.EEM_Payment::status_id_failed,
76 76
 				'content' => $this->_payment_status_legend(EEM_Payment::status_id_failed),
77 77
 				'options' => array(
78 78
 					'position' => array(
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 	 * @param  EEM_Payment constant $status What status is set (by class)
93 93
 	 * @return string         The status legend with the related status highlighted
94 94
 	 */
95
-	private function _payment_status_legend( $status ) {
95
+	private function _payment_status_legend($status) {
96 96
 
97 97
 		$status_array = array(
98 98
 			'approved' => EEM_Payment::status_id_approved,
@@ -102,6 +102,6 @@  discard block
 block discarded – undo
102 102
 			'failed' => EEM_Payment::status_id_failed,
103 103
 			);
104 104
 
105
-		return EEH_Template::status_legend( $status_array, $status );
105
+		return EEH_Template::status_legend($status_array, $status);
106 106
 	}
107 107
 }
108 108
\ No newline at end of file
Please login to merge, or discard this patch.
admin_pages/transactions/templates/txn_admin_details_header.template.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,19 +1,19 @@
 block discarded – undo
1 1
 
2
-		<h3 style="padding:0;margin:-.5em 0 1em;"><?php echo $previous_transaction . '&nbsp;'; echo __( 'Transaction # ', 'event_espresso' ) . $txn_nmbr['value']; echo '&nbsp;' . $next_transaction; ?></h3>
3
-		<h2 id="txn-date-h2" style="padding:0;margin:0 0 1em;"><?php echo $txn_datetime['value'];?></h2>
2
+		<h3 style="padding:0;margin:-.5em 0 1em;"><?php echo $previous_transaction.'&nbsp;'; echo __('Transaction # ', 'event_espresso').$txn_nmbr['value']; echo '&nbsp;'.$next_transaction; ?></h3>
3
+		<h2 id="txn-date-h2" style="padding:0;margin:0 0 1em;"><?php echo $txn_datetime['value']; ?></h2>
4 4
 
5 5
 		<?php echo $send_payment_reminder_button; ?>
6 6
 		<h2 id="txn-status-h2" style="padding:0;margin:0 0 1em;">
7
-			<?php echo __( 'Transaction Status: ', 'event_espresso' );?><span id="txn-status" class="<?php echo $txn_status['class'];?>"><?php echo $txn_status['value'];?></span>
7
+			<?php echo __('Transaction Status: ', 'event_espresso'); ?><span id="txn-status" class="<?php echo $txn_status['class']; ?>"><?php echo $txn_status['value']; ?></span>
8 8
 		</h2>
9 9
 
10 10
 	<?php $attributes = $amount_due ? 'style="padding:0;margin:0 0 1em;"' : 'class="hidden" style="padding:0;margin:0 0 1em;"'; ?>
11 11
 		<h2 id="txn-amount-due-h2" <?php echo $attributes; ?>>
12
-			<?php echo __( 'Total Amount Due: ', 'event_espresso' );?><span id="txn-admin-total-amount-due" class="<?php echo $amount_due_class;?>"><?php echo $amount_due;?></span>
12
+			<?php echo __('Total Amount Due: ', 'event_espresso'); ?><span id="txn-admin-total-amount-due" class="<?php echo $amount_due_class; ?>"><?php echo $amount_due; ?></span>
13 13
 		</h2>
14 14
 
15 15
 		<h3 id="txn-selected-method-of-payment-h3" style="padding:0;margin:0 0 1em;">
16
-			<?php echo __( 'Last Method of Payment: ', 'event_espresso' );?><?php echo $method_of_payment_name;?>
16
+			<?php echo __('Last Method of Payment: ', 'event_espresso'); ?><?php echo $method_of_payment_name; ?>
17 17
 		</h3>
18 18
 
19 19
 
Please login to merge, or discard this patch.
templates/txn_admin_details_main_meta_box_attendees.template.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -5,25 +5,25 @@
 block discarded – undo
5 5
 		<table class="admin-primary-mbox-tbl">
6 6
 			<thead>
7 7
 				<tr>
8
-					<th class="jst-left"><?php _e( '#', 'event_espresso' );?></th>
9
-					<th class="jst-left"><?php _e( 'Event Name and Ticket', 'event_espresso' );?></th>
10
-					<th class="jst-left"><?php _e( 'Registrant', 'event_espresso' );?></th>
11
-					<th class="jst-rght"><?php _e( 'Ticket Price', 'event_espresso' );?></th>
12
-					<th class="jst-left"><?php _e( 'Email', 'event_espresso' );?></th>
13
-					<th class="jst-left"><?php _e( 'Address', 'event_espresso' );?></th>
8
+					<th class="jst-left"><?php _e('#', 'event_espresso'); ?></th>
9
+					<th class="jst-left"><?php _e('Event Name and Ticket', 'event_espresso'); ?></th>
10
+					<th class="jst-left"><?php _e('Registrant', 'event_espresso'); ?></th>
11
+					<th class="jst-rght"><?php _e('Ticket Price', 'event_espresso'); ?></th>
12
+					<th class="jst-left"><?php _e('Email', 'event_espresso'); ?></th>
13
+					<th class="jst-left"><?php _e('Address', 'event_espresso'); ?></th>
14 14
 				</tr>
15 15
 			</thead>
16 16
 			<tbody>
17
-		<?php if ( isset( $event_attendees ) && is_array( $event_attendees )) : ?>
18
-			<?php foreach ( $event_attendees as $registration => $attendee ) : ?>
17
+		<?php if (isset($event_attendees) && is_array($event_attendees)) : ?>
18
+			<?php foreach ($event_attendees as $registration => $attendee) : ?>
19 19
 				<tr>
20
-					<td class="jst-left"><?php echo $attendee['att_num'];?></td>
21
-					<td class="jst-left"><?php echo $attendee['event_ticket_name'];?></td>
20
+					<td class="jst-left"><?php echo $attendee['att_num']; ?></td>
21
+					<td class="jst-left"><?php echo $attendee['event_ticket_name']; ?></td>
22 22
 					<td class="jst-left">
23 23
 						<?php
24
-						$att_link = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'view_registration', '_REG_ID'=>$registration), REG_ADMIN_URL );
24
+						$att_link = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'view_registration', '_REG_ID'=>$registration), REG_ADMIN_URL);
25 25
 						?>
26
-						<a href="<?php echo $att_link; ?>" title="<?php _e( 'View details for this registrant', 'event_espresso' );?>">
26
+						<a href="<?php echo $att_link; ?>" title="<?php _e('View details for this registrant', 'event_espresso'); ?>">
27 27
 							<?php echo $attendee['attendee']?>
28 28
 						</a>
29 29
 					</td>
Please login to merge, or discard this patch.
templates/txn_admin_details_main_meta_box_txn_details.template.php 2 patches
Spacing   +113 added lines, -113 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <div id="admin-primary-mbox-dv" class="admin-primary-mbox-dv">
2 2
 
3 3
 	<h4 class="admin-primary-mbox-h4 hdr-has-icon">
4
-		<span class="dashicons dashicons-cart"></span><?php _e( 'Transaction Items', 'event_espresso' );?>
4
+		<span class="dashicons dashicons-cart"></span><?php _e('Transaction Items', 'event_espresso'); ?>
5 5
 	</h4>
6 6
 
7 7
 	<div class="admin-primary-mbox-tbl-wrap">
@@ -10,27 +10,27 @@  discard block
 block discarded – undo
10 10
 	</div>
11 11
 
12 12
 	<a id="display-additional-transaction-session-info" class="display-the-hidden smaller-text" rel="additional-transaction-session-info">
13
-		<span class="dashicons dashicons-plus-alt"></span><?php _e( 'view additional transaction session details', 'event_espresso' );?>
13
+		<span class="dashicons dashicons-plus-alt"></span><?php _e('view additional transaction session details', 'event_espresso'); ?>
14 14
 	</a>
15 15
 
16 16
 	<div id="additional-transaction-session-info-dv" class="hidden">
17 17
 
18 18
 		<a id="hide-additional-transaction-session-info" class="hide-the-displayed hidden smaller-text" rel="additional-transaction-session-info">
19
-			<span class="dashicons dashicons-dismiss"></span><?php _e( 'hide additional transaction session details', 'event_espresso' );?>
19
+			<span class="dashicons dashicons-dismiss"></span><?php _e('hide additional transaction session details', 'event_espresso'); ?>
20 20
 		</a>
21 21
 	<br class="clear"/>
22 22
 
23
-		<h4 class="admin-primary-mbox-h4"><?php _e( 'Transaction Session Details', 'event_espresso' );?></h4>
23
+		<h4 class="admin-primary-mbox-h4"><?php _e('Transaction Session Details', 'event_espresso'); ?></h4>
24 24
 
25 25
 		<table id="admin-primary-mbox-txn-extra-session-info-tbl" class="form-table skinny-rows">
26 26
 			<tbody>
27
-			<?php foreach ( $txn_details as $key => $txn_detail ) : ?>
27
+			<?php foreach ($txn_details as $key => $txn_detail) : ?>
28 28
 				<tr>
29 29
 					<th>
30
-						<label for="<?php echo $key;?>"><?php echo $txn_detail['label'];?></label>
30
+						<label for="<?php echo $key; ?>"><?php echo $txn_detail['label']; ?></label>
31 31
 					</th>
32 32
 					<td>
33
-						<?php echo $txn_detail['value'];?>
33
+						<?php echo $txn_detail['value']; ?>
34 34
 					</td>
35 35
 				</tr>
36 36
 			<?php endforeach; // $txn_details?>
@@ -40,10 +40,10 @@  discard block
 block discarded – undo
40 40
 	<br class="clear"/>
41 41
 
42 42
 
43
-	<?php if ( $attendee instanceof EE_Attendee && ( $grand_raw_total > 0 || $TXN_status != 'TCM' ) ) : ?>
43
+	<?php if ($attendee instanceof EE_Attendee && ($grand_raw_total > 0 || $TXN_status != 'TCM')) : ?>
44 44
 
45 45
 	<h4 class="admin-primary-mbox-h4 hdr-has-icon">
46
-		<span class="ee-icon ee-icon-cash"></span><?php _e( 'Payment Details', 'event_espresso' );?>
46
+		<span class="ee-icon ee-icon-cash"></span><?php _e('Payment Details', 'event_espresso'); ?>
47 47
 	</h4>
48 48
 
49 49
 	<div class="admin-primary-mbox-tbl-wrap">
@@ -52,75 +52,75 @@  discard block
 block discarded – undo
52 52
 				<tr>
53 53
 					<th></th>
54 54
 					<th class="jst-cntr"></th>
55
-					<th class="jst-cntr"><?php _e( 'ID', 'event_espresso' );?></th>
56
-					<th class="jst-left"><?php _e( 'Date', 'event_espresso' );?></th>
57
-					<th class="jst-cntr"><?php _e( 'Source', 'event_espresso' );?></th>
58
-					<th class="jst-left"><?php _e( 'Method', 'event_espresso' );?></th>
59
-					<th class="jst-left"><?php _e( 'Gateway Response', 'event_espresso' );?></th>
60
-					<th class="jst-left"><?php _e( 'TXN&nbsp;ID / CHQ&nbsp;#', 'event_espresso' );?></th>
61
-					<th class="jst-left"><?php _e( 'P.O. / S.O.&nbsp;#', 'event_espresso' );?></th>
62
-					<th class="jst-left"><?php _e( 'Notes / Extra&nbsp;Accounting', 'event_espresso' );?></th>
63
-					<!--<th class="jst-left"><?php _e( 'Details', 'event_espresso' );?></th>-->
64
-					<th class="jst-cntr"><?php _e( 'Amount', 'event_espresso' );?></th>
55
+					<th class="jst-cntr"><?php _e('ID', 'event_espresso'); ?></th>
56
+					<th class="jst-left"><?php _e('Date', 'event_espresso'); ?></th>
57
+					<th class="jst-cntr"><?php _e('Source', 'event_espresso'); ?></th>
58
+					<th class="jst-left"><?php _e('Method', 'event_espresso'); ?></th>
59
+					<th class="jst-left"><?php _e('Gateway Response', 'event_espresso'); ?></th>
60
+					<th class="jst-left"><?php _e('TXN&nbsp;ID / CHQ&nbsp;#', 'event_espresso'); ?></th>
61
+					<th class="jst-left"><?php _e('P.O. / S.O.&nbsp;#', 'event_espresso'); ?></th>
62
+					<th class="jst-left"><?php _e('Notes / Extra&nbsp;Accounting', 'event_espresso'); ?></th>
63
+					<!--<th class="jst-left"><?php _e('Details', 'event_espresso'); ?></th>-->
64
+					<th class="jst-cntr"><?php _e('Amount', 'event_espresso'); ?></th>
65 65
 				</tr>
66 66
 			</thead>
67 67
 			<tbody>
68
-		<?php if ( $payments ) : ?>
68
+		<?php if ($payments) : ?>
69 69
 			<?php $payment_total = 0; ?>
70
-			<?php foreach ( $payments as $PAY_ID => $payment ) : ?>
71
-				<tr id="txn-admin-payment-tr-<?php echo $PAY_ID;?>">
70
+			<?php foreach ($payments as $PAY_ID => $payment) : ?>
71
+				<tr id="txn-admin-payment-tr-<?php echo $PAY_ID; ?>">
72 72
 					<td>
73 73
 						<span id="payment-status-<?php echo $PAY_ID; ?>" class="ee-status-strip-td ee-status-strip pymt-status-<?php echo $payment->STS_ID(); ?>"></span>
74
-						<div id="payment-STS_ID-<?php echo $PAY_ID;?>" class="hidden"><?php echo $payment->STS_ID();?></div>
75
-						<div id="reg-payments-<?php echo $PAY_ID;?>" class="hidden"><?php echo json_encode( $existing_reg_payments[ $PAY_ID ] );?></div>
74
+						<div id="payment-STS_ID-<?php echo $PAY_ID; ?>" class="hidden"><?php echo $payment->STS_ID(); ?></div>
75
+						<div id="reg-payments-<?php echo $PAY_ID; ?>" class="hidden"><?php echo json_encode($existing_reg_payments[$PAY_ID]); ?></div>
76 76
 					</td>
77 77
 					<td class=" jst-cntr">
78 78
 						<ul class="txn-overview-actions-ul">
79 79
 							<li>
80
-								<a class="txn-admin-payment-action-edit-lnk" title="<?php esc_attr_e( 'Edit Payment', 'event_espresso' );?>" data-payment-id="<?php echo $PAY_ID;?>">
80
+								<a class="txn-admin-payment-action-edit-lnk" title="<?php esc_attr_e('Edit Payment', 'event_espresso'); ?>" data-payment-id="<?php echo $PAY_ID; ?>">
81 81
 									<div class="dashicons dashicons-edit" style="margin: 0;"></div>
82 82
 								</a>
83 83
 							</li>
84 84
 							<li>
85
-								<a class="txn-admin-payment-action-delete-lnk" title="<?php esc_attr_e( 'Delete Payment', 'event_espresso' );?>" data-payment-id="<?php echo $PAY_ID;?>">
85
+								<a class="txn-admin-payment-action-delete-lnk" title="<?php esc_attr_e('Delete Payment', 'event_espresso'); ?>" data-payment-id="<?php echo $PAY_ID; ?>">
86 86
 									<div class="dashicons dashicons-trash" style="margin: 0;"></div>
87 87
 								</a>
88 88
 							</li>
89 89
 						</ul>
90 90
 					</td>
91 91
 					<td class=" jst-rght">
92
-						<div id="payment-id-<?php echo $PAY_ID;?>"><?php echo $PAY_ID;?></div>
92
+						<div id="payment-id-<?php echo $PAY_ID; ?>"><?php echo $PAY_ID; ?></div>
93 93
 					</td>
94 94
 					<td class=" jst-left">
95
-						<div id="payment-date-<?php echo $PAY_ID;?>" class="payment-date-dv"><?php echo $payment->timestamp('Y-m-d', 'h:i a');?></div>
95
+						<div id="payment-date-<?php echo $PAY_ID; ?>" class="payment-date-dv"><?php echo $payment->timestamp('Y-m-d', 'h:i a'); ?></div>
96 96
 					</td>
97 97
 					<td class=" jst-cntr">
98
-						<div id="payment-method-<?php echo $PAY_ID;?>">
99
-							<?php echo $payment->source();?>
98
+						<div id="payment-method-<?php echo $PAY_ID; ?>">
99
+							<?php echo $payment->source(); ?>
100 100
 						</div>
101 101
 					</td>
102 102
 					<td class=" jst-left">
103
-						<div id="payment-gateway-<?php echo $PAY_ID;?>">
104
-							<?php echo $payment->payment_method() ?  $payment->payment_method()->admin_name() : __("Unknown", 'event_espresso');?>
103
+						<div id="payment-gateway-<?php echo $PAY_ID; ?>">
104
+							<?php echo $payment->payment_method() ? $payment->payment_method()->admin_name() : __("Unknown", 'event_espresso'); ?>
105 105
 						</div>
106
-						<div id="payment-gateway-id-<?php echo $PAY_ID;?>" class="hidden"><?php echo $payment->payment_method() ? $payment->payment_method()->ID() : 0;?></div>
106
+						<div id="payment-gateway-id-<?php echo $PAY_ID; ?>" class="hidden"><?php echo $payment->payment_method() ? $payment->payment_method()->ID() : 0; ?></div>
107 107
 					</td>
108 108
 					<td class=" jst-left">
109
-						<div id="payment-response-<?php echo $PAY_ID;?>"><?php echo $payment->gateway_response();?></div>
109
+						<div id="payment-response-<?php echo $PAY_ID; ?>"><?php echo $payment->gateway_response(); ?></div>
110 110
 					</td>
111 111
 					<td class=" jst-left">
112
-						<div id="payment-txn-id-chq-nmbr-<?php echo $PAY_ID;?>"><?php echo $payment->txn_id_chq_nmbr();?></div>
112
+						<div id="payment-txn-id-chq-nmbr-<?php echo $PAY_ID; ?>"><?php echo $payment->txn_id_chq_nmbr(); ?></div>
113 113
 					</td>
114 114
 					<td class=" jst-left">
115
-						<div id="payment-po-nmbr-<?php echo $PAY_ID;?>"><?php echo $payment->po_number();?></div>
115
+						<div id="payment-po-nmbr-<?php echo $PAY_ID; ?>"><?php echo $payment->po_number(); ?></div>
116 116
 					</td>
117 117
 					<td class=" jst-left">
118
-						<div id="payment-accntng-<?php echo $PAY_ID;?>"><?php echo $payment->extra_accntng();?></div>
118
+						<div id="payment-accntng-<?php echo $PAY_ID; ?>"><?php echo $payment->extra_accntng(); ?></div>
119 119
 					</td>
120 120
 					<td class=" jst-rght">
121
-						<?php $payment_class = $payment->amount() > 0 ? 'txn-admin-payment-status-' . $payment->STS_ID() : 'txn-admin-payment-status-PDC'; ?>
122
-						<span class="<?php echo $payment_class;?>">
123
-							<div id="payment-amount-<?php echo $PAY_ID;?>" style="display:inline;"><?php echo EEH_Template::format_currency($payment->amount(), FALSE, FALSE ); ?></div>
121
+						<?php $payment_class = $payment->amount() > 0 ? 'txn-admin-payment-status-'.$payment->STS_ID() : 'txn-admin-payment-status-PDC'; ?>
122
+						<span class="<?php echo $payment_class; ?>">
123
+							<div id="payment-amount-<?php echo $PAY_ID; ?>" style="display:inline;"><?php echo EEH_Template::format_currency($payment->amount(), FALSE, FALSE); ?></div>
124 124
 						</span>
125 125
 					</td>
126 126
 				</tr>
@@ -130,25 +130,25 @@  discard block
 block discarded – undo
130 130
 			<?php endforeach; // $payment?>
131 131
 			<?php
132 132
 				$pay_totals_class = $payment_total > $grand_raw_total ? ' important-notice' : '';
133
-				$overpaid = $payment_total > $grand_raw_total ? '<span id="overpaid">' . __( 'This transaction has been overpaid ! ', 'event_espresso' ) . '</span>' : '';
133
+				$overpaid = $payment_total > $grand_raw_total ? '<span id="overpaid">'.__('This transaction has been overpaid ! ', 'event_espresso').'</span>' : '';
134 134
 			?>
135 135
 				<tr id="txn-admin-no-payments-tr" class="admin-primary-mbox-total-tr hidden">
136 136
 					<td class=" jst-rght" colspan="11">
137
-						<span class="important-notice"><?php _e( 'No payments have been applied to this transaction yet. Click "Apply Payment" below to make a payment.', 'event_espresso' ); ?></span>
137
+						<span class="important-notice"><?php _e('No payments have been applied to this transaction yet. Click "Apply Payment" below to make a payment.', 'event_espresso'); ?></span>
138 138
 					</td>
139 139
 				</tr>
140
-				<tr id="txn-admin-payments-total-tr" class="admin-primary-mbox-total-tr<?php echo $pay_totals_class;?>">
141
-					<th class=" jst-rght" colspan="10"><span id="payments-total-spn"><?php echo $overpaid . sprintf( __( 'Payments Total %s', 'event_espresso' ), '(' . EE_Registry::instance()->CFG->currency->code . ')' );?></span></th>
142
-					<th class=" jst-rght"><span id="txn-admin-payment-total"><?php echo EEH_Template::format_currency($payment_total, FALSE, FALSE);?></span></th>
140
+				<tr id="txn-admin-payments-total-tr" class="admin-primary-mbox-total-tr<?php echo $pay_totals_class; ?>">
141
+					<th class=" jst-rght" colspan="10"><span id="payments-total-spn"><?php echo $overpaid.sprintf(__('Payments Total %s', 'event_espresso'), '('.EE_Registry::instance()->CFG->currency->code.')'); ?></span></th>
142
+					<th class=" jst-rght"><span id="txn-admin-payment-total"><?php echo EEH_Template::format_currency($payment_total, FALSE, FALSE); ?></span></th>
143 143
 				</tr>
144 144
 		<?php else : ?>
145 145
 				<tr id="txn-admin-no-payments-tr" class="admin-primary-mbox-total-tr">
146 146
 					<td class=" jst-rght" colspan="11">
147
-						<span class="important-notice"><?php _e( 'No payments have been applied to this transaction yet. Click "Apply Payment" below to make a payment.', 'event_espresso' ); ?></span>
147
+						<span class="important-notice"><?php _e('No payments have been applied to this transaction yet. Click "Apply Payment" below to make a payment.', 'event_espresso'); ?></span>
148 148
 					</td>
149 149
 				</tr>
150 150
 				<tr id="txn-admin-payments-total-tr" class="admin-primary-mbox-total-tr hidden">
151
-					<th class=" jst-rght" colspan="10"><span id="payments-total-spn"><?php echo __( 'Payments Total', 'event_espresso' );?></span></th>
151
+					<th class=" jst-rght" colspan="10"><span id="payments-total-spn"><?php echo __('Payments Total', 'event_espresso'); ?></span></th>
152 152
 					<th class=" jst-rght"><span id="txn-admin-payment-total"></span></th>
153 153
 				</tr>
154 154
 		<?php endif; // $payments?>
@@ -161,12 +161,12 @@  discard block
 block discarded – undo
161 161
 					<td class=" jst-cntr">
162 162
 						<ul class="txn-overview-actions-ul">
163 163
 							<li>
164
-								<a class="txn-admin-payment-action-edit-lnk" title="<?php esc_attr_e( 'Edit Payment', 'event_espresso' );?>" data-payment-id="PAY_ID">
164
+								<a class="txn-admin-payment-action-edit-lnk" title="<?php esc_attr_e('Edit Payment', 'event_espresso'); ?>" data-payment-id="PAY_ID">
165 165
 									<div class="dashicons dashicons-edit" style="margin: 0;"></div>
166 166
 								</a>
167 167
 							</li>
168 168
 							<li>
169
-								<a class="txn-admin-payment-action-delete-lnk" title="<?php esc_attr_e( 'Delete Payment', 'event_espresso' );?>" data-payment-id="PAY_ID">
169
+								<a class="txn-admin-payment-action-delete-lnk" title="<?php esc_attr_e('Delete Payment', 'event_espresso'); ?>" data-payment-id="PAY_ID">
170 170
 									<div class="dashicons dashicons-trash" style="margin: 0;"></div>
171 171
 								</a>
172 172
 							</li>
@@ -213,12 +213,12 @@  discard block
 block discarded – undo
213 213
 	<ul id="txn-admin-payment-options-ul">
214 214
 		<li>
215 215
 			<a id="display-txn-admin-apply-payment" class="button-primary no-icon no-hide" rel="txn-admin-apply-payment" > <!--display-the-hidden -->
216
-				<?php _e( 'Apply Payment', 'event_espresso' );?>
216
+				<?php _e('Apply Payment', 'event_espresso'); ?>
217 217
 			</a>
218 218
 		</li>
219 219
 		<li>
220 220
 			<a id="display-txn-admin-apply-refund" class="button-secondary no-icon no-hide" rel="txn-admin-apply-refund" >  <!--display-the-hidden -->
221
-				<?php _e( 'Apply Refund', 'event_espresso' );?>
221
+				<?php _e('Apply Refund', 'event_espresso'); ?>
222 222
 			</a>
223 223
 		</li>
224 224
 	</ul>
@@ -228,14 +228,14 @@  discard block
 block discarded – undo
228 228
 
229 229
 		<h2 id="admin-modal-dialog-apply-payment-h2" class="admin-modal-dialog-h2 hdr-has-icon" style="display:none;">
230 230
 			<div class="ee-icon ee-icon-cash-add float-left"></div>
231
-			<?php echo __( 'Apply a Payment to Transaction #', 'event_espresso' ) . $txn_nmbr['value'];?>
231
+			<?php echo __('Apply a Payment to Transaction #', 'event_espresso').$txn_nmbr['value']; ?>
232 232
 		</h2>
233 233
 
234 234
 		<h2 id="admin-modal-dialog-edit-payment-h2" class="admin-modal-dialog-h2 hdr-has-icon" style="display:none;">
235 235
 			<div class="ee-icon ee-icon-cash-edit float-left"></div>
236 236
 			<?php
237 237
 			echo sprintf(
238
-				__( 'Edit Payment #%s for Transaction #%s', 'event_espresso' ),
238
+				__('Edit Payment #%s for Transaction #%s', 'event_espresso'),
239 239
 				'<span></span>',
240 240
 				$txn_nmbr['value']
241 241
 			);
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
 			<div class="ee-icon ee-icon-cash-edit float-left"></div>
247 247
 			<?php
248 248
 			echo sprintf(
249
-				__( 'Edit Refund #%s for Transaction #%s', 'event_espresso' ),
249
+				__('Edit Refund #%s for Transaction #%s', 'event_espresso'),
250 250
 				'<span></span>',
251 251
 				$txn_nmbr['value']
252 252
 			);
@@ -255,14 +255,14 @@  discard block
 block discarded – undo
255 255
 
256 256
 		<h2 id="admin-modal-dialog-apply-refund-h2" class="admin-modal-dialog-h2 hdr-has-icon" style="display:none;">
257 257
 			<div class="ee-icon ee-icon-cash-remove float-left"></div>
258
-			<?php echo __( 'Apply a Refund to Transaction #', 'event_espresso' ) . $txn_nmbr['value'];?>
258
+			<?php echo __('Apply a Refund to Transaction #', 'event_espresso').$txn_nmbr['value']; ?>
259 259
 		</h2>
260 260
 
261 261
 		<form name="txn-admin-apply-payment-frm" id="txn-admin-apply-payment-frm" action="<?php echo $apply_payment_form_url; ?>">
262 262
 			<div class="admin-modal-dialog-wrap">
263 263
 				<div class="admin-modal-dialog-inner">
264 264
 
265
-					<input  type="hidden" name="espresso_apply_payment_nonce" id="espresso_apply_payment_nonce" value="<?php echo wp_create_nonce( 'espresso_apply_payment_nonce' );?>"/>
265
+					<input  type="hidden" name="espresso_apply_payment_nonce" id="espresso_apply_payment_nonce" value="<?php echo wp_create_nonce('espresso_apply_payment_nonce'); ?>"/>
266 266
 					<input  type="hidden" name="espresso_ajax" id="espresso-ajax" value="0"/>
267 267
 					<input  type="hidden" name="noheader" id="txn-admin-noheader-inp" value="0"/>
268 268
 					<input  type="hidden" name="txn_admin_payment[PAY_ID]" id="txn-admin-payment-payment-id-inp" class="txn-admin-apply-payment-inp" value="0"/>
@@ -270,99 +270,99 @@  discard block
 block discarded – undo
270 270
 					<input  type="hidden" name="txn_admin_payment[type]" id="txn-admin-payment-type-inp" value="1"/>
271 271
 					<input  type="hidden" name="txn_admin_payment[details]" id="txn-admin-payment-details-inp" value=""/>
272 272
 					<input  type="hidden" name="txn_admin_delete_payment_form_url" id="txn-admin-delete-payment-form-url-inp" value="<?php echo $delete_payment_form_url; ?>"/>
273
-					<input  type="hidden" name="txn_admin_todays_date" id="txn-admin-todays-date-inp" value="<?php echo date( 'Y-m-d h:i a', current_time( 'timestamp' )); ?>"/>
273
+					<input  type="hidden" name="txn_admin_todays_date" id="txn-admin-todays-date-inp" value="<?php echo date('Y-m-d h:i a', current_time('timestamp')); ?>"/>
274 274
 
275 275
 					<div class="txn-admin-apply-payment-date-dv admin-modal-dialog-row">
276
-						<div class="validation-notice-dv"><?php _e( 'The following is  a required field', 'event_espresso' );?></div>
277
-						<label for="txn-admin-payment-date-inp" class=""><?php _e( 'Payment Date', 'event_espresso' );?></label>
278
-						<input name="txn_admin_payment[date]" id="txn-admin-payment-date-inp" class="txn-admin-apply-payment-inp required" type="text" value="<?php echo date( 'Y-m-d h:i a', current_time( 'timestamp' )); ?>"/>
279
-						<p class="description"><?php _e( 'The date the payment was actually made on', 'event_espresso' );?></p>
276
+						<div class="validation-notice-dv"><?php _e('The following is  a required field', 'event_espresso'); ?></div>
277
+						<label for="txn-admin-payment-date-inp" class=""><?php _e('Payment Date', 'event_espresso'); ?></label>
278
+						<input name="txn_admin_payment[date]" id="txn-admin-payment-date-inp" class="txn-admin-apply-payment-inp required" type="text" value="<?php echo date('Y-m-d h:i a', current_time('timestamp')); ?>"/>
279
+						<p class="description"><?php _e('The date the payment was actually made on', 'event_espresso'); ?></p>
280 280
 					</div>
281 281
 
282 282
 					<div class="txn-admin-apply-payment-amount-dv admin-modal-dialog-row">
283
-						<div class="validation-notice-dv"><?php _e( 'The following is  a required field', 'event_espresso' );?></div>
284
-						<label for="txn-admin-payment-amount-inp" class=""><?php _e( 'Amount', 'event_espresso' );?></label>
283
+						<div class="validation-notice-dv"><?php _e('The following is  a required field', 'event_espresso'); ?></div>
284
+						<label for="txn-admin-payment-amount-inp" class=""><?php _e('Amount', 'event_espresso'); ?></label>
285 285
 						<input name="txn_admin_payment[amount]" id="txn-admin-payment-amount-inp" class="txn-admin-apply-payment-inp required" type="text" value=""/>
286
-						<p class="description"><?php _e( 'The amount of the payment', 'event_espresso' );?></p>
286
+						<p class="description"><?php _e('The amount of the payment', 'event_espresso'); ?></p>
287 287
 					</div>
288 288
 
289 289
 					<div class="txn-admin-apply-payment-method-dv admin-modal-dialog-row">
290
-						<div class="validation-notice-dv"><?php _e( 'The following is  a required field', 'event_espresso' );?></div>
291
-						<label for="txn-admin-payment-method-inp" class=""><?php _e( 'Method of Payment', 'event_espresso' );?></label>
290
+						<div class="validation-notice-dv"><?php _e('The following is  a required field', 'event_espresso'); ?></div>
291
+						<label for="txn-admin-payment-method-inp" class=""><?php _e('Method of Payment', 'event_espresso'); ?></label>
292 292
 						<select name="txn_admin_payment[PMD_ID]" id="txn-admin-payment-method-slct" class="txn-admin-apply-payment-slct required" type="text" >
293
-						<?php foreach ( $payment_methods as $method ) : ?>
293
+						<?php foreach ($payment_methods as $method) : ?>
294 294
 							<?php $selected = $method->slug() == 'cash' ? ' selected="selected"' : ''; ?>
295
-							<option id="payment-method-opt-<?php echo $method->slug(); ?>" value="<?php echo $method->ID(); ?>"<?php echo $selected; ?>><?php echo sanitize_key( $method->admin_desc() ) ? substr( $method->admin_desc(), 0, 128) : $method->admin_name() ; ?>&nbsp;&nbsp;</option>
295
+							<option id="payment-method-opt-<?php echo $method->slug(); ?>" value="<?php echo $method->ID(); ?>"<?php echo $selected; ?>><?php echo sanitize_key($method->admin_desc()) ? substr($method->admin_desc(), 0, 128) : $method->admin_name(); ?>&nbsp;&nbsp;</option>
296 296
 						<?php endforeach; ?>
297 297
 						</select>
298
-						<p class="description"><?php _e( 'Whether the payment was made via PayPal, Credit Card, Cheque, or Cash', 'event_espresso' );?></p>
298
+						<p class="description"><?php _e('Whether the payment was made via PayPal, Credit Card, Cheque, or Cash', 'event_espresso'); ?></p>
299 299
 					</div>
300 300
 
301 301
 					<div class="mop-PP mop-CC mop-CHQ mop">
302 302
 						<div class="txn-admin-apply-payment-gw-txn-id-dv admin-modal-dialog-row">
303
-							<label for="txn-admin-payment-txn-id-inp" class=""><?php _e( 'TXN ID / CHQ #', 'event_espresso' );?></label>
303
+							<label for="txn-admin-payment-txn-id-inp" class=""><?php _e('TXN ID / CHQ #', 'event_espresso'); ?></label>
304 304
 							<input name="txn_admin_payment[txn_id_chq_nmbr]" id="txn-admin-payment-txn-id-chq-nmbr-inp" class="txn-admin-apply-payment-inp" type="text"/>
305
-							<p class="description"><?php _e( 'The Transaction ID sent back from the payment gateway, or the Cheque #', 'event_espresso' );?></p>
305
+							<p class="description"><?php _e('The Transaction ID sent back from the payment gateway, or the Cheque #', 'event_espresso'); ?></p>
306 306
 						</div>
307 307
 					</div>
308 308
 
309 309
 					<div class="mop-CC mop" style="display:none">
310 310
 						<div class="txn-admin-apply-payment-response-dv admin-modal-dialog-row">
311
-							<label for="txn-admin-payment-gateway-response-inp" class=""><?php _e( 'Gateway Response', 'event_espresso' );?></label>
311
+							<label for="txn-admin-payment-gateway-response-inp" class=""><?php _e('Gateway Response', 'event_espresso'); ?></label>
312 312
 							<input name="txn_admin_payment[gateway_response]" id="txn-admin-payment-gateway-response-inp" class="txn-admin-apply-payment-inp" type="text"/>
313
-							<p class="description"><?php _e( 'The gateway response string (optional)', 'event_espresso' );?></p>
313
+							<p class="description"><?php _e('The gateway response string (optional)', 'event_espresso'); ?></p>
314 314
 						</div>
315 315
 					</div>
316 316
 
317 317
 					<div class="mop-PP mop-CC mop">
318 318
 						<div class="txn-admin-apply-payment-status-dv admin-modal-dialog-row">
319
-							<label for="txn-admin-payment-status-inp" class=""><?php _e( 'Payment Status', 'event_espresso' );?></label>
319
+							<label for="txn-admin-payment-status-inp" class=""><?php _e('Payment Status', 'event_espresso'); ?></label>
320 320
 							<select name="txn_admin_payment[status]" id="txn-admin-payment-status-slct" class="txn-admin-apply-payment-slct" type="text" >
321
-							<?php foreach ( $payment_status as $STS_ID => $STS_code ) : ?>
321
+							<?php foreach ($payment_status as $STS_ID => $STS_code) : ?>
322 322
 								<?php $selected = $STS_ID == 'PAP' ? ' selected="selected"' : ''; ?>
323 323
 								<option id="payment-status-opt-<?php echo $STS_ID; ?>" value="<?php echo $STS_ID; ?>"<?php echo $selected; ?>><?php echo $STS_code; ?>&nbsp;&nbsp;</option>
324 324
 							<?php endforeach; ?>
325 325
 							</select>
326
-							<p class="description"><?php _e( 'Whether the payment was approved, cancelled, declined or failed after submission to the gateway', 'event_espresso' );?></p>
326
+							<p class="description"><?php _e('Whether the payment was approved, cancelled, declined or failed after submission to the gateway', 'event_espresso'); ?></p>
327 327
 						</div>
328 328
 					</div>
329 329
 
330 330
 					<div class="txn-admin-apply-payment-po-nmbr-dv admin-modal-dialog-row">
331
-						<label for="txn-admin-payment-po-nmbr-inp" class=""><?php _e( 'P.O. / S.O. #', 'event_espresso' );?></label>
331
+						<label for="txn-admin-payment-po-nmbr-inp" class=""><?php _e('P.O. / S.O. #', 'event_espresso'); ?></label>
332 332
 						<input name="txn_admin_payment[po_number]" id="txn-admin-payment-po-nmbr-inp" class="txn-admin-apply-payment-inp" type="text"/>
333
-						<p class="description"><?php _e( 'The Purchase or Sales Order Number if any (optional)', 'event_espresso' );?></p>
333
+						<p class="description"><?php _e('The Purchase or Sales Order Number if any (optional)', 'event_espresso'); ?></p>
334 334
 					</div>
335 335
 
336 336
 					<div class="txn-admin-apply-payment-accounting-dv admin-modal-dialog-row">
337
-						<label for="txn-admin-payment-accounting-inp" class="last"><?php _e( 'Notes / Extra Accounting', 'event_espresso' );?></label>
337
+						<label for="txn-admin-payment-accounting-inp" class="last"><?php _e('Notes / Extra Accounting', 'event_espresso'); ?></label>
338 338
 						<input name="txn_admin_payment[accounting]" id="txn-admin-payment-accounting-inp" class="txn-admin-apply-payment-inp" type="text" value="<?php echo $REG_code; ?>"/>		<input type="hidden" id="txn-admin-reg-code-inp" value="<?php echo $REG_code; ?>"/>
339
-						<p class="description"><?php _e( 'An extra field you may use for accounting purposes or simple notes. Defaults to the primary registrant\'s registration code.', 'event_espresso' );?></p>
339
+						<p class="description"><?php _e('An extra field you may use for accounting purposes or simple notes. Defaults to the primary registrant\'s registration code.', 'event_espresso'); ?></p>
340 340
 					</div>
341 341
 
342 342
 					<div class="txn-admin-apply-payment-registrations-dv admin-modal-dialog-row">
343
-						<label for="txn-admin-payment-registrations-inp" class="last"><?php _e( 'Registrations to Apply Payment to:', 'event_espresso' ); ?></label>
343
+						<label for="txn-admin-payment-registrations-inp" class="last"><?php _e('Registrations to Apply Payment to:', 'event_espresso'); ?></label>
344 344
 						<label class="txn-admin-apply-payment-to-registrations-lbl">
345 345
 							<input type="radio" value="1" id="txn-admin-apply-payment-to-all-registrations-inp" name="txn_admin_payment[apply_to_all_registrations]"  checked="checked"/>
346
-							<?php _e( 'ALL Registrations', 'event_espresso' ); ?>
346
+							<?php _e('ALL Registrations', 'event_espresso'); ?>
347 347
 						</label>
348 348
 						<label class="txn-admin-apply-payment-to-registrations-lbl">
349 349
 							<input type="radio" value="0" id="txn-admin-apply-payment-to-some-registrations-inp" name="txn_admin_payment[apply_to_all_registrations]" />
350
-							<?php _e( 'Just the following Registrations', 'event_espresso' ); ?>
350
+							<?php _e('Just the following Registrations', 'event_espresso'); ?>
351 351
 						</label>
352 352
 						<?php echo $registrations_to_apply_payment_to; ?>
353 353
 					</div>
354 354
 
355 355
 					<div class="txn-admin-payment-reg-status-dv admin-modal-dialog-row">
356
-						<label for="txn-admin-payment-reg-status-inp" class="last"><?php _e( 'Change Registration Status?', 'event_espresso' );?></label>
356
+						<label for="txn-admin-payment-reg-status-inp" class="last"><?php _e('Change Registration Status?', 'event_espresso'); ?></label>
357 357
 						<?php echo $status_change_select; ?>
358
-						<p class="description"><?php _e( 'If you wish to change the status for the registrations selected above, then select which status from this dropdown.', 'event_espresso' ); ?></p>
358
+						<p class="description"><?php _e('If you wish to change the status for the registrations selected above, then select which status from this dropdown.', 'event_espresso'); ?></p>
359 359
 						<br/>
360 360
 					</div>
361 361
 
362 362
 					<div class="txn-admin-apply-payment-send-notifications-dv admin-modal-dialog-row">
363
-						<label for="txn-admin-payment-send-notifications-inp" class="last"><?php _e( 'Send Related Messages?', 'event_espresso' );?></label>
363
+						<label for="txn-admin-payment-send-notifications-inp" class="last"><?php _e('Send Related Messages?', 'event_espresso'); ?></label>
364 364
 						<input type="checkbox" value="1" name="txn_reg_status_change[send_notifications]">
365
-						<p class="description"><?php printf( __('By default %1$sa payment message is sent to the primary registrant%2$s after submitting this form.%3$sHowever, if you check this box, the system will also send any related messages matching the status of the registrations to %1$search registration for this transaction%2$s.', 'event_espresso'), '<strong>', '</strong>', '<br />' ); ?></p>
365
+						<p class="description"><?php printf(__('By default %1$sa payment message is sent to the primary registrant%2$s after submitting this form.%3$sHowever, if you check this box, the system will also send any related messages matching the status of the registrations to %1$search registration for this transaction%2$s.', 'event_espresso'), '<strong>', '</strong>', '<br />'); ?></p>
366 366
 						<label></label>
367 367
 					</div>
368 368
 					<div class="clear"></div>
@@ -373,27 +373,27 @@  discard block
 block discarded – undo
373 373
 			<ul id="admin-modal-dialog-options-ul">
374 374
 				<li>
375 375
 					<a id="txn-admin-modal-dialog-apply-payment-lnk" class="button-primary no-icon" style="display:none;" >
376
-						<?php _e( 'Apply Payment', 'event_espresso' );?>
376
+						<?php _e('Apply Payment', 'event_espresso'); ?>
377 377
 					</a>
378 378
 				</li>
379 379
 				<li>
380 380
 					<a id="txn-admin-modal-dialog-edit-payment-lnk" class="button-primary no-icon" style="display:none;" >
381
-						<?php _e( 'Save Payment Details', 'event_espresso' );?>
381
+						<?php _e('Save Payment Details', 'event_espresso'); ?>
382 382
 					</a>
383 383
 				</li>
384 384
 				<li>
385 385
 					<a id="txn-admin-modal-dialog-edit-refund-lnk" class="button-primary no-icon" style="display:none;" >
386
-						<?php _e( 'Save Refund Details', 'event_espresso' );?>
386
+						<?php _e('Save Refund Details', 'event_espresso'); ?>
387 387
 					</a>
388 388
 				</li>
389 389
 				<li>
390 390
 					<a id="txn-admin-modal-dialog-apply-refund-lnk" class="button-primary no-icon" style="display:none;" >
391
-						<?php _e( 'Apply Refund', 'event_espresso' );?>
391
+						<?php _e('Apply Refund', 'event_espresso'); ?>
392 392
 					</a>
393 393
 				</li>
394 394
 				<li>
395 395
 					<a id="txn-admin-modal-dialog-cancel-lnk" class="button-secondary no-icon" >
396
-						<?php _e( 'Cancel', 'event_espresso' );?>
396
+						<?php _e('Cancel', 'event_espresso'); ?>
397 397
 					</a>
398 398
 				</li>
399 399
 				<li>
@@ -410,29 +410,29 @@  discard block
 block discarded – undo
410 410
 
411 411
 		<h2 id="admin-modal-dialog-delete-payment-h2" class="admin-modal-dialog-h2 hdr-has-icon" style="display:none;">
412 412
 			<span class="ee-icon ee-icon-cash-add"></span>
413
-			<?php echo __( 'Delete Payment/Refund for Transaction #', 'event_espresso' ) . $txn_nmbr['value'];?>
413
+			<?php echo __('Delete Payment/Refund for Transaction #', 'event_espresso').$txn_nmbr['value']; ?>
414 414
 		</h2>
415 415
 
416 416
 		<form name="txn-admin-delete-payment-frm" id="txn-admin-delete-payment-frm" action="<?php echo $delete_payment_url; ?>">
417 417
 			<div class="admin-modal-dialog-wrap">
418 418
 				<div class="admin-modal-dialog-inner">
419 419
 
420
-					<input  type="hidden" name="espresso_delete_payment_nonce" id="espresso_delete_payment_nonce" value="<?php echo wp_create_nonce( 'espresso_delete_payment_nonce' );?>"/>
420
+					<input  type="hidden" name="espresso_delete_payment_nonce" id="espresso_delete_payment_nonce" value="<?php echo wp_create_nonce('espresso_delete_payment_nonce'); ?>"/>
421 421
 					<input  type="hidden" name="delete_espresso_ajax" id="delete-espresso-ajax" value="0"/>
422 422
 					<input  type="hidden" name="delete_noheader" id="delete-txn-admin-noheader-inp" value="0"/>
423 423
 					<input  type="hidden" name="delete_txn_admin_payment[PAY_ID]" id="delete-txn-admin-payment-payment-id-inp" class="txn-admin-apply-payment-inp" value="0"/>
424 424
 					<input  type="hidden" name="delete_txn_admin_payment[TXN_ID]" id="delete-txn-admin-payment-txn-id-inp" value="<?php echo $txn_nmbr['value']; ?>"/>
425 425
 
426 426
 					<div class="txn-admin-apply-payment-accounting-dv admin-modal-dialog-row">
427
-						<label for="delete-txn-admin-payment-reg-status-inp" class="last"><?php _e( 'Change Registration Status?', 'event_espresso' );?></label>
427
+						<label for="delete-txn-admin-payment-reg-status-inp" class="last"><?php _e('Change Registration Status?', 'event_espresso'); ?></label>
428 428
 						<?php echo $delete_status_change_select; ?>
429
-						<p class="description"><?php printf( __('If you wish to change the status of all the registrations associated with this transaction after deleting this payment/refund, then select which status from this dropdown. %sNote: ALL registrations associated with this transaction will be updated to this new status.%s', 'event_espresso'), '<strong>', '</strong>' ); ?></p>
429
+						<p class="description"><?php printf(__('If you wish to change the status of all the registrations associated with this transaction after deleting this payment/refund, then select which status from this dropdown. %sNote: ALL registrations associated with this transaction will be updated to this new status.%s', 'event_espresso'), '<strong>', '</strong>'); ?></p>
430 430
 					</div>
431 431
 
432 432
 					<div class="ee-attention txn-admin-apply-payment-accounting-dv admin-modal-dialog-row">
433
-						<label for="delete-txn-admin-payment-accounting-inp" class="last"><?php _e( 'Send Related Messages?', 'event_espresso' );?></label>
433
+						<label for="delete-txn-admin-payment-accounting-inp" class="last"><?php _e('Send Related Messages?', 'event_espresso'); ?></label>
434 434
 						<input type="checkbox" value="1" name="delete_txn_reg_status_change[send_notifications]">
435
-						<p class="description"><?php _e( 'If you check this box, the system will send any related messages matching the status of the registrations to each registration for this transaction.', 'event_espresso' );?></p>
435
+						<p class="description"><?php _e('If you check this box, the system will send any related messages matching the status of the registrations to each registration for this transaction.', 'event_espresso'); ?></p>
436 436
 					</div>
437 437
 					<div class="clear"></div>
438 438
 
@@ -442,12 +442,12 @@  discard block
 block discarded – undo
442 442
 			<ul id="del-admin-modal-dialog-options-ul">
443 443
 				<li>
444 444
 					<a id="txn-admin-modal-dialog-delete-lnk" class="button-primary no-icon" style="display:none;" >
445
-						<?php _e( 'Delete', 'event_espresso' );?>
445
+						<?php _e('Delete', 'event_espresso'); ?>
446 446
 					</a>
447 447
 				</li>
448 448
 				<li>
449 449
 					<a id="del-txn-admin-modal-dialog-cancel-lnk" class="button-secondary no-icon" >
450
-						<?php _e( 'Cancel', 'event_espresso' );?>
450
+						<?php _e('Cancel', 'event_espresso'); ?>
451 451
 					</a>
452 452
 				</li>
453 453
 				<li>
@@ -463,30 +463,30 @@  discard block
 block discarded – undo
463 463
 	<?php endif; // $grand_raw_total > 0?>
464 464
 
465 465
 	<?php
466
-	if ( WP_DEBUG ) {
467
-		$delivered_messages = get_option( 'EED_Messages__payment', array() );
468
-		if ( isset( $delivered_messages[ $TXN_ID ] )) {
466
+	if (WP_DEBUG) {
467
+		$delivered_messages = get_option('EED_Messages__payment', array());
468
+		if (isset($delivered_messages[$TXN_ID])) {
469 469
 			?>
470
-			<h4 class="admin-primary-mbox-h4 hdr-has-icon"><span class="dashicons dashicons-email-alt"></span><?php _e( 'Messages Sent to Primary Registrant', 'event_espresso' );?></h4>
470
+			<h4 class="admin-primary-mbox-h4 hdr-has-icon"><span class="dashicons dashicons-email-alt"></span><?php _e('Messages Sent to Primary Registrant', 'event_espresso'); ?></h4>
471 471
 
472 472
 			<div class="admin-primary-mbox-tbl-wrap">
473 473
 				<table class="admin-primary-mbox-tbl">
474 474
 					<thead>
475 475
 						<tr>
476
-							<th class="jst-left"><?php _e( 'Date & Time', 'event_espresso' );?></th>
477
-							<th class="jst-left"><?php _e( 'Message Type', 'event_espresso' );?></th>
478
-							<th class="jst-left"><?php _e( 'Payment Status Upon Sending', 'event_espresso' );?></th>
479
-							<th class="jst-left"><?php _e( 'TXN Status Upon Sending', 'event_espresso' );?></th>
476
+							<th class="jst-left"><?php _e('Date & Time', 'event_espresso'); ?></th>
477
+							<th class="jst-left"><?php _e('Message Type', 'event_espresso'); ?></th>
478
+							<th class="jst-left"><?php _e('Payment Status Upon Sending', 'event_espresso'); ?></th>
479
+							<th class="jst-left"><?php _e('TXN Status Upon Sending', 'event_espresso'); ?></th>
480 480
 						</tr>
481 481
 					</thead>
482 482
 					<tbody>
483
-						<?php foreach ( $delivered_messages[ $TXN_ID ] as $timestamp => $delivered_message ) :
483
+						<?php foreach ($delivered_messages[$TXN_ID] as $timestamp => $delivered_message) :
484 484
 							?>
485 485
 							<tr>
486
-								<td class="jst-left"><?php echo gmdate( get_option('date_format') . ' ' . get_option('time_format'), ( $timestamp + ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS ) ) );?></td>
487
-								<td class="jst-left"><?php echo isset( $delivered_message['message_type'] ) ? $delivered_message['message_type'] : '';?></td>
488
-								<td class="jst-left"><?php echo isset( $delivered_message['pay_status'] ) ? $delivered_message['pay_status'] : '';?></td>
489
-								<td class="jst-left"><?php echo isset( $delivered_message['txn_status'] ) ? $delivered_message['txn_status'] : '';?></td>
486
+								<td class="jst-left"><?php echo gmdate(get_option('date_format').' '.get_option('time_format'), ($timestamp + (get_option('gmt_offset') * HOUR_IN_SECONDS))); ?></td>
487
+								<td class="jst-left"><?php echo isset($delivered_message['message_type']) ? $delivered_message['message_type'] : ''; ?></td>
488
+								<td class="jst-left"><?php echo isset($delivered_message['pay_status']) ? $delivered_message['pay_status'] : ''; ?></td>
489
+								<td class="jst-left"><?php echo isset($delivered_message['txn_status']) ? $delivered_message['txn_status'] : ''; ?></td>
490 490
 							</tr>
491 491
 						<?php endforeach; // $delivered_messages?>
492 492
 					</tbody>
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -141,10 +141,13 @@
 block discarded – undo
141 141
 					<th class=" jst-rght" colspan="10"><span id="payments-total-spn"><?php echo $overpaid . sprintf( __( 'Payments Total %s', 'event_espresso' ), '(' . EE_Registry::instance()->CFG->currency->code . ')' );?></span></th>
142 142
 					<th class=" jst-rght"><span id="txn-admin-payment-total"><?php echo EEH_Template::format_currency($payment_total, FALSE, FALSE);?></span></th>
143 143
 				</tr>
144
-		<?php else : ?>
144
+		<?php else {
145
+	: ?>
145 146
 				<tr id="txn-admin-no-payments-tr" class="admin-primary-mbox-total-tr">
146 147
 					<td class=" jst-rght" colspan="11">
147
-						<span class="important-notice"><?php _e( 'No payments have been applied to this transaction yet. Click "Apply Payment" below to make a payment.', 'event_espresso' ); ?></span>
148
+						<span class="important-notice"><?php _e( 'No payments have been applied to this transaction yet. Click "Apply Payment" below to make a payment.', 'event_espresso' );
149
+}
150
+?></span>
148 151
 					</td>
149 152
 				</tr>
150 153
 				<tr id="txn-admin-payments-total-tr" class="admin-primary-mbox-total-tr hidden">
Please login to merge, or discard this patch.