@@ -1,1 +1,1 @@ |
||
1 | -<?php printf( __('PayPal Express (Express Checkout) is an off-site payment method for accepting payments via PayPal and is available to event organizers in many countries. A PayPal premier or business account is needed to accept payments. Need a PayPal account? Call 1-855-456-1338 or %1$sclick here to sign up for a merchant account%2$s.', 'event_espresso'), '<a href="https://eventespresso.com/go/paypalexpress/" target="_blank">','</a>' ); ?> |
|
2 | 1 | \ No newline at end of file |
2 | +<?php printf(__('PayPal Express (Express Checkout) is an off-site payment method for accepting payments via PayPal and is available to event organizers in many countries. A PayPal premier or business account is needed to accept payments. Need a PayPal account? Call 1-855-456-1338 or %1$sclick here to sign up for a merchant account%2$s.', 'event_espresso'), '<a href="https://eventespresso.com/go/paypalexpress/" target="_blank">', '</a>'); ?> |
|
3 | 3 | \ No newline at end of file |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) { exit('No direct script access allowed'); } ?> |
|
1 | +<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) { exit('No direct script access allowed'); } ?> |
|
2 | 2 | |
3 | 3 | <div id="ppexpress-sandbox-panel" class="sandbox-panel"> |
4 | 4 | |
@@ -6,13 +6,13 @@ discard block |
||
6 | 6 | |
7 | 7 | <h4><?php _e('How do I test specific error codes?', 'event_espresso'); ?></h4> |
8 | 8 | <p> |
9 | - <?php _e( 'To trigger an error condition on an amount-related field, |
|
9 | + <?php _e('To trigger an error condition on an amount-related field, |
|
10 | 10 | specify a error code value as a number with two digits to the right of the decimal point. |
11 | 11 | For example, specify a value of 107.55 to trigger the 10755 error.', |
12 | - 'event_espresso');?> |
|
12 | + 'event_espresso'); ?> |
|
13 | 13 | </p> |
14 | 14 | <p> |
15 | - <?php printf( __( 'More details can be found here: %1$s Testing Error Conditions %2$s.', 'event_espresso'), '<a href="https://developer.paypal.com/docs/classic/lifecycle/sb_error-conditions">', '</a>');?> |
|
15 | + <?php printf(__('More details can be found here: %1$s Testing Error Conditions %2$s.', 'event_espresso'), '<a href="https://developer.paypal.com/docs/classic/lifecycle/sb_error-conditions">', '</a>'); ?> |
|
16 | 16 | </p> |
17 | 17 | |
18 | 18 | </div> |
19 | 19 | \ No newline at end of file |
@@ -1,8 +1,8 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | namespace EventEspresso\core\exceptions; |
3 | 3 | |
4 | -if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) { |
|
5 | - exit( 'No direct script access allowed' ); |
|
4 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
|
5 | + exit('No direct script access allowed'); |
|
6 | 6 | } |
7 | 7 | |
8 | 8 | |
@@ -15,5 +15,5 @@ discard block |
||
15 | 15 | * @author Darren Ethier |
16 | 16 | * @since 4.9.11.rc.001 |
17 | 17 | */ |
18 | -class SendMessageException extends \RuntimeException {} |
|
18 | +class SendMessageException extends \RuntimeException {} |
|
19 | 19 | // End of file SendMessageException.php |
20 | 20 | \ No newline at end of file |
@@ -276,7 +276,7 @@ discard block |
||
276 | 276 | |
277 | 277 | /** |
278 | 278 | * @param $REG_ID |
279 | - * @param $reg_status |
|
279 | + * @param boolean $reg_status |
|
280 | 280 | */ |
281 | 281 | public function set_reg_status_updated( $REG_ID, $reg_status ) { |
282 | 282 | $this->reg_status_updated[ $REG_ID ] = filter_var( $reg_status, FILTER_VALIDATE_BOOLEAN ); |
@@ -1110,6 +1110,7 @@ discard block |
||
1110 | 1110 | * |
1111 | 1111 | * @param string | int $reg_cache_ID |
1112 | 1112 | * @param EE_Registration $registration |
1113 | + * @param integer $reg_cache_ID |
|
1113 | 1114 | * @return void |
1114 | 1115 | * @throws \EE_Error |
1115 | 1116 | */ |
@@ -1,16 +1,16 @@ discard block |
||
1 | 1 | <?php if ( ! defined('EVENT_ESPRESSO_VERSION')) { exit('No direct script access allowed'); } |
2 | 2 | /** |
3 | - * |
|
4 | - * Class EE_Checkout |
|
5 | - * |
|
6 | - * Description |
|
7 | - * |
|
8 | - * @package Event Espresso |
|
9 | - * @subpackage core |
|
10 | - * @author Brent Christensen |
|
11 | - * @since 4.5.0 |
|
12 | - * |
|
13 | - */ |
|
3 | + * |
|
4 | + * Class EE_Checkout |
|
5 | + * |
|
6 | + * Description |
|
7 | + * |
|
8 | + * @package Event Espresso |
|
9 | + * @subpackage core |
|
10 | + * @author Brent Christensen |
|
11 | + * @since 4.5.0 |
|
12 | + * |
|
13 | + */ |
|
14 | 14 | class EE_Checkout { |
15 | 15 | |
16 | 16 | /** |
@@ -250,9 +250,9 @@ discard block |
||
250 | 250 | $this->continue_reg = apply_filters( 'FHEE__EE_Checkout___construct___continue_reg', TRUE ); |
251 | 251 | $this->admin_request = is_admin() && ! EE_Registry::instance()->REQ->ajax; |
252 | 252 | $this->reg_cache_where_params = array( |
253 | - 0 => array( 'REG_deleted' => false ), |
|
254 | - 'order_by' => array( 'REG_count' => 'ASC' ) |
|
255 | - ); |
|
253 | + 0 => array( 'REG_deleted' => false ), |
|
254 | + 'order_by' => array( 'REG_count' => 'ASC' ) |
|
255 | + ); |
|
256 | 256 | } |
257 | 257 | |
258 | 258 | |
@@ -807,10 +807,10 @@ discard block |
||
807 | 807 | */ |
808 | 808 | public function visit_allows_processing_of_this_registration( EE_Registration $registration ) { |
809 | 809 | return ! $this->revisit |
810 | - || $this->primary_revisit |
|
811 | - || ( |
|
812 | - $this->revisit && $this->reg_url_link === $registration->reg_url_link() |
|
813 | - ) |
|
810 | + || $this->primary_revisit |
|
811 | + || ( |
|
812 | + $this->revisit && $this->reg_url_link === $registration->reg_url_link() |
|
813 | + ) |
|
814 | 814 | ? true |
815 | 815 | : false; |
816 | 816 | } |
@@ -1202,16 +1202,16 @@ discard block |
||
1202 | 1202 | * @return array |
1203 | 1203 | * @throws \EE_Error |
1204 | 1204 | */ |
1205 | - public function __sleep() |
|
1206 | - { |
|
1207 | - if ( $this->primary_attendee_obj instanceof EE_Attendee && $this->primary_attendee_obj->ID() ) { |
|
1208 | - $this->primary_attendee_obj = $this->primary_attendee_obj->ID(); |
|
1209 | - } // remove the reg form and the checkout |
|
1210 | - if ( $this->transaction instanceof EE_Transaction && $this->transaction->ID() ) { |
|
1211 | - $this->transaction = $this->transaction->ID(); |
|
1212 | - } // remove the reg form and the checkout |
|
1213 | - return array_diff( array_keys( get_object_vars( $this ) ), array( 'billing_form', 'registration_form' ) ); |
|
1214 | - } |
|
1205 | + public function __sleep() |
|
1206 | + { |
|
1207 | + if ( $this->primary_attendee_obj instanceof EE_Attendee && $this->primary_attendee_obj->ID() ) { |
|
1208 | + $this->primary_attendee_obj = $this->primary_attendee_obj->ID(); |
|
1209 | + } // remove the reg form and the checkout |
|
1210 | + if ( $this->transaction instanceof EE_Transaction && $this->transaction->ID() ) { |
|
1211 | + $this->transaction = $this->transaction->ID(); |
|
1212 | + } // remove the reg form and the checkout |
|
1213 | + return array_diff( array_keys( get_object_vars( $this ) ), array( 'billing_form', 'registration_form' ) ); |
|
1214 | + } |
|
1215 | 1215 | |
1216 | 1216 | |
1217 | 1217 | /** |
@@ -247,11 +247,11 @@ discard block |
||
247 | 247 | $this->reg_page_base_url = EE_Registry::instance()->CFG->core->reg_page_url(); |
248 | 248 | $this->thank_you_page_url = EE_Registry::instance()->CFG->core->thank_you_page_url(); |
249 | 249 | $this->cancel_page_url = EE_Registry::instance()->CFG->core->cancel_page_url(); |
250 | - $this->continue_reg = apply_filters( 'FHEE__EE_Checkout___construct___continue_reg', TRUE ); |
|
250 | + $this->continue_reg = apply_filters('FHEE__EE_Checkout___construct___continue_reg', TRUE); |
|
251 | 251 | $this->admin_request = is_admin() && ! EE_Registry::instance()->REQ->ajax; |
252 | 252 | $this->reg_cache_where_params = array( |
253 | - 0 => array( 'REG_deleted' => false ), |
|
254 | - 'order_by' => array( 'REG_count' => 'ASC' ) |
|
253 | + 0 => array('REG_deleted' => false), |
|
254 | + 'order_by' => array('REG_count' => 'ASC') |
|
255 | 255 | ); |
256 | 256 | } |
257 | 257 | |
@@ -263,8 +263,8 @@ discard block |
||
263 | 263 | * @return boolean |
264 | 264 | */ |
265 | 265 | public function any_reg_status_updated() { |
266 | - foreach ( $this->reg_status_updated as $reg_status ) { |
|
267 | - if ( $reg_status ) { |
|
266 | + foreach ($this->reg_status_updated as $reg_status) { |
|
267 | + if ($reg_status) { |
|
268 | 268 | return true; |
269 | 269 | } |
270 | 270 | } |
@@ -277,8 +277,8 @@ discard block |
||
277 | 277 | * @param $REG_ID |
278 | 278 | * @return boolean |
279 | 279 | */ |
280 | - public function reg_status_updated( $REG_ID ) { |
|
281 | - return isset( $this->reg_status_updated[ $REG_ID ] ) ? $this->reg_status_updated[ $REG_ID ] : false; |
|
280 | + public function reg_status_updated($REG_ID) { |
|
281 | + return isset($this->reg_status_updated[$REG_ID]) ? $this->reg_status_updated[$REG_ID] : false; |
|
282 | 282 | } |
283 | 283 | |
284 | 284 | |
@@ -287,8 +287,8 @@ discard block |
||
287 | 287 | * @param $REG_ID |
288 | 288 | * @param $reg_status |
289 | 289 | */ |
290 | - public function set_reg_status_updated( $REG_ID, $reg_status ) { |
|
291 | - $this->reg_status_updated[ $REG_ID ] = filter_var( $reg_status, FILTER_VALIDATE_BOOLEAN ); |
|
290 | + public function set_reg_status_updated($REG_ID, $reg_status) { |
|
291 | + $this->reg_status_updated[$REG_ID] = filter_var($reg_status, FILTER_VALIDATE_BOOLEAN); |
|
292 | 292 | } |
293 | 293 | |
294 | 294 | |
@@ -309,7 +309,7 @@ discard block |
||
309 | 309 | * can ONLY be set by the Finalize_Registration reg step |
310 | 310 | */ |
311 | 311 | public function set_exit_spco() { |
312 | - if ( $this->current_step instanceof EE_SPCO_Reg_Step_Finalize_Registration ) { |
|
312 | + if ($this->current_step instanceof EE_SPCO_Reg_Step_Finalize_Registration) { |
|
313 | 313 | $this->exit_spco = true; |
314 | 314 | } |
315 | 315 | } |
@@ -326,12 +326,12 @@ discard block |
||
326 | 326 | */ |
327 | 327 | public function reset_for_current_request() { |
328 | 328 | $this->process_form_submission = FALSE; |
329 | - $this->continue_reg = apply_filters( 'FHEE__EE_Checkout___construct___continue_reg', true ); |
|
329 | + $this->continue_reg = apply_filters('FHEE__EE_Checkout___construct___continue_reg', true); |
|
330 | 330 | $this->admin_request = is_admin() && ! EE_Registry::instance()->REQ->front_ajax; |
331 | 331 | $this->continue_reg = true; |
332 | 332 | $this->redirect = false; |
333 | 333 | // don't reset the cached redirect form if we're about to be asked to display it !!! |
334 | - if ( EE_Registry::instance()->REQ->get( 'action', 'display_spco_reg_step' ) !== 'redirect_form' ) { |
|
334 | + if (EE_Registry::instance()->REQ->get('action', 'display_spco_reg_step') !== 'redirect_form') { |
|
335 | 335 | $this->redirect_form = ''; |
336 | 336 | } |
337 | 337 | $this->redirect_url = ''; |
@@ -348,8 +348,8 @@ discard block |
||
348 | 348 | * @param EE_SPCO_Reg_Step $reg_step_obj |
349 | 349 | * @return void |
350 | 350 | */ |
351 | - public function add_reg_step( EE_SPCO_Reg_Step $reg_step_obj ) { |
|
352 | - $this->reg_steps[ $reg_step_obj->slug() ] = $reg_step_obj; |
|
351 | + public function add_reg_step(EE_SPCO_Reg_Step $reg_step_obj) { |
|
352 | + $this->reg_steps[$reg_step_obj->slug()] = $reg_step_obj; |
|
353 | 353 | } |
354 | 354 | |
355 | 355 | |
@@ -365,22 +365,22 @@ discard block |
||
365 | 365 | * @return void |
366 | 366 | * @throws \EE_Error |
367 | 367 | */ |
368 | - public function skip_reg_step( $reg_step_slug = '' ) { |
|
369 | - $step_to_skip = $this->find_reg_step( $reg_step_slug ); |
|
370 | - if ( $step_to_skip instanceof EE_SPCO_Reg_Step && $step_to_skip->is_current_step() ) { |
|
371 | - $step_to_skip->set_is_current_step( false ); |
|
368 | + public function skip_reg_step($reg_step_slug = '') { |
|
369 | + $step_to_skip = $this->find_reg_step($reg_step_slug); |
|
370 | + if ($step_to_skip instanceof EE_SPCO_Reg_Step && $step_to_skip->is_current_step()) { |
|
371 | + $step_to_skip->set_is_current_step(false); |
|
372 | 372 | $step_to_skip->set_completed(); |
373 | 373 | // advance to the next step |
374 | - $this->set_current_step( $this->next_step->slug() ); |
|
374 | + $this->set_current_step($this->next_step->slug()); |
|
375 | 375 | // also reset the step param in the request in case any other code references that directly |
376 | - EE_Registry::instance()->REQ->set( 'step', $this->current_step->slug() ); |
|
376 | + EE_Registry::instance()->REQ->set('step', $this->current_step->slug()); |
|
377 | 377 | // since we are skipping a step and setting the current step to be what was previously the next step, |
378 | 378 | // we need to check that the next step is now correct, and not still set to the current step. |
379 | - if ( $this->current_step->slug() === $this->next_step->slug() ) { |
|
379 | + if ($this->current_step->slug() === $this->next_step->slug()) { |
|
380 | 380 | // correctly setup the next step |
381 | 381 | $this->set_next_step(); |
382 | 382 | } |
383 | - $this->set_reg_step_initiated( $this->current_step ); |
|
383 | + $this->set_reg_step_initiated($this->current_step); |
|
384 | 384 | } |
385 | 385 | } |
386 | 386 | |
@@ -394,14 +394,14 @@ discard block |
||
394 | 394 | * @param bool $reset whether to reset reg steps after removal |
395 | 395 | * @throws EE_Error |
396 | 396 | */ |
397 | - public function remove_reg_step( $reg_step_slug = '', $reset = true ) { |
|
398 | - unset( $this->reg_steps[ $reg_step_slug ] ); |
|
399 | - if ( $this->transaction instanceof EE_Transaction ) { |
|
397 | + public function remove_reg_step($reg_step_slug = '', $reset = true) { |
|
398 | + unset($this->reg_steps[$reg_step_slug]); |
|
399 | + if ($this->transaction instanceof EE_Transaction) { |
|
400 | 400 | // now remove reg step from TXN and save |
401 | - $this->transaction->remove_reg_step( $reg_step_slug ); |
|
401 | + $this->transaction->remove_reg_step($reg_step_slug); |
|
402 | 402 | $this->transaction->save(); |
403 | 403 | } |
404 | - if ( $reset ) { |
|
404 | + if ($reset) { |
|
405 | 405 | $this->reset_reg_steps(); |
406 | 406 | } |
407 | 407 | } |
@@ -416,9 +416,9 @@ discard block |
||
416 | 416 | * @param int $order |
417 | 417 | * @return void |
418 | 418 | */ |
419 | - public function set_reg_step_order( $reg_step_slug = '', $order = 100 ) { |
|
420 | - if ( isset( $this->reg_steps[ $reg_step_slug ] )) { |
|
421 | - $this->reg_steps[ $reg_step_slug ]->set_order( $order ); |
|
419 | + public function set_reg_step_order($reg_step_slug = '', $order = 100) { |
|
420 | + if (isset($this->reg_steps[$reg_step_slug])) { |
|
421 | + $this->reg_steps[$reg_step_slug]->set_order($order); |
|
422 | 422 | } |
423 | 423 | } |
424 | 424 | |
@@ -431,25 +431,25 @@ discard block |
||
431 | 431 | * @param string $current_step |
432 | 432 | * @return void |
433 | 433 | */ |
434 | - public function set_current_step( $current_step ) { |
|
434 | + public function set_current_step($current_step) { |
|
435 | 435 | // grab what step we're on |
436 | - $this->current_step = isset( $this->reg_steps[ $current_step ] ) ? $this->reg_steps[ $current_step ] : reset( $this->reg_steps ); |
|
436 | + $this->current_step = isset($this->reg_steps[$current_step]) ? $this->reg_steps[$current_step] : reset($this->reg_steps); |
|
437 | 437 | // verify instance |
438 | - if ( $this->current_step instanceof EE_SPCO_Reg_Step ) { |
|
438 | + if ($this->current_step instanceof EE_SPCO_Reg_Step) { |
|
439 | 439 | // we don't want to repeat completed steps if this is the first time through SPCO |
440 | - if ( $this->continue_reg && ! $this->revisit && $this->current_step->completed() ) { |
|
440 | + if ($this->continue_reg && ! $this->revisit && $this->current_step->completed()) { |
|
441 | 441 | // so advance to the next step |
442 | 442 | $this->set_next_step(); |
443 | - if ( $this->next_step instanceof EE_SPCO_Reg_Step ) { |
|
443 | + if ($this->next_step instanceof EE_SPCO_Reg_Step) { |
|
444 | 444 | // and attempt to set it as the current step |
445 | - $this->set_current_step( $this->next_step->slug() ); |
|
445 | + $this->set_current_step($this->next_step->slug()); |
|
446 | 446 | } |
447 | 447 | return; |
448 | 448 | } |
449 | - $this->current_step->set_is_current_step( TRUE ); |
|
449 | + $this->current_step->set_is_current_step(TRUE); |
|
450 | 450 | } else { |
451 | 451 | EE_Error::add_error( |
452 | - __( 'The current step could not be set.', 'event_espresso' ), |
|
452 | + __('The current step could not be set.', 'event_espresso'), |
|
453 | 453 | __FILE__, __FUNCTION__, __LINE__ |
454 | 454 | ); |
455 | 455 | } |
@@ -466,20 +466,20 @@ discard block |
||
466 | 466 | */ |
467 | 467 | public function set_next_step() { |
468 | 468 | // set pointer to start of array |
469 | - reset( $this->reg_steps ); |
|
469 | + reset($this->reg_steps); |
|
470 | 470 | // if there is more than one step |
471 | - if ( count( $this->reg_steps ) > 1 ) { |
|
471 | + if (count($this->reg_steps) > 1) { |
|
472 | 472 | // advance to the current step and set pointer |
473 | - while ( key( $this->reg_steps ) !== $this->current_step->slug() && key( $this->reg_steps ) !== '' ) { |
|
474 | - next( $this->reg_steps ); |
|
473 | + while (key($this->reg_steps) !== $this->current_step->slug() && key($this->reg_steps) !== '') { |
|
474 | + next($this->reg_steps); |
|
475 | 475 | } |
476 | 476 | } |
477 | 477 | // advance one more spot ( if it exists ) |
478 | - $this->next_step = next( $this->reg_steps ); |
|
478 | + $this->next_step = next($this->reg_steps); |
|
479 | 479 | // verify instance |
480 | - $this->next_step = $this->next_step instanceof EE_SPCO_Reg_Step ? $this->next_step : NULL; |
|
480 | + $this->next_step = $this->next_step instanceof EE_SPCO_Reg_Step ? $this->next_step : NULL; |
|
481 | 481 | // then back to current step to reset |
482 | - prev( $this->reg_steps ); |
|
482 | + prev($this->reg_steps); |
|
483 | 483 | } |
484 | 484 | |
485 | 485 | |
@@ -493,8 +493,8 @@ discard block |
||
493 | 493 | * @return EE_SPCO_Reg_Step | null |
494 | 494 | */ |
495 | 495 | public function get_next_reg_step() { |
496 | - $next = next( $this->reg_steps ); |
|
497 | - prev( $this->reg_steps ); |
|
496 | + $next = next($this->reg_steps); |
|
497 | + prev($this->reg_steps); |
|
498 | 498 | return $next instanceof EE_SPCO_Reg_Step ? $next : null; |
499 | 499 | } |
500 | 500 | |
@@ -509,8 +509,8 @@ discard block |
||
509 | 509 | * @return EE_SPCO_Reg_Step | null |
510 | 510 | */ |
511 | 511 | public function get_prev_reg_step() { |
512 | - $prev = prev( $this->reg_steps ); |
|
513 | - next( $this->reg_steps ); |
|
512 | + $prev = prev($this->reg_steps); |
|
513 | + next($this->reg_steps); |
|
514 | 514 | return $prev instanceof EE_SPCO_Reg_Step ? $prev : null; |
515 | 515 | } |
516 | 516 | |
@@ -523,8 +523,8 @@ discard block |
||
523 | 523 | * @return void |
524 | 524 | */ |
525 | 525 | public function sort_reg_steps() { |
526 | - $reg_step_sorting_callback = apply_filters( 'FHEE__EE_Checkout__sort_reg_steps__reg_step_sorting_callback', 'reg_step_sorting_callback' ); |
|
527 | - uasort( $this->reg_steps, array( $this, $reg_step_sorting_callback )); |
|
526 | + $reg_step_sorting_callback = apply_filters('FHEE__EE_Checkout__sort_reg_steps__reg_step_sorting_callback', 'reg_step_sorting_callback'); |
|
527 | + uasort($this->reg_steps, array($this, $reg_step_sorting_callback)); |
|
528 | 528 | } |
529 | 529 | |
530 | 530 | |
@@ -537,19 +537,19 @@ discard block |
||
537 | 537 | * @param string $reg_step_slug |
538 | 538 | * @return EE_SPCO_Reg_Step|null |
539 | 539 | */ |
540 | - public function find_reg_step( $reg_step_slug = '' ) { |
|
541 | - if ( ! empty( $reg_step_slug ) ) { |
|
540 | + public function find_reg_step($reg_step_slug = '') { |
|
541 | + if ( ! empty($reg_step_slug)) { |
|
542 | 542 | // copy reg step array |
543 | 543 | $reg_steps = $this->reg_steps; |
544 | 544 | // set pointer to start of array |
545 | - reset( $reg_steps ); |
|
545 | + reset($reg_steps); |
|
546 | 546 | // if there is more than one step |
547 | - if ( count( $reg_steps ) > 1 ) { |
|
547 | + if (count($reg_steps) > 1) { |
|
548 | 548 | // advance to the current step and set pointer |
549 | - while ( key( $reg_steps ) !== $reg_step_slug && key( $reg_steps ) !== '' ) { |
|
550 | - next( $reg_steps ); |
|
549 | + while (key($reg_steps) !== $reg_step_slug && key($reg_steps) !== '') { |
|
550 | + next($reg_steps); |
|
551 | 551 | } |
552 | - return current( $reg_steps ); |
|
552 | + return current($reg_steps); |
|
553 | 553 | } |
554 | 554 | } |
555 | 555 | return null; |
@@ -565,17 +565,17 @@ discard block |
||
565 | 565 | * @param EE_SPCO_Reg_Step $reg_step_B |
566 | 566 | * @return int |
567 | 567 | */ |
568 | - public function reg_step_sorting_callback( EE_SPCO_Reg_Step $reg_step_A, EE_SPCO_Reg_Step $reg_step_B ) { |
|
568 | + public function reg_step_sorting_callback(EE_SPCO_Reg_Step $reg_step_A, EE_SPCO_Reg_Step $reg_step_B) { |
|
569 | 569 | // send finalize_registration step to the end of the array |
570 | - if ( $reg_step_A->slug() === 'finalize_registration' ) { |
|
570 | + if ($reg_step_A->slug() === 'finalize_registration') { |
|
571 | 571 | return 1; |
572 | - } else if ( $reg_step_B->slug() === 'finalize_registration' ) { |
|
572 | + } else if ($reg_step_B->slug() === 'finalize_registration') { |
|
573 | 573 | return -1; |
574 | 574 | } |
575 | - if ( $reg_step_A->order() === $reg_step_B->order() ) { |
|
575 | + if ($reg_step_A->order() === $reg_step_B->order()) { |
|
576 | 576 | return 0; |
577 | 577 | } |
578 | - return ( $reg_step_A->order() > $reg_step_B->order() ) ? 1 : -1; |
|
578 | + return ($reg_step_A->order() > $reg_step_B->order()) ? 1 : -1; |
|
579 | 579 | } |
580 | 580 | |
581 | 581 | |
@@ -587,7 +587,7 @@ discard block |
||
587 | 587 | * @param EE_SPCO_Reg_Step $reg_step |
588 | 588 | * @throws \EE_Error |
589 | 589 | */ |
590 | - public function set_reg_step_initiated( EE_SPCO_Reg_Step $reg_step ) { |
|
590 | + public function set_reg_step_initiated(EE_SPCO_Reg_Step $reg_step) { |
|
591 | 591 | // call set_reg_step_initiated ??? |
592 | 592 | if ( |
593 | 593 | // first time visiting SPCO ? |
@@ -600,11 +600,11 @@ discard block |
||
600 | 600 | ) |
601 | 601 | ) { |
602 | 602 | // set the start time for this reg step |
603 | - if ( ! $this->transaction->set_reg_step_initiated( $reg_step->slug() ) ) { |
|
604 | - if ( WP_DEBUG ) { |
|
603 | + if ( ! $this->transaction->set_reg_step_initiated($reg_step->slug())) { |
|
604 | + if (WP_DEBUG) { |
|
605 | 605 | EE_Error::add_error( |
606 | 606 | sprintf( |
607 | - __( 'The "%1$s" registration step was not initialized properly.', 'event_espresso' ), |
|
607 | + __('The "%1$s" registration step was not initialized properly.', 'event_espresso'), |
|
608 | 608 | $reg_step->name() |
609 | 609 | ), |
610 | 610 | __FILE__, __FUNCTION__, __LINE__ |
@@ -623,10 +623,10 @@ discard block |
||
623 | 623 | * @return void |
624 | 624 | */ |
625 | 625 | public function set_reg_step_JSON_info() { |
626 | - EE_Registry::$i18n_js_strings[ 'reg_steps' ] = array(); |
|
626 | + EE_Registry::$i18n_js_strings['reg_steps'] = array(); |
|
627 | 627 | // pass basic reg step data to JS |
628 | - foreach ( $this->reg_steps as $reg_step ) { |
|
629 | - EE_Registry::$i18n_js_strings[ 'reg_steps' ][] = $reg_step->slug(); |
|
628 | + foreach ($this->reg_steps as $reg_step) { |
|
629 | + EE_Registry::$i18n_js_strings['reg_steps'][] = $reg_step->slug(); |
|
630 | 630 | } |
631 | 631 | // reset reg step html |
632 | 632 | // $this->json_response->set_reg_step_html( '' ); |
@@ -642,7 +642,7 @@ discard block |
||
642 | 642 | */ |
643 | 643 | public function reset_reg_steps() { |
644 | 644 | $this->sort_reg_steps(); |
645 | - $this->set_current_step( EE_Registry::instance()->REQ->get( 'step' )); |
|
645 | + $this->set_current_step(EE_Registry::instance()->REQ->get('step')); |
|
646 | 646 | $this->set_next_step(); |
647 | 647 | // the text that appears on the reg step form submit button |
648 | 648 | $this->current_step->set_submit_button_text(); |
@@ -659,9 +659,9 @@ discard block |
||
659 | 659 | */ |
660 | 660 | public function get_registration_time_limit() { |
661 | 661 | |
662 | - $registration_time_limit = (float)( EE_Registry::instance() ->SSN->expiration() - time() ); |
|
662 | + $registration_time_limit = (float) (EE_Registry::instance() ->SSN->expiration() - time()); |
|
663 | 663 | $time_limit_format = $registration_time_limit > 60 * MINUTE_IN_SECONDS ? 'H:i:s' : 'i:s'; |
664 | - $registration_time_limit = date( $time_limit_format, $registration_time_limit ); |
|
664 | + $registration_time_limit = date($time_limit_format, $registration_time_limit); |
|
665 | 665 | return apply_filters( |
666 | 666 | 'FHEE__EE_Checkout__get_registration_time_limit__registration_time_limit', |
667 | 667 | $registration_time_limit |
@@ -681,7 +681,7 @@ discard block |
||
681 | 681 | // overpaid TXN |
682 | 682 | // free TXN ( total = 0.00 ) |
683 | 683 | // then payment required is TRUE |
684 | - return ! ( $this->admin_request || $this->transaction->is_completed() || $this->transaction->is_overpaid() || $this->transaction->is_free() ) ? TRUE : FALSE; |
|
684 | + return ! ($this->admin_request || $this->transaction->is_completed() || $this->transaction->is_overpaid() || $this->transaction->is_free()) ? TRUE : FALSE; |
|
685 | 685 | } |
686 | 686 | |
687 | 687 | |
@@ -693,12 +693,12 @@ discard block |
||
693 | 693 | * @param EE_Transaction $transaction |
694 | 694 | * @return EE_Cart |
695 | 695 | */ |
696 | - public function get_cart_for_transaction( $transaction ) { |
|
697 | - $session = EE_Registry::instance()->load_core( 'Session' ); |
|
698 | - $cart = $transaction instanceof EE_Transaction ? EE_Cart::get_cart_from_txn( $transaction, $session ) : null; |
|
696 | + public function get_cart_for_transaction($transaction) { |
|
697 | + $session = EE_Registry::instance()->load_core('Session'); |
|
698 | + $cart = $transaction instanceof EE_Transaction ? EE_Cart::get_cart_from_txn($transaction, $session) : null; |
|
699 | 699 | // verify cart |
700 | - if ( ! $cart instanceof EE_Cart ) { |
|
701 | - $cart = EE_Registry::instance()->load_core( 'Cart' ); |
|
700 | + if ( ! $cart instanceof EE_Cart) { |
|
701 | + $cart = EE_Registry::instance()->load_core('Cart'); |
|
702 | 702 | } |
703 | 703 | |
704 | 704 | return $cart; |
@@ -714,8 +714,8 @@ discard block |
||
714 | 714 | */ |
715 | 715 | public function initialize_txn_reg_steps_array() { |
716 | 716 | $txn_reg_steps_array = array(); |
717 | - foreach ( $this->reg_steps as $reg_step ) { |
|
718 | - $txn_reg_steps_array[ $reg_step->slug() ] = FALSE; |
|
717 | + foreach ($this->reg_steps as $reg_step) { |
|
718 | + $txn_reg_steps_array[$reg_step->slug()] = FALSE; |
|
719 | 719 | } |
720 | 720 | return $txn_reg_steps_array; |
721 | 721 | } |
@@ -731,14 +731,14 @@ discard block |
||
731 | 731 | */ |
732 | 732 | public function update_txn_reg_steps_array() { |
733 | 733 | $updated = false; |
734 | - foreach ( $this->reg_steps as $reg_step ) { |
|
735 | - if ( $reg_step->completed() ) { |
|
736 | - $updated = $this->transaction->set_reg_step_completed( $reg_step->slug() ) |
|
734 | + foreach ($this->reg_steps as $reg_step) { |
|
735 | + if ($reg_step->completed()) { |
|
736 | + $updated = $this->transaction->set_reg_step_completed($reg_step->slug()) |
|
737 | 737 | ? true |
738 | 738 | : $updated; |
739 | 739 | } |
740 | 740 | } |
741 | - if ( $updated ) { |
|
741 | + if ($updated) { |
|
742 | 742 | $this->transaction->save(); |
743 | 743 | } |
744 | 744 | return $updated; |
@@ -754,14 +754,14 @@ discard block |
||
754 | 754 | * @throws \EE_Error |
755 | 755 | */ |
756 | 756 | public function stash_transaction_and_checkout() { |
757 | - if ( ! $this->revisit ) { |
|
757 | + if ( ! $this->revisit) { |
|
758 | 758 | $this->update_txn_reg_steps_array(); |
759 | 759 | } |
760 | 760 | $this->track_transaction_and_registration_status_updates(); |
761 | 761 | // save all data to the db, but suppress errors |
762 | 762 | //$this->save_all_data( FALSE ); |
763 | 763 | // cache the checkout in the session |
764 | - EE_Registry::instance()->SSN->set_checkout( $this ); |
|
764 | + EE_Registry::instance()->SSN->set_checkout($this); |
|
765 | 765 | } |
766 | 766 | |
767 | 767 | |
@@ -776,15 +776,15 @@ discard block |
||
776 | 776 | */ |
777 | 777 | public function track_transaction_and_registration_status_updates() { |
778 | 778 | // verify the transaction |
779 | - if ( $this->transaction instanceof EE_Transaction ) { |
|
779 | + if ($this->transaction instanceof EE_Transaction) { |
|
780 | 780 | // has there been a TXN status change during this checkout? |
781 | 781 | $this->txn_status_updated = $this->transaction->txn_status_updated(); |
782 | 782 | /** @type EE_Registration_Processor $registration_processor */ |
783 | - $registration_processor = EE_Registry::instance()->load_class( 'Registration_Processor' ); |
|
783 | + $registration_processor = EE_Registry::instance()->load_class('Registration_Processor'); |
|
784 | 784 | // grab the saved registrations from the transaction |
785 | - foreach ( $this->transaction->registrations( $this->reg_cache_where_params ) as $registration ) { |
|
786 | - if ( $registration_processor->reg_status_updated( $registration->ID() ) ) { |
|
787 | - $this->set_reg_status_updated( $registration->ID(), true ); |
|
785 | + foreach ($this->transaction->registrations($this->reg_cache_where_params) as $registration) { |
|
786 | + if ($registration_processor->reg_status_updated($registration->ID())) { |
|
787 | + $this->set_reg_status_updated($registration->ID(), true); |
|
788 | 788 | } |
789 | 789 | } |
790 | 790 | } |
@@ -805,7 +805,7 @@ discard block |
||
805 | 805 | * @return bool |
806 | 806 | * @throws \EE_Error |
807 | 807 | */ |
808 | - public function visit_allows_processing_of_this_registration( EE_Registration $registration ) { |
|
808 | + public function visit_allows_processing_of_this_registration(EE_Registration $registration) { |
|
809 | 809 | return ! $this->revisit |
810 | 810 | || $this->primary_revisit |
811 | 811 | || ( |
@@ -838,18 +838,18 @@ discard block |
||
838 | 838 | * @return bool |
839 | 839 | * @throws \EE_Error |
840 | 840 | */ |
841 | - public function save_all_data( $show_errors = TRUE ) { |
|
841 | + public function save_all_data($show_errors = TRUE) { |
|
842 | 842 | // verify the transaction |
843 | - if ( $this->transaction instanceof EE_Transaction ) { |
|
843 | + if ($this->transaction instanceof EE_Transaction) { |
|
844 | 844 | // save to ensure that TXN has ID |
845 | 845 | $this->transaction->save(); |
846 | 846 | // grab the saved registrations from the transaction |
847 | - foreach ( $this->transaction->registrations( $this->reg_cache_where_params ) as $registration ) { |
|
848 | - $this->_save_registration( $registration, $show_errors ); |
|
847 | + foreach ($this->transaction->registrations($this->reg_cache_where_params) as $registration) { |
|
848 | + $this->_save_registration($registration, $show_errors); |
|
849 | 849 | } |
850 | 850 | } else { |
851 | - if ( $show_errors ) { |
|
852 | - EE_Error::add_error( __( 'A valid Transaction was not found when attempting to save your registration information.', 'event_espresso' ), __FILE__, __FUNCTION__, __LINE__); |
|
851 | + if ($show_errors) { |
|
852 | + EE_Error::add_error(__('A valid Transaction was not found when attempting to save your registration information.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__); |
|
853 | 853 | } |
854 | 854 | return FALSE; |
855 | 855 | } |
@@ -866,32 +866,32 @@ discard block |
||
866 | 866 | * @return void |
867 | 867 | * @throws \EE_Error |
868 | 868 | */ |
869 | - private function _save_registration( $registration, $show_errors = TRUE ) { |
|
869 | + private function _save_registration($registration, $show_errors = TRUE) { |
|
870 | 870 | // verify object |
871 | - if ( $registration instanceof EE_Registration ) { |
|
871 | + if ($registration instanceof EE_Registration) { |
|
872 | 872 | // should this registration be processed during this visit ? |
873 | - if ( $this->visit_allows_processing_of_this_registration( $registration ) ) { |
|
873 | + if ($this->visit_allows_processing_of_this_registration($registration)) { |
|
874 | 874 | //set TXN ID |
875 | - if ( ! $registration->transaction_ID() ) { |
|
876 | - $registration->set_transaction_id( $this->transaction->ID() ); |
|
875 | + if ( ! $registration->transaction_ID()) { |
|
876 | + $registration->set_transaction_id($this->transaction->ID()); |
|
877 | 877 | } |
878 | 878 | // verify and save the attendee |
879 | - $this->_save_registration_attendee( $registration, $show_errors ); |
|
879 | + $this->_save_registration_attendee($registration, $show_errors); |
|
880 | 880 | // save answers to reg form questions |
881 | - $this->_save_registration_answers( $registration, $show_errors ); |
|
881 | + $this->_save_registration_answers($registration, $show_errors); |
|
882 | 882 | // save changes |
883 | 883 | $registration->save(); |
884 | 884 | // update txn cache |
885 | - if ( ! $this->transaction->update_cache_after_object_save( 'Registration', $registration )) { |
|
886 | - if ( $show_errors ) { |
|
887 | - EE_Error::add_error( __( 'The newly saved Registration object could not be cached on the Transaction.', 'event_espresso' ), __FILE__, __FUNCTION__, __LINE__); |
|
885 | + if ( ! $this->transaction->update_cache_after_object_save('Registration', $registration)) { |
|
886 | + if ($show_errors) { |
|
887 | + EE_Error::add_error(__('The newly saved Registration object could not be cached on the Transaction.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__); |
|
888 | 888 | } |
889 | 889 | } |
890 | 890 | } |
891 | 891 | } else { |
892 | - if ( $show_errors ) { |
|
892 | + if ($show_errors) { |
|
893 | 893 | EE_Error::add_error( |
894 | - __( 'An invalid Registration object was discovered when attempting to save your registration information.', 'event_espresso' ), |
|
894 | + __('An invalid Registration object was discovered when attempting to save your registration information.', 'event_espresso'), |
|
895 | 895 | __FILE__, __FUNCTION__, __LINE__ |
896 | 896 | ); |
897 | 897 | } |
@@ -908,25 +908,25 @@ discard block |
||
908 | 908 | * @return void |
909 | 909 | * @throws \EE_Error |
910 | 910 | */ |
911 | - private function _save_registration_attendee( $registration, $show_errors = TRUE ) { |
|
912 | - if ( $registration->attendee() instanceof EE_Attendee ) { |
|
911 | + private function _save_registration_attendee($registration, $show_errors = TRUE) { |
|
912 | + if ($registration->attendee() instanceof EE_Attendee) { |
|
913 | 913 | // save so that ATT has ID |
914 | 914 | $registration->attendee()->save(); |
915 | - if ( ! $registration->update_cache_after_object_save( 'Attendee', $registration->attendee() ) ) { |
|
916 | - if ( $show_errors ) { |
|
915 | + if ( ! $registration->update_cache_after_object_save('Attendee', $registration->attendee())) { |
|
916 | + if ($show_errors) { |
|
917 | 917 | EE_Error::add_error( |
918 | - __( 'The newly saved Attendee object could not be cached on the registration.', 'event_espresso' ), |
|
918 | + __('The newly saved Attendee object could not be cached on the registration.', 'event_espresso'), |
|
919 | 919 | __FILE__, __FUNCTION__, __LINE__ |
920 | 920 | ); |
921 | 921 | } |
922 | 922 | } |
923 | 923 | } else { |
924 | - if ( $show_errors ) { |
|
924 | + if ($show_errors) { |
|
925 | 925 | EE_Error::add_error( |
926 | 926 | sprintf( |
927 | 927 | '%1$s||%1$s $attendee = %2$s', |
928 | - __( 'Either no Attendee information was found, or an invalid Attendee object was discovered when attempting to save your registration information.', 'event_espresso' ), |
|
929 | - var_export( $registration->attendee(), true ) |
|
928 | + __('Either no Attendee information was found, or an invalid Attendee object was discovered when attempting to save your registration information.', 'event_espresso'), |
|
929 | + var_export($registration->attendee(), true) |
|
930 | 930 | ), |
931 | 931 | __FILE__, __FUNCTION__, __LINE__ |
932 | 932 | ); |
@@ -944,25 +944,25 @@ discard block |
||
944 | 944 | * @return void |
945 | 945 | * @throws \EE_Error |
946 | 946 | */ |
947 | - private function _save_registration_answers( $registration, $show_errors = TRUE ) { |
|
947 | + private function _save_registration_answers($registration, $show_errors = TRUE) { |
|
948 | 948 | // now save the answers |
949 | - foreach ( $registration->answers() as $cache_key => $answer ) { |
|
949 | + foreach ($registration->answers() as $cache_key => $answer) { |
|
950 | 950 | // verify object |
951 | - if ( $answer instanceof EE_Answer ) { |
|
952 | - $answer->set_registration( $registration->ID() ); |
|
951 | + if ($answer instanceof EE_Answer) { |
|
952 | + $answer->set_registration($registration->ID()); |
|
953 | 953 | $answer->save(); |
954 | - if ( ! $registration->update_cache_after_object_save( 'Answer', $answer, $cache_key )) { |
|
955 | - if ( $show_errors ) { |
|
954 | + if ( ! $registration->update_cache_after_object_save('Answer', $answer, $cache_key)) { |
|
955 | + if ($show_errors) { |
|
956 | 956 | EE_Error::add_error( |
957 | - __( 'The newly saved Answer object could not be cached on the registration.', 'event_espresso' ), |
|
957 | + __('The newly saved Answer object could not be cached on the registration.', 'event_espresso'), |
|
958 | 958 | __FILE__, __FUNCTION__, __LINE__ |
959 | 959 | ); |
960 | 960 | } |
961 | 961 | } |
962 | 962 | } else { |
963 | - if ( $show_errors ) { |
|
963 | + if ($show_errors) { |
|
964 | 964 | EE_Error::add_error( |
965 | - __( 'An invalid Answer object was discovered when attempting to save your registration information.', 'event_espresso' ), |
|
965 | + __('An invalid Answer object was discovered when attempting to save your registration information.', 'event_espresso'), |
|
966 | 966 | __FILE__, __FUNCTION__, __LINE__ |
967 | 967 | ); |
968 | 968 | } |
@@ -981,7 +981,7 @@ discard block |
||
981 | 981 | * @return bool |
982 | 982 | * @throws \EE_Error |
983 | 983 | */ |
984 | - public function refresh_all_entities( $from_db = false ) { |
|
984 | + public function refresh_all_entities($from_db = false) { |
|
985 | 985 | $from_db = $this->current_step->is_final_step() || $this->action === 'process_gateway_response' |
986 | 986 | ? true |
987 | 987 | : $from_db; |
@@ -1005,11 +1005,11 @@ discard block |
||
1005 | 1005 | */ |
1006 | 1006 | protected function refresh_from_db() { |
1007 | 1007 | // verify the transaction |
1008 | - if ( $this->transaction instanceof EE_Transaction && $this->transaction->ID() ) { |
|
1008 | + if ($this->transaction instanceof EE_Transaction && $this->transaction->ID()) { |
|
1009 | 1009 | // pull fresh TXN data from the db |
1010 | - $this->transaction = $this->transaction->get_model()->refresh_entity_map_from_db( $this->transaction->ID() ); |
|
1010 | + $this->transaction = $this->transaction->get_model()->refresh_entity_map_from_db($this->transaction->ID()); |
|
1011 | 1011 | // update EE_Checkout's cached primary_attendee object |
1012 | - $this->primary_attendee_obj = $this->_refresh_primary_attendee_obj_from_db( $this->transaction ); |
|
1012 | + $this->primary_attendee_obj = $this->_refresh_primary_attendee_obj_from_db($this->transaction); |
|
1013 | 1013 | // update EE_Checkout's cached payment object |
1014 | 1014 | $payment = $this->transaction->last_payment(); |
1015 | 1015 | $this->payment = $payment instanceof EE_Payment ? $payment : $this->payment; |
@@ -1017,9 +1017,9 @@ discard block |
||
1017 | 1017 | $payment_method = $this->payment instanceof EE_Payment ? $this->payment->payment_method() : null; |
1018 | 1018 | $this->payment_method = $payment_method instanceof EE_Payment_Method ? $payment_method : $this->payment_method; |
1019 | 1019 | //now refresh the cart, based on the TXN |
1020 | - $this->cart = $this->get_cart_for_transaction( $this->transaction ); |
|
1020 | + $this->cart = $this->get_cart_for_transaction($this->transaction); |
|
1021 | 1021 | } else { |
1022 | - EE_Error::add_error( __( 'A valid Transaction was not found when attempting to update the model entity mapper.', 'event_espresso' ), __FILE__, __FUNCTION__, __LINE__); |
|
1022 | + EE_Error::add_error(__('A valid Transaction was not found when attempting to update the model entity mapper.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__); |
|
1023 | 1023 | return FALSE; |
1024 | 1024 | } |
1025 | 1025 | return TRUE; |
@@ -1034,21 +1034,21 @@ discard block |
||
1034 | 1034 | * @return EE_Attendee | null |
1035 | 1035 | * @throws \EE_Error |
1036 | 1036 | */ |
1037 | - protected function _refresh_primary_attendee_obj_from_db( EE_Transaction $transaction ) { |
|
1037 | + protected function _refresh_primary_attendee_obj_from_db(EE_Transaction $transaction) { |
|
1038 | 1038 | |
1039 | 1039 | $primary_attendee_obj = null; |
1040 | 1040 | // grab the saved registrations from the transaction |
1041 | - foreach ( $transaction->registrations( $this->reg_cache_where_params, true ) as $registration ) { |
|
1041 | + foreach ($transaction->registrations($this->reg_cache_where_params, true) as $registration) { |
|
1042 | 1042 | // verify object |
1043 | - if ( $registration instanceof EE_Registration ) { |
|
1043 | + if ($registration instanceof EE_Registration) { |
|
1044 | 1044 | $attendee = $registration->attendee(); |
1045 | 1045 | // verify object && maybe cache primary_attendee_obj ? |
1046 | - if ( $attendee instanceof EE_Attendee&& $registration->is_primary_registrant() ) { |
|
1046 | + if ($attendee instanceof EE_Attendee && $registration->is_primary_registrant()) { |
|
1047 | 1047 | $primary_attendee_obj = $attendee; |
1048 | 1048 | } |
1049 | 1049 | } else { |
1050 | 1050 | EE_Error::add_error( |
1051 | - __( 'An invalid Registration object was discovered when attempting to update the model entity mapper.', 'event_espresso' ), |
|
1051 | + __('An invalid Registration object was discovered when attempting to update the model entity mapper.', 'event_espresso'), |
|
1052 | 1052 | __FILE__, __FUNCTION__, __LINE__ |
1053 | 1053 | ); |
1054 | 1054 | } |
@@ -1069,43 +1069,43 @@ discard block |
||
1069 | 1069 | */ |
1070 | 1070 | protected function refresh_entity_map() { |
1071 | 1071 | // verify the transaction |
1072 | - if ( $this->transaction instanceof EE_Transaction && $this->transaction->ID() ) { |
|
1072 | + if ($this->transaction instanceof EE_Transaction && $this->transaction->ID()) { |
|
1073 | 1073 | // never cache payment info |
1074 | - $this->transaction->clear_cache( 'Payment' ); |
|
1074 | + $this->transaction->clear_cache('Payment'); |
|
1075 | 1075 | // is the Payment Options Reg Step completed ? |
1076 | - if ( $this->transaction->reg_step_completed( 'payment_options' ) ) { |
|
1076 | + if ($this->transaction->reg_step_completed('payment_options')) { |
|
1077 | 1077 | // then check for payments and update TXN accordingly |
1078 | 1078 | /** @type EE_Transaction_Payments $transaction_payments */ |
1079 | - $transaction_payments = EE_Registry::instance()->load_class( 'Transaction_Payments' ); |
|
1080 | - $transaction_payments->calculate_total_payments_and_update_status( $this->transaction ); |
|
1079 | + $transaction_payments = EE_Registry::instance()->load_class('Transaction_Payments'); |
|
1080 | + $transaction_payments->calculate_total_payments_and_update_status($this->transaction); |
|
1081 | 1081 | } |
1082 | 1082 | // grab the saved registrations from the transaction |
1083 | 1083 | foreach ( |
1084 | - $this->transaction->registrations( $this->reg_cache_where_params ) as $reg_cache_ID => $registration |
|
1084 | + $this->transaction->registrations($this->reg_cache_where_params) as $reg_cache_ID => $registration |
|
1085 | 1085 | ) { |
1086 | - $this->_refresh_registration( $reg_cache_ID, $registration ); |
|
1086 | + $this->_refresh_registration($reg_cache_ID, $registration); |
|
1087 | 1087 | } |
1088 | 1088 | // make sure our cached TXN is added to the model entity mapper |
1089 | - $this->transaction = $this->transaction->get_model()->refresh_entity_map_with( $this->transaction->ID(), $this->transaction ); |
|
1089 | + $this->transaction = $this->transaction->get_model()->refresh_entity_map_with($this->transaction->ID(), $this->transaction); |
|
1090 | 1090 | |
1091 | 1091 | } else { |
1092 | - EE_Error::add_error( __( 'A valid Transaction was not found when attempting to update the model entity mapper.', 'event_espresso' ), __FILE__, __FUNCTION__, __LINE__); |
|
1092 | + EE_Error::add_error(__('A valid Transaction was not found when attempting to update the model entity mapper.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__); |
|
1093 | 1093 | return FALSE; |
1094 | 1094 | } |
1095 | 1095 | // verify and update the cart because inaccurate totals are not so much fun |
1096 | - if ( $this->cart instanceof EE_Cart ) { |
|
1096 | + if ($this->cart instanceof EE_Cart) { |
|
1097 | 1097 | $grand_total = $this->cart->get_grand_total(); |
1098 | - if ( $grand_total instanceof EE_Line_Item && $grand_total->ID() ) { |
|
1098 | + if ($grand_total instanceof EE_Line_Item && $grand_total->ID()) { |
|
1099 | 1099 | $grand_total->recalculate_total_including_taxes(); |
1100 | 1100 | $grand_total = $grand_total->get_model()->refresh_entity_map_with( |
1101 | 1101 | $this->cart->get_grand_total()->ID(), |
1102 | 1102 | $this->cart->get_grand_total() |
1103 | 1103 | ); |
1104 | 1104 | } |
1105 | - if ( $grand_total instanceof EE_Line_Item ) { |
|
1106 | - $this->cart = EE_Cart::instance( $grand_total ); |
|
1105 | + if ($grand_total instanceof EE_Line_Item) { |
|
1106 | + $this->cart = EE_Cart::instance($grand_total); |
|
1107 | 1107 | } else { |
1108 | - EE_Error::add_error( __( 'A valid Cart was not found when attempting to update the model entity mapper.', 'event_espresso' ), __FILE__, __FUNCTION__, __LINE__ ); |
|
1108 | + EE_Error::add_error(__('A valid Cart was not found when attempting to update the model entity mapper.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__); |
|
1109 | 1109 | return false; |
1110 | 1110 | } |
1111 | 1111 | } |
@@ -1122,19 +1122,19 @@ discard block |
||
1122 | 1122 | * @return void |
1123 | 1123 | * @throws \EE_Error |
1124 | 1124 | */ |
1125 | - protected function _refresh_registration( $reg_cache_ID, $registration ) { |
|
1125 | + protected function _refresh_registration($reg_cache_ID, $registration) { |
|
1126 | 1126 | |
1127 | 1127 | // verify object |
1128 | - if ( $registration instanceof EE_Registration ) { |
|
1128 | + if ($registration instanceof EE_Registration) { |
|
1129 | 1129 | // update the entity mapper attendee |
1130 | - $this->_refresh_registration_attendee( $registration ); |
|
1130 | + $this->_refresh_registration_attendee($registration); |
|
1131 | 1131 | // update the entity mapper answers for reg form questions |
1132 | - $this->_refresh_registration_answers( $registration ); |
|
1132 | + $this->_refresh_registration_answers($registration); |
|
1133 | 1133 | // make sure the cached registration is added to the model entity mapper |
1134 | - $registration->get_model()->refresh_entity_map_with( $reg_cache_ID, $registration ); |
|
1134 | + $registration->get_model()->refresh_entity_map_with($reg_cache_ID, $registration); |
|
1135 | 1135 | } else { |
1136 | 1136 | EE_Error::add_error( |
1137 | - __( 'An invalid Registration object was discovered when attempting to update the model entity mapper.', 'event_espresso' ), |
|
1137 | + __('An invalid Registration object was discovered when attempting to update the model entity mapper.', 'event_espresso'), |
|
1138 | 1138 | __FILE__, __FUNCTION__, __LINE__ |
1139 | 1139 | ); |
1140 | 1140 | } |
@@ -1149,15 +1149,15 @@ discard block |
||
1149 | 1149 | * @return void |
1150 | 1150 | * @throws \EE_Error |
1151 | 1151 | */ |
1152 | - protected function _refresh_registration_attendee( $registration ) { |
|
1152 | + protected function _refresh_registration_attendee($registration) { |
|
1153 | 1153 | |
1154 | 1154 | $attendee = $registration->attendee(); |
1155 | 1155 | // verify object |
1156 | - if ( $attendee instanceof EE_Attendee && $attendee->ID() ) { |
|
1156 | + if ($attendee instanceof EE_Attendee && $attendee->ID()) { |
|
1157 | 1157 | // make sure the cached attendee is added to the model entity mapper |
1158 | - $registration->attendee()->get_model()->refresh_entity_map_with( $attendee->ID(), $attendee ); |
|
1158 | + $registration->attendee()->get_model()->refresh_entity_map_with($attendee->ID(), $attendee); |
|
1159 | 1159 | // maybe cache primary_attendee_obj ? |
1160 | - if ( $registration->is_primary_registrant() ) { |
|
1160 | + if ($registration->is_primary_registrant()) { |
|
1161 | 1161 | $this->primary_attendee_obj = $attendee; |
1162 | 1162 | } |
1163 | 1163 | } |
@@ -1172,19 +1172,19 @@ discard block |
||
1172 | 1172 | * @return void |
1173 | 1173 | * @throws \EE_Error |
1174 | 1174 | */ |
1175 | - protected function _refresh_registration_answers( $registration ) { |
|
1175 | + protected function _refresh_registration_answers($registration) { |
|
1176 | 1176 | |
1177 | 1177 | // now update the answers |
1178 | - foreach ( $registration->answers() as $cache_key => $answer ) { |
|
1178 | + foreach ($registration->answers() as $cache_key => $answer) { |
|
1179 | 1179 | // verify object |
1180 | - if ( $answer instanceof EE_Answer ) { |
|
1181 | - if ( $answer->ID() ) { |
|
1180 | + if ($answer instanceof EE_Answer) { |
|
1181 | + if ($answer->ID()) { |
|
1182 | 1182 | // make sure the cached answer is added to the model entity mapper |
1183 | - $answer->get_model()->refresh_entity_map_with( $answer->ID(), $answer ); |
|
1183 | + $answer->get_model()->refresh_entity_map_with($answer->ID(), $answer); |
|
1184 | 1184 | } |
1185 | 1185 | } else { |
1186 | 1186 | EE_Error::add_error( |
1187 | - __( 'An invalid Answer object was discovered when attempting to update the model entity mapper.', 'event_espresso' ), |
|
1187 | + __('An invalid Answer object was discovered when attempting to update the model entity mapper.', 'event_espresso'), |
|
1188 | 1188 | __FILE__, __FUNCTION__, __LINE__ |
1189 | 1189 | ); |
1190 | 1190 | } |
@@ -1204,13 +1204,13 @@ discard block |
||
1204 | 1204 | */ |
1205 | 1205 | public function __sleep() |
1206 | 1206 | { |
1207 | - if ( $this->primary_attendee_obj instanceof EE_Attendee && $this->primary_attendee_obj->ID() ) { |
|
1207 | + if ($this->primary_attendee_obj instanceof EE_Attendee && $this->primary_attendee_obj->ID()) { |
|
1208 | 1208 | $this->primary_attendee_obj = $this->primary_attendee_obj->ID(); |
1209 | 1209 | } // remove the reg form and the checkout |
1210 | - if ( $this->transaction instanceof EE_Transaction && $this->transaction->ID() ) { |
|
1210 | + if ($this->transaction instanceof EE_Transaction && $this->transaction->ID()) { |
|
1211 | 1211 | $this->transaction = $this->transaction->ID(); |
1212 | 1212 | } // remove the reg form and the checkout |
1213 | - return array_diff( array_keys( get_object_vars( $this ) ), array( 'billing_form', 'registration_form' ) ); |
|
1213 | + return array_diff(array_keys(get_object_vars($this)), array('billing_form', 'registration_form')); |
|
1214 | 1214 | } |
1215 | 1215 | |
1216 | 1216 | |
@@ -1220,15 +1220,15 @@ discard block |
||
1220 | 1220 | * this will reinstate the EE_Checkout object on each EE_SPCO_Reg_Step object |
1221 | 1221 | */ |
1222 | 1222 | public function __wakeup() { |
1223 | - if ( ! $this->primary_attendee_obj instanceof EE_Attendee && absint( $this->primary_attendee_obj ) !== 0 ) { |
|
1223 | + if ( ! $this->primary_attendee_obj instanceof EE_Attendee && absint($this->primary_attendee_obj) !== 0) { |
|
1224 | 1224 | // $this->primary_attendee_obj is actually just an ID, so use it to get the object from the db |
1225 | - $this->primary_attendee_obj = EEM_Attendee::instance()->get_one_by_ID( $this->primary_attendee_obj ); |
|
1225 | + $this->primary_attendee_obj = EEM_Attendee::instance()->get_one_by_ID($this->primary_attendee_obj); |
|
1226 | 1226 | } |
1227 | - if ( ! $this->transaction instanceof EE_Transaction && absint( $this->transaction ) !== 0 ) { |
|
1227 | + if ( ! $this->transaction instanceof EE_Transaction && absint($this->transaction) !== 0) { |
|
1228 | 1228 | // $this->transaction is actually just an ID, so use it to get the object from the db |
1229 | - $this->transaction = EEM_Transaction::instance()->get_one_by_ID( $this->transaction ); |
|
1229 | + $this->transaction = EEM_Transaction::instance()->get_one_by_ID($this->transaction); |
|
1230 | 1230 | } |
1231 | - foreach ( $this->reg_steps as $reg_step ) { |
|
1231 | + foreach ($this->reg_steps as $reg_step) { |
|
1232 | 1232 | $reg_step->checkout = $this; |
1233 | 1233 | } |
1234 | 1234 | } |
@@ -1245,12 +1245,12 @@ discard block |
||
1245 | 1245 | * @param bool $display_request |
1246 | 1246 | * @throws \EE_Error |
1247 | 1247 | */ |
1248 | - public function log( $class = '', $func = '', $line = '', $info = array(), $display_request = false ) { |
|
1248 | + public function log($class = '', $func = '', $line = '', $info = array(), $display_request = false) { |
|
1249 | 1249 | $disabled = true; |
1250 | - if ( WP_DEBUG && ! $disabled ) { |
|
1251 | - $debug_data = get_option( 'EE_DEBUG_SPCO_' . EE_Session::instance()->id(), array() ); |
|
1250 | + if (WP_DEBUG && ! $disabled) { |
|
1251 | + $debug_data = get_option('EE_DEBUG_SPCO_'.EE_Session::instance()->id(), array()); |
|
1252 | 1252 | $default_data = array( |
1253 | - $class => $func . '() : ' . $line, |
|
1253 | + $class => $func.'() : '.$line, |
|
1254 | 1254 | 'request->step' => $this->step, |
1255 | 1255 | 'request->action' => $this->action, |
1256 | 1256 | 'current_step->slug' => $this->current_step instanceof EE_SPCO_Reg_Step ? |
@@ -1262,24 +1262,24 @@ discard block |
||
1262 | 1262 | 'reg_url_link' => $this->reg_url_link, |
1263 | 1263 | 'REQ' => $display_request ? $_REQUEST : '', |
1264 | 1264 | ); |
1265 | - if ( $this->transaction instanceof EE_Transaction ) { |
|
1266 | - $default_data[ 'TXN_status' ] = $this->transaction->status_ID(); |
|
1267 | - $default_data[ 'TXN_reg_steps' ] = $this->transaction->reg_steps(); |
|
1268 | - foreach ( $this->transaction->registrations( $this->reg_cache_where_params ) as $REG_ID => $registration ) { |
|
1269 | - $default_data[ 'registrations' ][ $REG_ID ] = $registration->status_ID(); |
|
1265 | + if ($this->transaction instanceof EE_Transaction) { |
|
1266 | + $default_data['TXN_status'] = $this->transaction->status_ID(); |
|
1267 | + $default_data['TXN_reg_steps'] = $this->transaction->reg_steps(); |
|
1268 | + foreach ($this->transaction->registrations($this->reg_cache_where_params) as $REG_ID => $registration) { |
|
1269 | + $default_data['registrations'][$REG_ID] = $registration->status_ID(); |
|
1270 | 1270 | } |
1271 | - if ( $this->transaction->ID() ) { |
|
1272 | - $TXN_ID = 'EE_Transaction: ' . $this->transaction->ID(); |
|
1271 | + if ($this->transaction->ID()) { |
|
1272 | + $TXN_ID = 'EE_Transaction: '.$this->transaction->ID(); |
|
1273 | 1273 | // don't serialize objects |
1274 | - $info = $this->_strip_objects( $info ); |
|
1275 | - if ( ! isset( $debug_data[ $TXN_ID ] ) ) { |
|
1276 | - $debug_data[ $TXN_ID ] = array(); |
|
1274 | + $info = $this->_strip_objects($info); |
|
1275 | + if ( ! isset($debug_data[$TXN_ID])) { |
|
1276 | + $debug_data[$TXN_ID] = array(); |
|
1277 | 1277 | } |
1278 | - $debug_data[ $TXN_ID ][ microtime() ] = array_merge( |
|
1278 | + $debug_data[$TXN_ID][microtime()] = array_merge( |
|
1279 | 1279 | $default_data, |
1280 | 1280 | $info |
1281 | 1281 | ); |
1282 | - update_option( 'EE_DEBUG_SPCO_' . EE_Session::instance()->id(), $debug_data ); |
|
1282 | + update_option('EE_DEBUG_SPCO_'.EE_Session::instance()->id(), $debug_data); |
|
1283 | 1283 | } |
1284 | 1284 | } |
1285 | 1285 | } |
@@ -1292,23 +1292,23 @@ discard block |
||
1292 | 1292 | * @param array $info |
1293 | 1293 | * @return array |
1294 | 1294 | */ |
1295 | - public function _strip_objects( $info = array() ) { |
|
1296 | - foreach ( (array)$info as $key => $value ) { |
|
1297 | - if ( is_array( $value )) { |
|
1298 | - $info[ $key ] = $this->_strip_objects( $value ); |
|
1299 | - } else if ( is_object( $value ) ) { |
|
1300 | - $object_class = get_class( $value ); |
|
1301 | - $info[ $object_class ] = array(); |
|
1302 | - $info[ $object_class ][ 'ID' ] = method_exists( $value, 'ID' ) ? $value->ID() : 0; |
|
1303 | - if ( method_exists( $value, 'status' ) ) { |
|
1304 | - $info[ $object_class ][ 'status' ] = $value->status(); |
|
1305 | - } else if ( method_exists( $value, 'status_ID' ) ) { |
|
1306 | - $info[ $object_class ][ 'status' ] = $value->status_ID(); |
|
1295 | + public function _strip_objects($info = array()) { |
|
1296 | + foreach ((array) $info as $key => $value) { |
|
1297 | + if (is_array($value)) { |
|
1298 | + $info[$key] = $this->_strip_objects($value); |
|
1299 | + } else if (is_object($value)) { |
|
1300 | + $object_class = get_class($value); |
|
1301 | + $info[$object_class] = array(); |
|
1302 | + $info[$object_class]['ID'] = method_exists($value, 'ID') ? $value->ID() : 0; |
|
1303 | + if (method_exists($value, 'status')) { |
|
1304 | + $info[$object_class]['status'] = $value->status(); |
|
1305 | + } else if (method_exists($value, 'status_ID')) { |
|
1306 | + $info[$object_class]['status'] = $value->status_ID(); |
|
1307 | 1307 | } |
1308 | - unset( $info[ $key ] ); |
|
1308 | + unset($info[$key]); |
|
1309 | 1309 | } |
1310 | 1310 | } |
1311 | - return (array)$info; |
|
1311 | + return (array) $info; |
|
1312 | 1312 | } |
1313 | 1313 | |
1314 | 1314 |
@@ -4,7 +4,7 @@ discard block |
||
4 | 4 | use EventEspresso\core\domain\services\ticket\CancelTicketLineItemService; |
5 | 5 | |
6 | 6 | if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
7 | - exit('No direct script access allowed'); |
|
7 | + exit('No direct script access allowed'); |
|
8 | 8 | } |
9 | 9 | |
10 | 10 | |
@@ -21,22 +21,22 @@ discard block |
||
21 | 21 | class CancelRegistrationService |
22 | 22 | { |
23 | 23 | |
24 | - /** |
|
25 | - * @var CancelTicketLineItemService $cancel_ticket_line_item_service |
|
26 | - */ |
|
27 | - private $cancel_ticket_line_item_service; |
|
24 | + /** |
|
25 | + * @var CancelTicketLineItemService $cancel_ticket_line_item_service |
|
26 | + */ |
|
27 | + private $cancel_ticket_line_item_service; |
|
28 | 28 | |
29 | 29 | |
30 | 30 | |
31 | - /** |
|
32 | - * Command constructor |
|
33 | - * |
|
34 | - * @param CancelTicketLineItemService $cancel_ticket_line_item_service |
|
35 | - */ |
|
36 | - public function __construct(CancelTicketLineItemService $cancel_ticket_line_item_service) |
|
37 | - { |
|
38 | - $this->cancel_ticket_line_item_service = $cancel_ticket_line_item_service; |
|
39 | - } |
|
31 | + /** |
|
32 | + * Command constructor |
|
33 | + * |
|
34 | + * @param CancelTicketLineItemService $cancel_ticket_line_item_service |
|
35 | + */ |
|
36 | + public function __construct(CancelTicketLineItemService $cancel_ticket_line_item_service) |
|
37 | + { |
|
38 | + $this->cancel_ticket_line_item_service = $cancel_ticket_line_item_service; |
|
39 | + } |
|
40 | 40 | |
41 | 41 | |
42 | 42 | |
@@ -44,27 +44,27 @@ discard block |
||
44 | 44 | * @param \EE_Registration $registration |
45 | 45 | * @param bool $cancel_ticket_line_item |
46 | 46 | */ |
47 | - public function cancelRegistrationAndTicketLineItem(\EE_Registration $registration, $cancel_ticket_line_item = true) |
|
48 | - { |
|
49 | - // first cancel the original line item for the registration's ticket |
|
50 | - if ( $cancel_ticket_line_item ) { |
|
51 | - $this->cancel_ticket_line_item_service->forRegistration( $registration ); |
|
52 | - } |
|
53 | - $this->cancelRegistrationOnly($registration); |
|
54 | - } |
|
55 | - |
|
56 | - |
|
57 | - |
|
58 | - /** |
|
59 | - * @param \EE_Registration $registration |
|
60 | - * @throws \EE_Error |
|
61 | - */ |
|
62 | - public function cancelRegistrationOnly(\EE_Registration $registration) |
|
63 | - { |
|
64 | - // now cancel the registration itself |
|
65 | - $registration->set_status(\EEM_Registration::status_id_cancelled); |
|
66 | - $registration->save(); |
|
67 | - } |
|
47 | + public function cancelRegistrationAndTicketLineItem(\EE_Registration $registration, $cancel_ticket_line_item = true) |
|
48 | + { |
|
49 | + // first cancel the original line item for the registration's ticket |
|
50 | + if ( $cancel_ticket_line_item ) { |
|
51 | + $this->cancel_ticket_line_item_service->forRegistration( $registration ); |
|
52 | + } |
|
53 | + $this->cancelRegistrationOnly($registration); |
|
54 | + } |
|
55 | + |
|
56 | + |
|
57 | + |
|
58 | + /** |
|
59 | + * @param \EE_Registration $registration |
|
60 | + * @throws \EE_Error |
|
61 | + */ |
|
62 | + public function cancelRegistrationOnly(\EE_Registration $registration) |
|
63 | + { |
|
64 | + // now cancel the registration itself |
|
65 | + $registration->set_status(\EEM_Registration::status_id_cancelled); |
|
66 | + $registration->save(); |
|
67 | + } |
|
68 | 68 | |
69 | 69 | |
70 | 70 |
@@ -47,8 +47,8 @@ |
||
47 | 47 | public function cancelRegistrationAndTicketLineItem(\EE_Registration $registration, $cancel_ticket_line_item = true) |
48 | 48 | { |
49 | 49 | // first cancel the original line item for the registration's ticket |
50 | - if ( $cancel_ticket_line_item ) { |
|
51 | - $this->cancel_ticket_line_item_service->forRegistration( $registration ); |
|
50 | + if ($cancel_ticket_line_item) { |
|
51 | + $this->cancel_ticket_line_item_service->forRegistration($registration); |
|
52 | 52 | } |
53 | 53 | $this->cancelRegistrationOnly($registration); |
54 | 54 | } |
@@ -1,12 +1,12 @@ |
||
1 | 1 | <div style="float:right"> |
2 | - <?php printf( __( 'View %1$sRegistrations%4$s / %2$sTransactions%4$s for this %3$sevent%4$s.', 'event_espresso' ), '<a href="' . $filtered_registrations_link . '">', '<a href="' . $filtered_transactions_link . '">', '<a href="' . $event_link . '">', '</a>' );?> |
|
2 | + <?php printf(__('View %1$sRegistrations%4$s / %2$sTransactions%4$s for this %3$sevent%4$s.', 'event_espresso'), '<a href="'.$filtered_registrations_link.'">', '<a href="'.$filtered_transactions_link.'">', '<a href="'.$event_link.'">', '</a>'); ?> |
|
3 | 3 | </div> |
4 | -<h3 id="reg-admin-reg-details-reg-nmbr-hdr"><?php echo $previous_registration . ' '; echo __( 'Registration # ', 'event_espresso' ) . $reg_nmbr['value']; echo ' ' . $next_registration; ?></h3> |
|
5 | -<h2 id="reg-admin-reg-details-reg-date-hdr"><?php echo $reg_datetime['value'];?></h2> |
|
4 | +<h3 id="reg-admin-reg-details-reg-nmbr-hdr"><?php echo $previous_registration.' '; echo __('Registration # ', 'event_espresso').$reg_nmbr['value']; echo ' '.$next_registration; ?></h3> |
|
5 | +<h2 id="reg-admin-reg-details-reg-date-hdr"><?php echo $reg_datetime['value']; ?></h2> |
|
6 | 6 | |
7 | -<?php if ( $registration->group_size() > 1 ) : ?> |
|
8 | - <a id="scroll-to-other-attendees" class="scroll-to" href="#other-attendees"><?php echo __( 'Scroll to Other Registrations in the Same Transaction', 'event_espresso' );?></a> |
|
7 | +<?php if ($registration->group_size() > 1) : ?> |
|
8 | + <a id="scroll-to-other-attendees" class="scroll-to" href="#other-attendees"><?php echo __('Scroll to Other Registrations in the Same Transaction', 'event_espresso'); ?></a> |
|
9 | 9 | <?php endif; ?> |
10 | 10 | |
11 | -<?php do_action( 'AHEE__reg_status_change_buttons__after_header', $REG_ID ); ?> |
|
11 | +<?php do_action('AHEE__reg_status_change_buttons__after_header', $REG_ID); ?> |
|
12 | 12 |
@@ -23,15 +23,15 @@ discard block |
||
23 | 23 | </td> |
24 | 24 | <td> |
25 | 25 | <div id="invoice-info"> |
26 | - <h2 id="invoice-hdr"><?php _e( 'Order Confirmation', 'event_espresso' ) ?></h2> |
|
26 | + <h2 id="invoice-hdr"><?php _e('Order Confirmation', 'event_espresso') ?></h2> |
|
27 | 27 | |
28 | - <h3 id="invoice-date"><?php _e( 'Date:', 'event_espresso' ) ?> |
|
28 | + <h3 id="invoice-date"><?php _e('Date:', 'event_espresso') ?> |
|
29 | 29 | <span class="plain-text">[PRIMARY_REGISTRANT_REGISTRATION_DATE]</span></h3> |
30 | 30 | |
31 | - <h3 id="invoice-txn-id"><?php _e( 'Transaction ID:', 'event_espresso' ) ?> |
|
31 | + <h3 id="invoice-txn-id"><?php _e('Transaction ID:', 'event_espresso') ?> |
|
32 | 32 | <span class="plain-text">[TXN_ID]</span></h3> |
33 | 33 | |
34 | - <h3 id="invoice-txn-status"><?php _e( 'Status:', 'event_espresso' ) ?> |
|
34 | + <h3 id="invoice-txn-status"><?php _e('Status:', 'event_espresso') ?> |
|
35 | 35 | <span class="[TXN_STATUS_ID] plain-text">[TXN_STATUS]</span></h3> |
36 | 36 | </div> |
37 | 37 | </td> |
@@ -41,15 +41,15 @@ discard block |
||
41 | 41 | [EVENT_LIST] |
42 | 42 | </div> |
43 | 43 | <div class="taxes"> |
44 | - <h3 class="section-title"><?php _e( "Additional Charges/Discounts", 'event_espresso' ) ?></h3> |
|
44 | + <h3 class="section-title"><?php _e("Additional Charges/Discounts", 'event_espresso') ?></h3> |
|
45 | 45 | <table class="invoice-amount"> |
46 | 46 | <thead> |
47 | 47 | <tr class="header_row"> |
48 | - <th class="left ticket_th"><?php _e( "Name", "event_espresso" ); ?></th> |
|
49 | - <th class="left"><?php _e( 'Description', 'event_espresso' ); ?></th> |
|
50 | - <th class="event_th item_c"><?php _e( 'Quantity', 'event_espresso' ); ?></th> |
|
51 | - <th class="event_th item_c"><?php _e( 'Unit Price', 'event_espresso' ); ?></th> |
|
52 | - <th class="subtotal_th"><?php _e( 'Total', 'event_espresso' ); ?></th> |
|
48 | + <th class="left ticket_th"><?php _e("Name", "event_espresso"); ?></th> |
|
49 | + <th class="left"><?php _e('Description', 'event_espresso'); ?></th> |
|
50 | + <th class="event_th item_c"><?php _e('Quantity', 'event_espresso'); ?></th> |
|
51 | + <th class="event_th item_c"><?php _e('Unit Price', 'event_espresso'); ?></th> |
|
52 | + <th class="subtotal_th"><?php _e('Total', 'event_espresso'); ?></th> |
|
53 | 53 | </tr> |
54 | 54 | </thead> |
55 | 55 | <tbody> |
@@ -60,15 +60,15 @@ discard block |
||
60 | 60 | </table> |
61 | 61 | </div> |
62 | 62 | <div class="taxes"> |
63 | - <h3 class="section-title"><?php _e( "Taxes", 'event_espresso' ) ?></h3> |
|
64 | - <p><?php printf( __( '%s*%s Taxable items. The total amount collected for taxes is reflected in the total(s) below.', 'event_espresso' ), '<strong>', '</strong>' ); ?></p> |
|
63 | + <h3 class="section-title"><?php _e("Taxes", 'event_espresso') ?></h3> |
|
64 | + <p><?php printf(__('%s*%s Taxable items. The total amount collected for taxes is reflected in the total(s) below.', 'event_espresso'), '<strong>', '</strong>'); ?></p> |
|
65 | 65 | <table class="invoice-amount"> |
66 | 66 | <thead> |
67 | 67 | <tr class="header_row"> |
68 | - <th class="left ticket_th"><?php _e( "Tax Name", "event_espresso" ); ?></th> |
|
69 | - <th class="left"><?php _e( 'Description', 'event_espresso' ); ?></th> |
|
70 | - <th class="event_th item_c"><?php _e( 'Rate', 'event_espresso' ); ?></th> |
|
71 | - <th class="subtotal_th"><?php _e( 'Tax Amount', 'event_espresso' ); ?></th> |
|
68 | + <th class="left ticket_th"><?php _e("Tax Name", "event_espresso"); ?></th> |
|
69 | + <th class="left"><?php _e('Description', 'event_espresso'); ?></th> |
|
70 | + <th class="event_th item_c"><?php _e('Rate', 'event_espresso'); ?></th> |
|
71 | + <th class="subtotal_th"><?php _e('Tax Amount', 'event_espresso'); ?></th> |
|
72 | 72 | </tr> |
73 | 73 | </thead> |
74 | 74 | <tbody> |
@@ -79,19 +79,19 @@ discard block |
||
79 | 79 | </table> |
80 | 80 | </div> |
81 | 81 | <div class="grand-total-dv"> |
82 | - <h2 class="grand-total"><?php printf( __( "Grand Total: %s", "event_espresso" ), '[TOTAL_COST]' ); ?></h2> |
|
82 | + <h2 class="grand-total"><?php printf(__("Grand Total: %s", "event_espresso"), '[TOTAL_COST]'); ?></h2> |
|
83 | 83 | </div> |
84 | 84 | <div class="payment-dv"> |
85 | - <h3 class="section-title"><?php _e( "Payments", 'event_espresso' ) ?></h3> |
|
85 | + <h3 class="section-title"><?php _e("Payments", 'event_espresso') ?></h3> |
|
86 | 86 | <table class="invoice-amount"> |
87 | 87 | <thead> |
88 | 88 | <tr class="header_row"> |
89 | - <th><span class=""><?php _e( 'Payment Method', 'event_espresso' ); ?></span></th> |
|
90 | - <th class='left datetime_th'><?php _e( "Date", 'event_espresso' ) ?></th> |
|
91 | - <th><span class=""><?php _e( 'Transaction Id / Cheque #', 'event_espresso' ); ?></span></th> |
|
92 | - <th><span class=""><?php _e( 'P.O. / S.O.#', 'event_espresso' ); ?></span></th> |
|
93 | - <th><span class=""><?php _e( 'Status', 'event_espresso' ); ?></span></th> |
|
94 | - <th><?php _e( 'Amount', 'event_espresso' ); ?></th> |
|
89 | + <th><span class=""><?php _e('Payment Method', 'event_espresso'); ?></span></th> |
|
90 | + <th class='left datetime_th'><?php _e("Date", 'event_espresso') ?></th> |
|
91 | + <th><span class=""><?php _e('Transaction Id / Cheque #', 'event_espresso'); ?></span></th> |
|
92 | + <th><span class=""><?php _e('P.O. / S.O.#', 'event_espresso'); ?></span></th> |
|
93 | + <th><span class=""><?php _e('Status', 'event_espresso'); ?></span></th> |
|
94 | + <th><?php _e('Amount', 'event_espresso'); ?></th> |
|
95 | 95 | </tr> |
96 | 96 | </thead> |
97 | 97 | <tbody> |
@@ -105,21 +105,21 @@ discard block |
||
105 | 105 | <tfoot> |
106 | 106 | <tr class='total_tr'> |
107 | 107 | <td colspan="4"> </td> |
108 | - <td class="item_r"><?php _e( 'Total Paid', 'event_espresso' ) ?></td> |
|
108 | + <td class="item_r"><?php _e('Total Paid', 'event_espresso') ?></td> |
|
109 | 109 | <td class="item_r">[TOTAL_AMOUNT_PAID]</td> |
110 | 110 | </tr> |
111 | 111 | <tr class="total_tr odd"> |
112 | 112 | <td colspan="4"> </td> |
113 | - <td class="total" id="total_currency"><?php _e( 'Amount Owed:', 'event_espresso' ); ?></td> |
|
113 | + <td class="total" id="total_currency"><?php _e('Amount Owed:', 'event_espresso'); ?></td> |
|
114 | 114 | <td class="total">[TOTAL_OWING]</td> |
115 | 115 | </tr> |
116 | 116 | </tfoot> |
117 | 117 | </table> |
118 | 118 | </div> |
119 | 119 | <div class="additional-info-dv"> |
120 | - <h3 class="section-title"><?php _e( "Additional Information:", "event_espresso" ); ?></h3> |
|
120 | + <h3 class="section-title"><?php _e("Additional Information:", "event_espresso"); ?></h3> |
|
121 | 121 | <div class="additional-info"> |
122 | - <h2><?php _e( "Venue Details:", "event_espresso" ); ?></h2> |
|
122 | + <h2><?php _e("Venue Details:", "event_espresso"); ?></h2> |
|
123 | 123 | <table class="venue-list"> |
124 | 124 | <tr class="venue-details"> |
125 | 125 | <td class="venue-details-part venue-address-dv"> |
@@ -8,9 +8,9 @@ discard block |
||
8 | 8 | * @param $class_file |
9 | 9 | * @return array |
10 | 10 | */ |
11 | -function espresso_invoice_template_files( $class_file) { |
|
11 | +function espresso_invoice_template_files($class_file) { |
|
12 | 12 | // read our template dir and build an array of files |
13 | - $dhandle = opendir(dirname($class_file) . '/lib/templates/css/'); //If the template files have been moved to the uploads folder |
|
13 | + $dhandle = opendir(dirname($class_file).'/lib/templates/css/'); //If the template files have been moved to the uploads folder |
|
14 | 14 | //} else return FALSE; |
15 | 15 | |
16 | 16 | $files = array(); |
@@ -50,8 +50,8 @@ discard block |
||
50 | 50 | * @param string $selected |
51 | 51 | * @return string |
52 | 52 | */ |
53 | -function espresso_invoice_is_selected( $input_item, $selected='') { |
|
54 | - if ( $input_item === $selected ) { |
|
53 | +function espresso_invoice_is_selected($input_item, $selected = '') { |
|
54 | + if ($input_item === $selected) { |
|
55 | 55 | return 'selected="selected"'; |
56 | 56 | } else { |
57 | 57 | return ''; |
@@ -2,7 +2,7 @@ discard block |
||
2 | 2 | use EventEspresso\core\services\database\TableAnalysis; |
3 | 3 | use EventEspresso\core\services\database\TableManager; |
4 | 4 | |
5 | -if ( ! defined( 'EVENT_ESPRESSO_VERSION')) { |
|
5 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
|
6 | 6 | exit('No direct script access allowed'); |
7 | 7 | } |
8 | 8 | |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | */ |
21 | 21 | /** |
22 | 22 | */ |
23 | -class EE_DMS_Unknown_1_0_0 extends EE_Data_Migration_Script_Base{ |
|
23 | +class EE_DMS_Unknown_1_0_0 extends EE_Data_Migration_Script_Base { |
|
24 | 24 | |
25 | 25 | /** |
26 | 26 | * Returns whether or not this data migration script can operate on the given version of the database. |
@@ -47,11 +47,11 @@ discard block |
||
47 | 47 | * @param TableManager $table_manager |
48 | 48 | * @param TableAnalysis $table_analysis |
49 | 49 | */ |
50 | - public function __construct( TableManager $table_manager = null, TableAnalysis $table_analysis = null ) { |
|
50 | + public function __construct(TableManager $table_manager = null, TableAnalysis $table_analysis = null) { |
|
51 | 51 | $this->_migration_stages = array(); |
52 | 52 | $this->_pretty_name = __("Fatal Uncatchable Error Occurred", "event_espresso"); |
53 | 53 | // dd($this); |
54 | - parent::__construct( $table_manager, $table_analysis ); |
|
54 | + parent::__construct($table_manager, $table_analysis); |
|
55 | 55 | } |
56 | 56 | public function migration_page_hooks() { |
57 | 57 |