Completed
Branch FET-10486-add-timestamp-checki... (611b15)
by
unknown
136:24 queued 121:17
created
modules/ticket_selector/templates/standard_ticket_selector.template.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 ?>
22 22
 <div id="tkt-slctr-tbl-wrap-dv-<?php echo $EVT_ID; ?>" class="tkt-slctr-tbl-wrap-dv">
23 23
 
24
-	<?php do_action( 'AHEE__ticket_selector_chart__template__before_ticket_selector', $event ); ?>
24
+	<?php do_action('AHEE__ticket_selector_chart__template__before_ticket_selector', $event); ?>
25 25
 	<?php echo $datetime_selector; ?>
26 26
 
27 27
 	<table id="tkt-slctr-tbl-<?php echo $EVT_ID; ?>" class="tkt-slctr-tbl">
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
                     );
37 37
                     ?>
38 38
 				</th>
39
-				<?php if ( apply_filters( 'FHEE__ticket_selector_chart_template__display_ticket_price_details', TRUE ) ) { ?>
39
+				<?php if (apply_filters('FHEE__ticket_selector_chart_template__display_ticket_price_details', TRUE)) { ?>
40 40
 				<th scope="col" class="ee-ticket-selector-ticket-price-th cntr">
41 41
 					<?php
42 42
 						/**
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 						 */
50 50
 						echo apply_filters(
51 51
                             'FHEE__ticket_selector_chart_template__table_header_price',
52
-                            esc_html__( 'Price', 'event_espresso' ),
52
+                            esc_html__('Price', 'event_espresso'),
53 53
                             $EVT_ID
54 54
                         );
55 55
 					?>
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 						*/
68 68
 						echo apply_filters(
69 69
                             'FHEE__ticket_selector_chart_template__table_header_qty',
70
-                            esc_html__( 'Qty', 'event_espresso' ),
70
+                            esc_html__('Qty', 'event_espresso'),
71 71
                             $EVT_ID
72 72
                         );
73 73
 					?>
@@ -75,17 +75,17 @@  discard block
 block discarded – undo
75 75
 			</tr>
76 76
 		</thead>
77 77
 		<tbody>
78
-			<?php echo $ticket_row_html;?>
78
+			<?php echo $ticket_row_html; ?>
79 79
 		</tbody>
80 80
 	</table>
81 81
 	<?php
82
-	if ( $taxable_tickets && apply_filters( 'FHEE__ticket_selector_chart_template__display_ticket_price_details', true ) ) {
83
-		if ( $prices_displayed_including_taxes ) {
84
-			$ticket_price_includes_taxes = esc_html__( '* price includes taxes', 'event_espresso' );
82
+	if ($taxable_tickets && apply_filters('FHEE__ticket_selector_chart_template__display_ticket_price_details', true)) {
83
+		if ($prices_displayed_including_taxes) {
84
+			$ticket_price_includes_taxes = esc_html__('* price includes taxes', 'event_espresso');
85 85
 		} else {
86
-			$ticket_price_includes_taxes = esc_html__( '* price does not include taxes', 'event_espresso' );
86
+			$ticket_price_includes_taxes = esc_html__('* price does not include taxes', 'event_espresso');
87 87
 		}
88
-		echo '<p class="small-text lt-grey-text" style="text-align:right; margin: -1em 0 1em;">' . $ticket_price_includes_taxes . '</p>';
88
+		echo '<p class="small-text lt-grey-text" style="text-align:right; margin: -1em 0 1em;">'.$ticket_price_includes_taxes.'</p>';
89 89
 	}
90 90
 	?>
91 91
 
@@ -93,13 +93,13 @@  discard block
 block discarded – undo
93 93
 
94 94
 
95 95
 <?php
96
-if ( $max_atndz > 0 ) {
96
+if ($max_atndz > 0) {
97 97
 	echo apply_filters(
98 98
 		'FHEE__ticket_selector_chart_template__maximum_tickets_purchased_footnote',
99 99
         esc_html('')
100 100
 	);
101 101
 }
102
-if ( ! apply_filters( 'FHEE__EE_Ticket_Selector__display_ticket_selector_submit', false ) ) {
103
-	add_filter( 'FHEE__EE_Ticket_Selector__no_ticket_selector_submit', '__return_true' );
102
+if ( ! apply_filters('FHEE__EE_Ticket_Selector__display_ticket_selector_submit', false)) {
103
+	add_filter('FHEE__EE_Ticket_Selector__no_ticket_selector_submit', '__return_true');
104 104
 }
105
-do_action( 'AHEE__ticket_selector_chart__template__after_ticket_selector', $EVT_ID, $event );
106 105
\ No newline at end of file
106
+do_action('AHEE__ticket_selector_chart__template__after_ticket_selector', $EVT_ID, $event);
107 107
\ No newline at end of file
Please login to merge, or discard this patch.
modules/ticket_selector/TicketSelector.php 2 patches
Indentation   +109 added lines, -109 removed lines patch added patch discarded remove patch
@@ -16,115 +16,115 @@
 block discarded – undo
16 16
 abstract class TicketSelector
17 17
 {
18 18
 
19
-    /**
20
-     * @var \EE_Event $event
21
-     */
22
-    protected $event;
23
-
24
-    /**
25
-     * @var \EE_Ticket[] $tickets
26
-     */
27
-    protected $tickets;
28
-
29
-    /**
30
-     * @var int max_attendees
31
-     */
32
-    protected $max_attendees;
33
-
34
-    /**
35
-     * @var array $template_args
36
-     */
37
-    protected $template_args;
38
-
39
-
40
-
41
-    /**
42
-     * TicketSelectorSimple constructor.
43
-     *
44
-     * @param \EE_Event    $event
45
-     * @param \EE_Ticket[] $tickets
46
-     * @param int          $max_attendees
47
-     * @param array        $template_args
48
-     * @throws \EE_Error
49
-     */
50
-    public function __construct(\EE_Event $event, array $tickets, $max_attendees, array $template_args)
51
-    {
52
-        $this->event         = $event;
53
-        $this->tickets       = $tickets;
54
-        $this->max_attendees = $max_attendees;
55
-        $this->template_args = $template_args;
56
-        $this->template_args['hidden_inputs'] = $this->getHiddenInputs();
57
-        $this->addTemplateArgs();
58
-    }
59
-
60
-
61
-
62
-    /**
63
-     * sets any and all template args that are required for this Ticket Selector
64
-     *
65
-     * @return void
66
-     */
67
-    abstract protected function addTemplateArgs();
68
-
69
-
70
-
71
-    /**
72
-     * loadTicketSelectorTemplate
73
-     *
74
-     * @return string
75
-     */
76
-    protected function loadTicketSelectorTemplate()
77
-    {
78
-        try {
79
-            return \EEH_Template::locate_template(
80
-                apply_filters(
81
-                    'FHEE__EE_Ticket_Selector__display_ticket_selector__template_path',
82
-                    $this->template_args['template_path'],
83
-                    $this->event
84
-                ),
85
-                $this->template_args
86
-            );
87
-        } catch (\Exception $e) {
88
-            \EE_Error::add_error($e->getMessage(), __FILE__, __FUNCTION__, __LINE__);
89
-        }
90
-        return '';
91
-    }
92
-
93
-
94
-
95
-    /**
96
-     * The __toString method allows a class to decide how it will react when it is converted to a string.
97
-     *
98
-     * @return string
99
-     * @link http://php.net/manual/en/language.oop5.magic.php#language.oop5.magic.tostring
100
-     */
101
-    public function __toString()
102
-    {
103
-        return $this->loadTicketSelectorTemplate();
104
-    }
105
-
106
-
107
-
108
-
109
-    /**
110
-     * getHiddenInputs
111
-     *
112
-     * @return string
113
-     * @throws \EE_Error
114
-     */
115
-    public function getHiddenInputs()
116
-    {
117
-        // $rows = count($this->tickets);
118
-        $html = '<input type="hidden" name="noheader" value="true"/>';
119
-        $html .= '<input type="hidden" name="tkt-slctr-return-url-' . $this->event->ID() . '"';
120
-        $html .= ' value="' . \EEH_URL::current_url() . $this->template_args['anchor_id'] . '"/>';
121
-        $html .= '<input type="hidden" name="tkt-slctr-rows-' . $this->event->ID();
122
-        $html .= '" value="' . count($this->tickets) . '"/>';
123
-        $html .= '<input type="hidden" name="tkt-slctr-max-atndz-' . $this->event->ID();
124
-        $html .= '" value="' . $this->template_args['max_atndz'] . '"/>';
125
-        $html .= '<input type="hidden" name="tkt-slctr-event-id" value="' . $this->event->ID() . '"/>';
126
-        return $html;
127
-    }
19
+	/**
20
+	 * @var \EE_Event $event
21
+	 */
22
+	protected $event;
23
+
24
+	/**
25
+	 * @var \EE_Ticket[] $tickets
26
+	 */
27
+	protected $tickets;
28
+
29
+	/**
30
+	 * @var int max_attendees
31
+	 */
32
+	protected $max_attendees;
33
+
34
+	/**
35
+	 * @var array $template_args
36
+	 */
37
+	protected $template_args;
38
+
39
+
40
+
41
+	/**
42
+	 * TicketSelectorSimple constructor.
43
+	 *
44
+	 * @param \EE_Event    $event
45
+	 * @param \EE_Ticket[] $tickets
46
+	 * @param int          $max_attendees
47
+	 * @param array        $template_args
48
+	 * @throws \EE_Error
49
+	 */
50
+	public function __construct(\EE_Event $event, array $tickets, $max_attendees, array $template_args)
51
+	{
52
+		$this->event         = $event;
53
+		$this->tickets       = $tickets;
54
+		$this->max_attendees = $max_attendees;
55
+		$this->template_args = $template_args;
56
+		$this->template_args['hidden_inputs'] = $this->getHiddenInputs();
57
+		$this->addTemplateArgs();
58
+	}
59
+
60
+
61
+
62
+	/**
63
+	 * sets any and all template args that are required for this Ticket Selector
64
+	 *
65
+	 * @return void
66
+	 */
67
+	abstract protected function addTemplateArgs();
68
+
69
+
70
+
71
+	/**
72
+	 * loadTicketSelectorTemplate
73
+	 *
74
+	 * @return string
75
+	 */
76
+	protected function loadTicketSelectorTemplate()
77
+	{
78
+		try {
79
+			return \EEH_Template::locate_template(
80
+				apply_filters(
81
+					'FHEE__EE_Ticket_Selector__display_ticket_selector__template_path',
82
+					$this->template_args['template_path'],
83
+					$this->event
84
+				),
85
+				$this->template_args
86
+			);
87
+		} catch (\Exception $e) {
88
+			\EE_Error::add_error($e->getMessage(), __FILE__, __FUNCTION__, __LINE__);
89
+		}
90
+		return '';
91
+	}
92
+
93
+
94
+
95
+	/**
96
+	 * The __toString method allows a class to decide how it will react when it is converted to a string.
97
+	 *
98
+	 * @return string
99
+	 * @link http://php.net/manual/en/language.oop5.magic.php#language.oop5.magic.tostring
100
+	 */
101
+	public function __toString()
102
+	{
103
+		return $this->loadTicketSelectorTemplate();
104
+	}
105
+
106
+
107
+
108
+
109
+	/**
110
+	 * getHiddenInputs
111
+	 *
112
+	 * @return string
113
+	 * @throws \EE_Error
114
+	 */
115
+	public function getHiddenInputs()
116
+	{
117
+		// $rows = count($this->tickets);
118
+		$html = '<input type="hidden" name="noheader" value="true"/>';
119
+		$html .= '<input type="hidden" name="tkt-slctr-return-url-' . $this->event->ID() . '"';
120
+		$html .= ' value="' . \EEH_URL::current_url() . $this->template_args['anchor_id'] . '"/>';
121
+		$html .= '<input type="hidden" name="tkt-slctr-rows-' . $this->event->ID();
122
+		$html .= '" value="' . count($this->tickets) . '"/>';
123
+		$html .= '<input type="hidden" name="tkt-slctr-max-atndz-' . $this->event->ID();
124
+		$html .= '" value="' . $this->template_args['max_atndz'] . '"/>';
125
+		$html .= '<input type="hidden" name="tkt-slctr-event-id" value="' . $this->event->ID() . '"/>';
126
+		return $html;
127
+	}
128 128
 
129 129
 }
130 130
 // End of file TicketSelector.php
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -116,13 +116,13 @@
 block discarded – undo
116 116
     {
117 117
         // $rows = count($this->tickets);
118 118
         $html = '<input type="hidden" name="noheader" value="true"/>';
119
-        $html .= '<input type="hidden" name="tkt-slctr-return-url-' . $this->event->ID() . '"';
120
-        $html .= ' value="' . \EEH_URL::current_url() . $this->template_args['anchor_id'] . '"/>';
121
-        $html .= '<input type="hidden" name="tkt-slctr-rows-' . $this->event->ID();
122
-        $html .= '" value="' . count($this->tickets) . '"/>';
123
-        $html .= '<input type="hidden" name="tkt-slctr-max-atndz-' . $this->event->ID();
124
-        $html .= '" value="' . $this->template_args['max_atndz'] . '"/>';
125
-        $html .= '<input type="hidden" name="tkt-slctr-event-id" value="' . $this->event->ID() . '"/>';
119
+        $html .= '<input type="hidden" name="tkt-slctr-return-url-'.$this->event->ID().'"';
120
+        $html .= ' value="'.\EEH_URL::current_url().$this->template_args['anchor_id'].'"/>';
121
+        $html .= '<input type="hidden" name="tkt-slctr-rows-'.$this->event->ID();
122
+        $html .= '" value="'.count($this->tickets).'"/>';
123
+        $html .= '<input type="hidden" name="tkt-slctr-max-atndz-'.$this->event->ID();
124
+        $html .= '" value="'.$this->template_args['max_atndz'].'"/>';
125
+        $html .= '<input type="hidden" name="tkt-slctr-event-id" value="'.$this->event->ID().'"/>';
126 126
         return $html;
127 127
     }
128 128
 
Please login to merge, or discard this patch.
core/services/formatters/AsciiOnly.php 4 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
 
37 37
     /**
38 38
      * Taken from https://gist.github.com/jaywilliams/119517
39
-     * @param $string
39
+     * @param string $string
40 40
      * @return string
41 41
      */
42 42
     protected function convertAscii($string)
Please login to merge, or discard this patch.
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -1,8 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 namespace EventEspresso\core\services\formatters;
3 3
 
4
-use EventEspresso\core\exceptions\InvalidDataTypeException;
5
-
6 4
 defined('EVENT_ESPRESSO_VERSION') || exit;
7 5
 
8 6
 
Please login to merge, or discard this patch.
Indentation   +51 added lines, -51 removed lines patch added patch discarded remove patch
@@ -18,60 +18,60 @@
 block discarded – undo
18 18
 class AsciiOnly extends FormatterBase
19 19
 {
20 20
 
21
-    /**
22
-     * Removes all non Ascii characters from string
23
-     *
24
-     * @param string|int|float $input anything easily cast into a string
25
-     * @return string
26
-     */
27
-    public function format($input)
28
-    {
29
-        //in case an int or float etc was passed in
30
-        $input = (string)$input;
31
-        $input = $this->convertAscii($input);
32
-        return $input;
33
-    }
21
+	/**
22
+	 * Removes all non Ascii characters from string
23
+	 *
24
+	 * @param string|int|float $input anything easily cast into a string
25
+	 * @return string
26
+	 */
27
+	public function format($input)
28
+	{
29
+		//in case an int or float etc was passed in
30
+		$input = (string)$input;
31
+		$input = $this->convertAscii($input);
32
+		return $input;
33
+	}
34 34
 
35 35
 
36 36
 
37
-    /**
38
-     * Taken from https://gist.github.com/jaywilliams/119517
39
-     * @param $string
40
-     * @return string
41
-     */
42
-    protected function convertAscii($string)
43
-    {
44
-        // Replace Single Curly Quotes
45
-        $search[]  = chr(226).chr(128).chr(152);
46
-        $replace[] = "'";
47
-        $search[]  = chr(226).chr(128).chr(153);
48
-        $replace[] = "'";
49
-        // Replace Smart Double Curly Quotes
50
-        $search[]  = chr(226).chr(128).chr(156);
51
-        $replace[] = '"';
52
-        $search[]  = chr(226).chr(128).chr(157);
53
-        $replace[] = '"';
54
-        // Replace En Dash
55
-        $search[]  = chr(226).chr(128).chr(147);
56
-        $replace[] = '--';
57
-        // Replace Em Dash
58
-        $search[]  = chr(226).chr(128).chr(148);
59
-        $replace[] = '---';
60
-        // Replace Bullet
61
-        $search[]  = chr(226).chr(128).chr(162);
62
-        $replace[] = '*';
63
-        // Replace Middle Dot
64
-        $search[]  = chr(194).chr(183);
65
-        $replace[] = '*';
66
-        // Replace Ellipsis with three consecutive dots
67
-        $search[]  = chr(226).chr(128).chr(166);
68
-        $replace[] = '...';
69
-        // Apply Replacements
70
-        $string = str_replace($search, $replace, $string);
71
-        // Remove any non-ASCII Characters
72
-        $string = preg_replace("/[^\x01-\x7F]/","", $string);
73
-        return $string;
74
-    }
37
+	/**
38
+	 * Taken from https://gist.github.com/jaywilliams/119517
39
+	 * @param $string
40
+	 * @return string
41
+	 */
42
+	protected function convertAscii($string)
43
+	{
44
+		// Replace Single Curly Quotes
45
+		$search[]  = chr(226).chr(128).chr(152);
46
+		$replace[] = "'";
47
+		$search[]  = chr(226).chr(128).chr(153);
48
+		$replace[] = "'";
49
+		// Replace Smart Double Curly Quotes
50
+		$search[]  = chr(226).chr(128).chr(156);
51
+		$replace[] = '"';
52
+		$search[]  = chr(226).chr(128).chr(157);
53
+		$replace[] = '"';
54
+		// Replace En Dash
55
+		$search[]  = chr(226).chr(128).chr(147);
56
+		$replace[] = '--';
57
+		// Replace Em Dash
58
+		$search[]  = chr(226).chr(128).chr(148);
59
+		$replace[] = '---';
60
+		// Replace Bullet
61
+		$search[]  = chr(226).chr(128).chr(162);
62
+		$replace[] = '*';
63
+		// Replace Middle Dot
64
+		$search[]  = chr(194).chr(183);
65
+		$replace[] = '*';
66
+		// Replace Ellipsis with three consecutive dots
67
+		$search[]  = chr(226).chr(128).chr(166);
68
+		$replace[] = '...';
69
+		// Apply Replacements
70
+		$string = str_replace($search, $replace, $string);
71
+		// Remove any non-ASCII Characters
72
+		$string = preg_replace("/[^\x01-\x7F]/","", $string);
73
+		return $string;
74
+	}
75 75
 }
76 76
 // End of file EmojiRemoval.php
77 77
 // Location: core\services\formatters/EmojiRemoval.php
78 78
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
     public function format($input)
28 28
     {
29 29
         //in case an int or float etc was passed in
30
-        $input = (string)$input;
30
+        $input = (string) $input;
31 31
         $input = $this->convertAscii($input);
32 32
         return $input;
33 33
     }
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
         // Apply Replacements
70 70
         $string = str_replace($search, $replace, $string);
71 71
         // Remove any non-ASCII Characters
72
-        $string = preg_replace("/[^\x01-\x7F]/","", $string);
72
+        $string = preg_replace("/[^\x01-\x7F]/", "", $string);
73 73
         return $string;
74 74
     }
75 75
 }
Please login to merge, or discard this patch.
core/services/formatters/LeaveAlone.php 1 patch
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -18,28 +18,28 @@
 block discarded – undo
18 18
 class LeaveAlone extends FormatterBase
19 19
 {
20 20
 
21
-    /**
22
-     * Removes the emojis from the inputted string
23
-     *
24
-     * @param string|int|float $input anything easily cast into a string
25
-     * @return string
26
-     * @throws InvalidDataTypeException if $input is not a string
27
-     */
28
-    public function format($input)
29
-    {
30
-        return $input;
31
-    }
21
+	/**
22
+	 * Removes the emojis from the inputted string
23
+	 *
24
+	 * @param string|int|float $input anything easily cast into a string
25
+	 * @return string
26
+	 * @throws InvalidDataTypeException if $input is not a string
27
+	 */
28
+	public function format($input)
29
+	{
30
+		return $input;
31
+	}
32 32
 
33
-    /**
34
-     * Just returns the inputted $input array
35
-     *
36
-     * @param array $input
37
-     * @return array
38
-     */
39
-    public function formatArray($input)
40
-    {
41
-        return $input;
42
-    }
33
+	/**
34
+	 * Just returns the inputted $input array
35
+	 *
36
+	 * @param array $input
37
+	 * @return array
38
+	 */
39
+	public function formatArray($input)
40
+	{
41
+		return $input;
42
+	}
43 43
 }
44 44
 // End of file LeaveAlonel.php
45 45
 // Location: core\services\formatters/LeaveAlonel.php
46 46
\ No newline at end of file
Please login to merge, or discard this patch.
core/db_classes/EE_Transaction.class.php 3 patches
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -427,7 +427,7 @@  discard block
 block discarded – undo
427 427
 	 * Gets all the attendees for this transaction (handy for use with EE_Attendee's get_registrations_for_event function
428 428
 	 * for getting attendees and how many registrations they each have for an event)
429 429
 	 *
430
-	 * @return mixed EE_Attendee[] by default, int if $output is set to 'COUNT'
430
+	 * @return EE_Base_Class[] EE_Attendee[] by default, int if $output is set to 'COUNT'
431 431
 	 * @throws \EE_Error
432 432
 	 */
433 433
 	public function attendees() {
@@ -464,7 +464,7 @@  discard block
 block discarded – undo
464 464
 
465 465
     /**
466 466
      * Gets all payments which have not been approved
467
-     * @return \EEI_Payment[]
467
+     * @return EE_Base_Class[]
468 468
      * @throws EE_Error if a model is misconfigured somehow
469 469
      */
470 470
 	public function pending_payments()
@@ -709,7 +709,7 @@  discard block
 block discarded – undo
709 709
 	 * Gets all the extra meta info on this payment
710 710
 	 *
711 711
 	 * @param array $query_params like EEM_Base::get_all
712
-	 * @return EE_Extra_Meta
712
+	 * @return EE_Base_Class[]
713 713
 	 * @throws \EE_Error
714 714
 	 */
715 715
 	public function extra_meta( $query_params = array() ) {
@@ -886,7 +886,7 @@  discard block
 block discarded – undo
886 886
 	 * Sets PMD_ID
887 887
 	 *
888 888
 	 * @param int $PMD_ID
889
-	 * @return boolean
889
+	 * @return boolean|null
890 890
 	 * @throws \EE_Error
891 891
 	 */
892 892
 	public function set_payment_method_ID($PMD_ID) {
Please login to merge, or discard this patch.
Indentation   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -462,29 +462,29 @@  discard block
 block discarded – undo
462 462
 
463 463
 
464 464
 
465
-    /**
466
-     * Gets all payments which have not been approved
467
-     * @return \EEI_Payment[]
468
-     * @throws EE_Error if a model is misconfigured somehow
469
-     */
465
+	/**
466
+	 * Gets all payments which have not been approved
467
+	 * @return \EEI_Payment[]
468
+	 * @throws EE_Error if a model is misconfigured somehow
469
+	 */
470 470
 	public function pending_payments()
471
-    {
472
-        return $this->get_many_related(
473
-            'Payment',
474
-            array(
475
-                array(
476
-                    'STS_ID' => EEM_Payment::status_id_pending
477
-                ),
478
-                'order_by' => array(
479
-                    'PAY_timestamp' => 'DESC'
480
-                )
481
-            )
482
-        );
483
-    }
484
-
485
-
486
-
487
-    /**
471
+	{
472
+		return $this->get_many_related(
473
+			'Payment',
474
+			array(
475
+				array(
476
+					'STS_ID' => EEM_Payment::status_id_pending
477
+				),
478
+				'order_by' => array(
479
+					'PAY_timestamp' => 'DESC'
480
+				)
481
+			)
482
+		);
483
+	}
484
+
485
+
486
+
487
+	/**
488 488
 	 * echoes $this->pretty_status()
489 489
 	 *
490 490
 	 * @param bool $show_icons
@@ -645,20 +645,20 @@  discard block
 block discarded – undo
645 645
 	 * @throws \EE_Error
646 646
 	 */
647 647
 	public function primary_registration() {
648
-        $registrations = (array) $this->get_many_related(
649
-            'Registration', array(array('REG_count' => EEM_Registration::PRIMARY_REGISTRANT_COUNT))
650
-        );
651
-        foreach ($registrations as $registration) {
652
-            // valid registration that is NOT cancelled or declined ?
653
-            if(
654
-                $registration instanceof EE_Registration
655
-                && ! in_array($registration->status_ID(), EEM_Registration::closed_reg_statuses(), true)
656
-            ) {
657
-                return $registration;
658
-            }
659
-        }
660
-        // nothing valid found, so just return first thing from array of results
661
-        return reset($registrations);
648
+		$registrations = (array) $this->get_many_related(
649
+			'Registration', array(array('REG_count' => EEM_Registration::PRIMARY_REGISTRANT_COUNT))
650
+		);
651
+		foreach ($registrations as $registration) {
652
+			// valid registration that is NOT cancelled or declined ?
653
+			if(
654
+				$registration instanceof EE_Registration
655
+				&& ! in_array($registration->status_ID(), EEM_Registration::closed_reg_statuses(), true)
656
+			) {
657
+				return $registration;
658
+			}
659
+		}
660
+		// nothing valid found, so just return first thing from array of results
661
+		return reset($registrations);
662 662
 	}
663 663
 
664 664
 
Please login to merge, or discard this patch.
Spacing   +157 added lines, -157 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1
-<?php if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) {
2
-	exit( 'No direct script access allowed' );
1
+<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) {
2
+	exit('No direct script access allowed');
3 3
 }
4 4
 /**
5 5
  * EE_Transaction class
@@ -34,13 +34,13 @@  discard block
 block discarded – undo
34 34
 	 * @return EE_Transaction
35 35
 	 * @throws \EE_Error
36 36
 	 */
37
-	public static function new_instance( $props_n_values = array(), $timezone = null, $date_formats = array() ) {
38
-		$has_object = parent::_check_for_object( $props_n_values, __CLASS__, $timezone, $date_formats );
37
+	public static function new_instance($props_n_values = array(), $timezone = null, $date_formats = array()) {
38
+		$has_object = parent::_check_for_object($props_n_values, __CLASS__, $timezone, $date_formats);
39 39
 		$txn = $has_object
40 40
 			? $has_object
41
-			: new self( $props_n_values, false, $timezone, $date_formats );
42
-		if ( ! $has_object ) {
43
-			$txn->set_old_txn_status( $txn->status_ID() );
41
+			: new self($props_n_values, false, $timezone, $date_formats);
42
+		if ( ! $has_object) {
43
+			$txn->set_old_txn_status($txn->status_ID());
44 44
 		}
45 45
 		return $txn;
46 46
 	}
@@ -54,9 +54,9 @@  discard block
 block discarded – undo
54 54
 	 * @return EE_Transaction
55 55
 	 * @throws \EE_Error
56 56
 	 */
57
-	public static function new_instance_from_db( $props_n_values = array(), $timezone = null ) {
58
-		$txn = new self( $props_n_values, TRUE, $timezone );
59
-		$txn->set_old_txn_status( $txn->status_ID() );
57
+	public static function new_instance_from_db($props_n_values = array(), $timezone = null) {
58
+		$txn = new self($props_n_values, TRUE, $timezone);
59
+		$txn->set_old_txn_status($txn->status_ID());
60 60
 		return $txn;
61 61
 	}
62 62
 
@@ -73,16 +73,16 @@  discard block
 block discarded – undo
73 73
 	 */
74 74
 	public function lock() {
75 75
 		// attempt to set lock, but if that fails...
76
-		if ( ! $this->add_extra_meta( 'lock', time(), true )  ) {
76
+		if ( ! $this->add_extra_meta('lock', time(), true)) {
77 77
 			// then attempt to remove the lock in case it is expired
78
-			if ( $this->_remove_expired_lock() ) {
78
+			if ($this->_remove_expired_lock()) {
79 79
 				// if removal was successful, then try setting lock again
80 80
 				$this->lock();
81 81
 			} else {
82 82
 				// but if the lock can not be removed, then throw an exception
83 83
 				throw new EE_Error(
84 84
 					sprintf(
85
-						__( 'Could not lock Transaction %1$d because it is already locked, meaning another part of the system is currently editing it. It should already be unlocked by the time you read this, so please refresh the page and try again.', 'event_espresso' ),
85
+						__('Could not lock Transaction %1$d because it is already locked, meaning another part of the system is currently editing it. It should already be unlocked by the time you read this, so please refresh the page and try again.', 'event_espresso'),
86 86
 						$this->ID()
87 87
 					)
88 88
 				);
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 	 * @throws \EE_Error
102 102
 	 */
103 103
 	public function unlock() {
104
-		return $this->delete_extra_meta( 'lock' );
104
+		return $this->delete_extra_meta('lock');
105 105
 	}
106 106
 
107 107
 
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
 	 */
123 123
 	public function is_locked() {
124 124
 		// if TXN is not locked, then return false immediately
125
-		if ( ! $this->_get_lock() ) {
125
+		if ( ! $this->_get_lock()) {
126 126
 			return false;
127 127
 		}
128 128
 		// if not, then let's try and remove the lock in case it's expired...
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
 	 * @throws \EE_Error
144 144
 	 */
145 145
 	protected function _get_lock() {
146
-		return (int)$this->get_extra_meta( 'lock', true, 0 );
146
+		return (int) $this->get_extra_meta('lock', true, 0);
147 147
 	}
148 148
 
149 149
 
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
 	 */
159 159
 	protected function _remove_expired_lock() {
160 160
 		$locked = $this->_get_lock();
161
-		if ( $locked && time() - EE_Transaction::LOCK_EXPIRATION > $locked ) {
161
+		if ($locked && time() - EE_Transaction::LOCK_EXPIRATION > $locked) {
162 162
 			return $this->unlock();
163 163
 		}
164 164
 		return 0;
@@ -173,8 +173,8 @@  discard block
 block discarded – undo
173 173
 	 * @param        float $total total value of transaction
174 174
 	 * @throws \EE_Error
175 175
 	 */
176
-	public function set_total( $total = 0.00 ) {
177
-		$this->set( 'TXN_total', (float)$total );
176
+	public function set_total($total = 0.00) {
177
+		$this->set('TXN_total', (float) $total);
178 178
 	}
179 179
 
180 180
 
@@ -186,8 +186,8 @@  discard block
 block discarded – undo
186 186
 	 * @param        float $total_paid total amount paid to date (sum of all payments)
187 187
 	 * @throws \EE_Error
188 188
 	 */
189
-	public function set_paid( $total_paid = 0.00 ) {
190
-		$this->set( 'TXN_paid', (float)$total_paid );
189
+	public function set_paid($total_paid = 0.00) {
190
+		$this->set('TXN_paid', (float) $total_paid);
191 191
 	}
192 192
 
193 193
 
@@ -199,8 +199,8 @@  discard block
 block discarded – undo
199 199
 	 * @param        string $status whether the transaction is open, declined, accepted, or any number of custom values that can be set
200 200
 	 * @throws \EE_Error
201 201
 	 */
202
-	public function set_status( $status = '' ) {
203
-		$this->set( 'STS_ID', $status );
202
+	public function set_status($status = '') {
203
+		$this->set('STS_ID', $status);
204 204
 	}
205 205
 
206 206
 
@@ -212,8 +212,8 @@  discard block
 block discarded – undo
212 212
 	 * @param        string $hash_salt required for some payment gateways
213 213
 	 * @throws \EE_Error
214 214
 	 */
215
-	public function set_hash_salt( $hash_salt = '' ) {
216
-		$this->set( 'TXN_hash_salt', $hash_salt );
215
+	public function set_hash_salt($hash_salt = '') {
216
+		$this->set('TXN_hash_salt', $hash_salt);
217 217
 	}
218 218
 
219 219
 
@@ -224,8 +224,8 @@  discard block
 block discarded – undo
224 224
 	 * @param array $txn_reg_steps
225 225
 	 * @throws \EE_Error
226 226
 	 */
227
-	public function set_reg_steps( array $txn_reg_steps ) {
228
-		$this->set( 'TXN_reg_steps', $txn_reg_steps );
227
+	public function set_reg_steps(array $txn_reg_steps) {
228
+		$this->set('TXN_reg_steps', $txn_reg_steps);
229 229
 	}
230 230
 
231 231
 
@@ -237,8 +237,8 @@  discard block
 block discarded – undo
237 237
 	 * @throws \EE_Error
238 238
 	 */
239 239
 	public function reg_steps() {
240
-		$TXN_reg_steps = $this->get( 'TXN_reg_steps' );
241
-		return is_array( $TXN_reg_steps ) ? (array)$TXN_reg_steps : array();
240
+		$TXN_reg_steps = $this->get('TXN_reg_steps');
241
+		return is_array($TXN_reg_steps) ? (array) $TXN_reg_steps : array();
242 242
 	}
243 243
 
244 244
 
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
 	 * @throws \EE_Error
249 249
 	 */
250 250
 	public function pretty_total() {
251
-		return $this->get_pretty( 'TXN_total' );
251
+		return $this->get_pretty('TXN_total');
252 252
 	}
253 253
 
254 254
 
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
 	 * @throws \EE_Error
261 261
 	 */
262 262
 	public function pretty_paid() {
263
-		return $this->get_pretty( 'TXN_paid' );
263
+		return $this->get_pretty('TXN_paid');
264 264
 	}
265 265
 
266 266
 
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
 	 * @throws \EE_Error
274 274
 	 */
275 275
 	public function remaining() {
276
-		return (float)( $this->total() - $this->paid() );
276
+		return (float) ($this->total() - $this->paid());
277 277
 	}
278 278
 
279 279
 
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
 	 * @throws \EE_Error
287 287
 	 */
288 288
 	public function total() {
289
-		return (float)$this->get( 'TXN_total' );
289
+		return (float) $this->get('TXN_total');
290 290
 	}
291 291
 
292 292
 
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
 	 * @throws \EE_Error
300 300
 	 */
301 301
 	public function paid() {
302
-		return (float)$this->get( 'TXN_paid' );
302
+		return (float) $this->get('TXN_paid');
303 303
 	}
304 304
 
305 305
 
@@ -311,9 +311,9 @@  discard block
 block discarded – undo
311 311
 	 * @throws \EE_Error
312 312
 	 */
313 313
 	public function get_cart_session() {
314
-		$session_data = (array)$this->get( 'TXN_session_data' );
315
-		return isset( $session_data[ 'cart' ] ) && $session_data[ 'cart' ] instanceof EE_Cart
316
-			? $session_data[ 'cart' ]
314
+		$session_data = (array) $this->get('TXN_session_data');
315
+		return isset($session_data['cart']) && $session_data['cart'] instanceof EE_Cart
316
+			? $session_data['cart']
317 317
 			: null;
318 318
 	}
319 319
 
@@ -326,8 +326,8 @@  discard block
 block discarded – undo
326 326
 	 * @throws \EE_Error
327 327
 	 */
328 328
 	public function session_data() {
329
-		$session_data = $this->get( 'TXN_session_data' );
330
-		if ( empty( $session_data ) ) {
329
+		$session_data = $this->get('TXN_session_data');
330
+		if (empty($session_data)) {
331 331
 			$session_data = array(
332 332
 				'id'            => null,
333 333
 				'user_id'       => null,
@@ -350,11 +350,11 @@  discard block
 block discarded – undo
350 350
 	 * @param        EE_Session|array $session_data
351 351
 	 * @throws \EE_Error
352 352
 	 */
353
-	public function set_txn_session_data( $session_data ) {
354
-		if ( $session_data instanceof EE_Session ) {
355
-			$this->set( 'TXN_session_data', $session_data->get_session_data( NULL, TRUE ));
353
+	public function set_txn_session_data($session_data) {
354
+		if ($session_data instanceof EE_Session) {
355
+			$this->set('TXN_session_data', $session_data->get_session_data(NULL, TRUE));
356 356
 		} else {
357
-			$this->set( 'TXN_session_data', $session_data );
357
+			$this->set('TXN_session_data', $session_data);
358 358
 		}
359 359
 	}
360 360
 
@@ -367,7 +367,7 @@  discard block
 block discarded – undo
367 367
 	 * @throws \EE_Error
368 368
 	 */
369 369
 	public function hash_salt_() {
370
-		return $this->get( 'TXN_hash_salt' );
370
+		return $this->get('TXN_hash_salt');
371 371
 	}
372 372
 
373 373
 
@@ -387,13 +387,13 @@  discard block
 block discarded – undo
387 387
 	 * @return    string | int
388 388
 	 * @throws \EE_Error
389 389
 	 */
390
-	public function datetime( $format = FALSE, $gmt = FALSE ) {
391
-		if ( $format ) {
392
-			return $this->get_pretty( 'TXN_timestamp' );
393
-		} else if ( $gmt ) {
394
-			return $this->get_raw( 'TXN_timestamp' );
390
+	public function datetime($format = FALSE, $gmt = FALSE) {
391
+		if ($format) {
392
+			return $this->get_pretty('TXN_timestamp');
393
+		} else if ($gmt) {
394
+			return $this->get_raw('TXN_timestamp');
395 395
 		} else {
396
-			return $this->get( 'TXN_timestamp' );
396
+			return $this->get('TXN_timestamp');
397 397
 		}
398 398
 	}
399 399
 
@@ -407,8 +407,8 @@  discard block
 block discarded – undo
407 407
 	 * @return EE_Registration[]
408 408
 	 * @throws \EE_Error
409 409
 	 */
410
-	public function registrations( $query_params = array(), $get_cached = FALSE ) {
411
-		$query_params = ( empty( $query_params ) || ! is_array( $query_params ) )
410
+	public function registrations($query_params = array(), $get_cached = FALSE) {
411
+		$query_params = (empty($query_params) || ! is_array($query_params))
412 412
 			? array(
413 413
 				'order_by' => array(
414 414
 					'Event.EVT_name' => 'ASC',
@@ -418,7 +418,7 @@  discard block
 block discarded – undo
418 418
 			)
419 419
 			: $query_params;
420 420
 		$query_params = $get_cached ? array() : $query_params;
421
-		return $this->get_many_related( 'Registration', $query_params );
421
+		return $this->get_many_related('Registration', $query_params);
422 422
 	}
423 423
 
424 424
 
@@ -431,7 +431,7 @@  discard block
 block discarded – undo
431 431
 	 * @throws \EE_Error
432 432
 	 */
433 433
 	public function attendees() {
434
-		return $this->get_many_related( 'Attendee', array( array( 'Registration.Transaction.TXN_ID' => $this->ID() ) ) );
434
+		return $this->get_many_related('Attendee', array(array('Registration.Transaction.TXN_ID' => $this->ID())));
435 435
 	}
436 436
 
437 437
 
@@ -443,8 +443,8 @@  discard block
 block discarded – undo
443 443
 	 * @return EE_Payment[]
444 444
 	 * @throws \EE_Error
445 445
 	 */
446
-	public function payments( $query_params = array() ) {
447
-		return $this->get_many_related( 'Payment', $query_params );
446
+	public function payments($query_params = array()) {
447
+		return $this->get_many_related('Payment', $query_params);
448 448
 	}
449 449
 
450 450
 
@@ -456,8 +456,8 @@  discard block
 block discarded – undo
456 456
 	 * @throws \EE_Error
457 457
 	 */
458 458
 	public function approved_payments() {
459
-		EE_Registry::instance()->load_model( 'Payment' );
460
-		return $this->get_many_related( 'Payment', array( array( 'STS_ID' => EEM_Payment::status_id_approved ), 'order_by' => array( 'PAY_timestamp' => 'DESC' ) ) );
459
+		EE_Registry::instance()->load_model('Payment');
460
+		return $this->get_many_related('Payment', array(array('STS_ID' => EEM_Payment::status_id_approved), 'order_by' => array('PAY_timestamp' => 'DESC')));
461 461
 	}
462 462
 
463 463
 
@@ -491,8 +491,8 @@  discard block
 block discarded – undo
491 491
 	 * @return string
492 492
 	 * @throws \EE_Error
493 493
 	 */
494
-	public function e_pretty_status( $show_icons = FALSE ) {
495
-		echo $this->pretty_status( $show_icons );
494
+	public function e_pretty_status($show_icons = FALSE) {
495
+		echo $this->pretty_status($show_icons);
496 496
 	}
497 497
 
498 498
 
@@ -504,10 +504,10 @@  discard block
 block discarded – undo
504 504
 	 * @return string
505 505
 	 * @throws \EE_Error
506 506
 	 */
507
-	public function pretty_status( $show_icons = FALSE ) {
508
-		$status = EEM_Status::instance()->localized_status( array( $this->status_ID() => __( 'unknown', 'event_espresso' ) ), FALSE, 'sentence' );
507
+	public function pretty_status($show_icons = FALSE) {
508
+		$status = EEM_Status::instance()->localized_status(array($this->status_ID() => __('unknown', 'event_espresso')), FALSE, 'sentence');
509 509
 		$icon = '';
510
-		switch ( $this->status_ID() ) {
510
+		switch ($this->status_ID()) {
511 511
 			case EEM_Transaction::complete_status_code:
512 512
 				$icon = $show_icons ? '<span class="dashicons dashicons-yes ee-icon-size-24 green-text"></span>' : '';
513 513
 				break;
@@ -524,7 +524,7 @@  discard block
 block discarded – undo
524 524
 				$icon = $show_icons ? '<span class="dashicons dashicons-plus ee-icon-size-16 orange-text"></span>' : '';
525 525
 				break;
526 526
 		}
527
-		return $icon . $status[ $this->status_ID() ];
527
+		return $icon.$status[$this->status_ID()];
528 528
 	}
529 529
 
530 530
 
@@ -536,7 +536,7 @@  discard block
 block discarded – undo
536 536
 	 * @throws \EE_Error
537 537
 	 */
538 538
 	public function status_ID() {
539
-		return $this->get( 'STS_ID' );
539
+		return $this->get('STS_ID');
540 540
 	}
541 541
 
542 542
 
@@ -548,7 +548,7 @@  discard block
 block discarded – undo
548 548
 	 * @throws \EE_Error
549 549
 	 */
550 550
 	public function is_free() {
551
-		return EEH_Money::compare_floats( $this->get( 'TXN_total' ), 0, '==' );
551
+		return EEH_Money::compare_floats($this->get('TXN_total'), 0, '==');
552 552
 	}
553 553
 
554 554
 
@@ -628,12 +628,12 @@  discard block
 block discarded – undo
628 628
 	 * @return string
629 629
 	 * @throws \EE_Error
630 630
 	 */
631
-	public function invoice_url( $type = 'html' ) {
631
+	public function invoice_url($type = 'html') {
632 632
 		$REG = $this->primary_registration();
633
-		if ( ! $REG instanceof EE_Registration ) {
633
+		if ( ! $REG instanceof EE_Registration) {
634 634
 			return '';
635 635
 		}
636
-		return $REG->invoice_url( $type );
636
+		return $REG->invoice_url($type);
637 637
 	}
638 638
 
639 639
 
@@ -650,7 +650,7 @@  discard block
 block discarded – undo
650 650
         );
651 651
         foreach ($registrations as $registration) {
652 652
             // valid registration that is NOT cancelled or declined ?
653
-            if(
653
+            if (
654 654
                 $registration instanceof EE_Registration
655 655
                 && ! in_array($registration->status_ID(), EEM_Registration::closed_reg_statuses(), true)
656 656
             ) {
@@ -670,12 +670,12 @@  discard block
 block discarded – undo
670 670
 	 * @return string
671 671
 	 * @throws \EE_Error
672 672
 	 */
673
-	public function receipt_url( $type = 'html' ) {
673
+	public function receipt_url($type = 'html') {
674 674
 		$REG = $this->primary_registration();
675
-		if ( ! $REG instanceof EE_Registration ) {
675
+		if ( ! $REG instanceof EE_Registration) {
676 676
 			return '';
677 677
 		}
678
-		return $REG->receipt_url( $type );
678
+		return $REG->receipt_url($type);
679 679
 	}
680 680
 
681 681
 
@@ -700,7 +700,7 @@  discard block
 block discarded – undo
700 700
 	 * @throws \EE_Error
701 701
 	 */
702 702
 	public function gateway_response_on_transaction() {
703
-		$payment = $this->get_first_related( 'Payment' );
703
+		$payment = $this->get_first_related('Payment');
704 704
 		return $payment instanceof EE_Payment ? $payment->gateway_response() : '';
705 705
 	}
706 706
 
@@ -713,7 +713,7 @@  discard block
 block discarded – undo
713 713
 	 * @throws \EE_Error
714 714
 	 */
715 715
 	public function status_obj() {
716
-		return $this->get_first_related( 'Status' );
716
+		return $this->get_first_related('Status');
717 717
 	}
718 718
 
719 719
 
@@ -725,8 +725,8 @@  discard block
 block discarded – undo
725 725
 	 * @return EE_Extra_Meta
726 726
 	 * @throws \EE_Error
727 727
 	 */
728
-	public function extra_meta( $query_params = array() ) {
729
-		return $this->get_many_related( 'Extra_Meta', $query_params );
728
+	public function extra_meta($query_params = array()) {
729
+		return $this->get_many_related('Extra_Meta', $query_params);
730 730
 	}
731 731
 
732 732
 
@@ -738,8 +738,8 @@  discard block
 block discarded – undo
738 738
 	 * @return EE_Base_Class the relation was added to
739 739
 	 * @throws \EE_Error
740 740
 	 */
741
-	public function add_registration( EE_Registration $registration ) {
742
-		return $this->_add_relation_to( $registration, 'Registration' );
741
+	public function add_registration(EE_Registration $registration) {
742
+		return $this->_add_relation_to($registration, 'Registration');
743 743
 	}
744 744
 
745 745
 
@@ -752,8 +752,8 @@  discard block
 block discarded – undo
752 752
 	 * @return EE_Base_Class that was removed from being related
753 753
 	 * @throws \EE_Error
754 754
 	 */
755
-	public function remove_registration_with_id( $registration_or_id ) {
756
-		return $this->_remove_relation_to( $registration_or_id, 'Registration' );
755
+	public function remove_registration_with_id($registration_or_id) {
756
+		return $this->_remove_relation_to($registration_or_id, 'Registration');
757 757
 	}
758 758
 
759 759
 
@@ -765,7 +765,7 @@  discard block
 block discarded – undo
765 765
 	 * @throws \EE_Error
766 766
 	 */
767 767
 	public function items_purchased() {
768
-		return $this->line_items( array( array( 'LIN_type' => EEM_Line_Item::type_line_item ) ) );
768
+		return $this->line_items(array(array('LIN_type' => EEM_Line_Item::type_line_item)));
769 769
 	}
770 770
 
771 771
 
@@ -777,8 +777,8 @@  discard block
 block discarded – undo
777 777
 	 * @return EE_Base_Class the relation was added to
778 778
 	 * @throws \EE_Error
779 779
 	 */
780
-	public function add_line_item( EE_Line_Item $line_item ) {
781
-		return $this->_add_relation_to( $line_item, 'Line_Item' );
780
+	public function add_line_item(EE_Line_Item $line_item) {
781
+		return $this->_add_relation_to($line_item, 'Line_Item');
782 782
 	}
783 783
 
784 784
 
@@ -790,8 +790,8 @@  discard block
 block discarded – undo
790 790
 	 * @return EE_Line_Item[]
791 791
 	 * @throws \EE_Error
792 792
 	 */
793
-	public function line_items( $query_params = array() ) {
794
-		return $this->get_many_related( 'Line_Item', $query_params );
793
+	public function line_items($query_params = array()) {
794
+		return $this->get_many_related('Line_Item', $query_params);
795 795
 	}
796 796
 
797 797
 
@@ -803,7 +803,7 @@  discard block
 block discarded – undo
803 803
 	 * @throws \EE_Error
804 804
 	 */
805 805
 	public function tax_items() {
806
-		return $this->line_items( array( array( 'LIN_type' => EEM_Line_Item::type_tax ) ) );
806
+		return $this->line_items(array(array('LIN_type' => EEM_Line_Item::type_tax)));
807 807
 	}
808 808
 
809 809
 
@@ -816,10 +816,10 @@  discard block
 block discarded – undo
816 816
 	 * @return \EE_Line_Item
817 817
 	 * @throws \EE_Error
818 818
 	 */
819
-	public function total_line_item( $create_if_not_found = true ) {
820
-		$item =  $this->get_first_related( 'Line_Item', array( array( 'LIN_type' => EEM_Line_Item::type_total ) ) );
821
-		if( ! $item && $create_if_not_found ){
822
-			$item = EEH_Line_Item::create_total_line_item( $this );
819
+	public function total_line_item($create_if_not_found = true) {
820
+		$item = $this->get_first_related('Line_Item', array(array('LIN_type' => EEM_Line_Item::type_total)));
821
+		if ( ! $item && $create_if_not_found) {
822
+			$item = EEH_Line_Item::create_total_line_item($this);
823 823
 		}
824 824
 		return $item;
825 825
 	}
@@ -835,10 +835,10 @@  discard block
 block discarded – undo
835 835
 	 */
836 836
 	public function tax_total() {
837 837
 		$tax_line_item = $this->tax_total_line_item();
838
-		if ( $tax_line_item ) {
839
-			return (float)$tax_line_item->total();
838
+		if ($tax_line_item) {
839
+			return (float) $tax_line_item->total();
840 840
 		} else {
841
-			return (float)0;
841
+			return (float) 0;
842 842
 		}
843 843
 	}
844 844
 
@@ -851,7 +851,7 @@  discard block
 block discarded – undo
851 851
 	 * @throws \EE_Error
852 852
 	 */
853 853
 	public function tax_total_line_item() {
854
-		return EEH_Line_Item::get_taxes_subtotal( $this->total_line_item() );
854
+		return EEH_Line_Item::get_taxes_subtotal($this->total_line_item());
855 855
 	}
856 856
 
857 857
 
@@ -862,20 +862,20 @@  discard block
 block discarded – undo
862 862
 	 * @return EE_Form_Section_Proper
863 863
 	 * @throws \EE_Error
864 864
 	 */
865
-	public function billing_info(){
865
+	public function billing_info() {
866 866
 		$payment_method = $this->payment_method();
867
-		if ( !$payment_method){
867
+		if ( ! $payment_method) {
868 868
 			EE_Error::add_error(__("Could not find billing info for transaction because no gateway has been used for it yet", "event_espresso"), __FILE__, __FUNCTION__, __LINE__);
869 869
 			return false;
870 870
 		}
871 871
 		$primary_reg = $this->primary_registration();
872
-		if ( ! $primary_reg ) {
873
-			EE_Error::add_error( __( "Cannot get billing info for gateway %s on transaction because no primary registration exists", "event_espresso" ), __FILE__, __FUNCTION__, __LINE__ );
872
+		if ( ! $primary_reg) {
873
+			EE_Error::add_error(__("Cannot get billing info for gateway %s on transaction because no primary registration exists", "event_espresso"), __FILE__, __FUNCTION__, __LINE__);
874 874
 			return FALSE;
875 875
 		}
876 876
 		$attendee = $primary_reg->attendee();
877
-		if ( ! $attendee ) {
878
-			EE_Error::add_error( __( "Cannot get billing info for gateway %s on transaction because the primary registration has no attendee exists", "event_espresso" ), __FILE__, __FUNCTION__, __LINE__ );
877
+		if ( ! $attendee) {
878
+			EE_Error::add_error(__("Cannot get billing info for gateway %s on transaction because the primary registration has no attendee exists", "event_espresso"), __FILE__, __FUNCTION__, __LINE__);
879 879
 			return FALSE;
880 880
 		}
881 881
 		return $attendee->billing_info_for_payment_method($payment_method);
@@ -916,15 +916,15 @@  discard block
 block discarded – undo
916 916
 	 * @return EE_Payment_Method
917 917
 	 * @throws \EE_Error
918 918
 	 */
919
-	public function payment_method(){
919
+	public function payment_method() {
920 920
 		$pm = $this->get_first_related('Payment_Method');
921
-		if( $pm instanceof EE_Payment_Method ){
921
+		if ($pm instanceof EE_Payment_Method) {
922 922
 			return $pm;
923
-		}else{
923
+		} else {
924 924
 			$last_payment = $this->last_payment();
925
-			if( $last_payment instanceof EE_Payment && $last_payment->payment_method() ){
925
+			if ($last_payment instanceof EE_Payment && $last_payment->payment_method()) {
926 926
 				return $last_payment->payment_method();
927
-			}else{
927
+			} else {
928 928
 				return NULL;
929 929
 			}
930 930
 		}
@@ -939,7 +939,7 @@  discard block
 block discarded – undo
939 939
 	 * @throws \EE_Error
940 940
 	 */
941 941
 	public function last_payment() {
942
-		return $this->get_first_related( 'Payment', array( 'order_by' => array( 'PAY_ID' => 'desc' ) ) );
942
+		return $this->get_first_related('Payment', array('order_by' => array('PAY_ID' => 'desc')));
943 943
 	}
944 944
 
945 945
 
@@ -950,8 +950,8 @@  discard block
 block discarded – undo
950 950
 	 * @return EE_Line_Item[]
951 951
 	 * @throws \EE_Error
952 952
 	 */
953
-	public function non_ticket_line_items(){
954
-		return EEM_Line_Item::instance()->get_all_non_ticket_line_items_for_transaction( $this->ID() );
953
+	public function non_ticket_line_items() {
954
+		return EEM_Line_Item::instance()->get_all_non_ticket_line_items_for_transaction($this->ID());
955 955
 	}
956 956
 
957 957
 
@@ -999,7 +999,7 @@  discard block
 block discarded – undo
999 999
 	public function update_based_on_payments()
1000 1000
 	{
1001 1001
 		EE_Error::doing_it_wrong(
1002
-			__CLASS__ . '::' . __FUNCTION__,
1002
+			__CLASS__.'::'.__FUNCTION__,
1003 1003
 			sprintf(__('This method is deprecated. Please use "%s" instead', 'event_espresso'),
1004 1004
 				'EE_Transaction_Processor::update_transaction_and_registrations_after_checkout_or_payment()'),
1005 1005
 			'4.6.0'
@@ -1023,9 +1023,9 @@  discard block
 block discarded – undo
1023 1023
 	/**
1024 1024
 	 * @param string $old_txn_status
1025 1025
 	 */
1026
-	public function set_old_txn_status( $old_txn_status ) {
1026
+	public function set_old_txn_status($old_txn_status) {
1027 1027
 		// only set the first time
1028
-		if ( $this->_old_txn_status === null ) {
1028
+		if ($this->_old_txn_status === null) {
1029 1029
 			$this->_old_txn_status = $old_txn_status;
1030 1030
 		}
1031 1031
 	}
@@ -1054,17 +1054,17 @@  discard block
 block discarded – undo
1054 1054
 	 * @param bool           $check_all
1055 1055
 	 * @return boolean | int
1056 1056
 	 */
1057
-	private function _reg_steps_completed( $reg_step_slug = '', $check_all = true ) {
1057
+	private function _reg_steps_completed($reg_step_slug = '', $check_all = true) {
1058 1058
 		$reg_steps = $this->reg_steps();
1059
-		if ( ! is_array( $reg_steps ) || empty( $reg_steps ) ) {
1059
+		if ( ! is_array($reg_steps) || empty($reg_steps)) {
1060 1060
 			return false;
1061 1061
 		}
1062 1062
 		// loop thru reg steps array)
1063
-		foreach ( $reg_steps as $slug => $reg_step_completed ) {
1063
+		foreach ($reg_steps as $slug => $reg_step_completed) {
1064 1064
 			// if NOT checking ALL steps (only checking one step)
1065
-			if ( ! $check_all ) {
1065
+			if ( ! $check_all) {
1066 1066
 				// and this is the one
1067
-				if ( $slug === $reg_step_slug ) {
1067
+				if ($slug === $reg_step_slug) {
1068 1068
 					return $reg_step_completed;
1069 1069
 				} else {
1070 1070
 					// skip to next reg step in loop
@@ -1072,7 +1072,7 @@  discard block
 block discarded – undo
1072 1072
 				}
1073 1073
 			}
1074 1074
 			// $check_all must be true, else we would never have gotten to this point
1075
-			if ( $slug === $reg_step_slug ) {
1075
+			if ($slug === $reg_step_slug) {
1076 1076
 				// if we reach this point, then we are testing either:
1077 1077
 				// all_reg_steps_completed_except() or
1078 1078
 				// all_reg_steps_completed_except_final_step(),
@@ -1081,7 +1081,7 @@  discard block
 block discarded – undo
1081 1081
 				// ie: "is everything completed except the final step?"
1082 1082
 				// "that is correct... the final step is not completed, but all others are."
1083 1083
 				return $reg_step_completed !== true ? true : false;
1084
-			} else if ( $reg_step_completed !== true ) {
1084
+			} else if ($reg_step_completed !== true) {
1085 1085
 				// if any reg step is NOT completed, then ALL steps are not completed
1086 1086
 				return false;
1087 1087
 			}
@@ -1115,8 +1115,8 @@  discard block
 block discarded – undo
1115 1115
 	 * @param string         $exception
1116 1116
 	 * @return boolean
1117 1117
 	 */
1118
-	public function all_reg_steps_completed_except( $exception = '' ) {
1119
-		return $this->_reg_steps_completed( $exception );
1118
+	public function all_reg_steps_completed_except($exception = '') {
1119
+		return $this->_reg_steps_completed($exception);
1120 1120
 	}
1121 1121
 
1122 1122
 
@@ -1131,7 +1131,7 @@  discard block
 block discarded – undo
1131 1131
 	 * @return boolean
1132 1132
 	 */
1133 1133
 	public function all_reg_steps_completed_except_final_step() {
1134
-		return $this->_reg_steps_completed( 'finalize_registration' );
1134
+		return $this->_reg_steps_completed('finalize_registration');
1135 1135
 	}
1136 1136
 
1137 1137
 
@@ -1146,8 +1146,8 @@  discard block
 block discarded – undo
1146 1146
 	 * @param string         $reg_step_slug
1147 1147
 	 * @return boolean | int
1148 1148
 	 */
1149
-	public function reg_step_completed( $reg_step_slug ) {
1150
-		return $this->_reg_steps_completed( $reg_step_slug, false );
1149
+	public function reg_step_completed($reg_step_slug) {
1150
+		return $this->_reg_steps_completed($reg_step_slug, false);
1151 1151
 	}
1152 1152
 
1153 1153
 
@@ -1162,7 +1162,7 @@  discard block
 block discarded – undo
1162 1162
 	 * @return boolean | int
1163 1163
 	 */
1164 1164
 	public function final_reg_step_completed() {
1165
-		return $this->_reg_steps_completed( 'finalize_registration', false );
1165
+		return $this->_reg_steps_completed('finalize_registration', false);
1166 1166
 	}
1167 1167
 
1168 1168
 
@@ -1176,8 +1176,8 @@  discard block
 block discarded – undo
1176 1176
 	 * @return boolean
1177 1177
 	 * @throws \EE_Error
1178 1178
 	 */
1179
-	public function set_reg_step_initiated( $reg_step_slug ) {
1180
-		return $this->_set_reg_step_completed_status( $reg_step_slug, time() );
1179
+	public function set_reg_step_initiated($reg_step_slug) {
1180
+		return $this->_set_reg_step_completed_status($reg_step_slug, time());
1181 1181
 	}
1182 1182
 
1183 1183
 
@@ -1191,8 +1191,8 @@  discard block
 block discarded – undo
1191 1191
 	 * @return boolean
1192 1192
 	 * @throws \EE_Error
1193 1193
 	 */
1194
-	public function set_reg_step_completed( $reg_step_slug ) {
1195
-		return $this->_set_reg_step_completed_status( $reg_step_slug, true );
1194
+	public function set_reg_step_completed($reg_step_slug) {
1195
+		return $this->_set_reg_step_completed_status($reg_step_slug, true);
1196 1196
 	}
1197 1197
 
1198 1198
 
@@ -1206,8 +1206,8 @@  discard block
 block discarded – undo
1206 1206
 	 * @return boolean
1207 1207
 	 * @throws \EE_Error
1208 1208
 	 */
1209
-	public function set_reg_step_not_completed( $reg_step_slug ) {
1210
-		return $this->_set_reg_step_completed_status( $reg_step_slug, false );
1209
+	public function set_reg_step_not_completed($reg_step_slug) {
1210
+		return $this->_set_reg_step_completed_status($reg_step_slug, false);
1211 1211
 	}
1212 1212
 
1213 1213
 
@@ -1222,37 +1222,37 @@  discard block
 block discarded – undo
1222 1222
 	 * @return boolean
1223 1223
 	 * @throws \EE_Error
1224 1224
 	 */
1225
-	private function _set_reg_step_completed_status( $reg_step_slug, $status ) {
1225
+	private function _set_reg_step_completed_status($reg_step_slug, $status) {
1226 1226
 		// validate status
1227
-		$status = is_bool( $status ) || is_int( $status ) ? $status : false;
1227
+		$status = is_bool($status) || is_int($status) ? $status : false;
1228 1228
 		// get reg steps array
1229 1229
 		$txn_reg_steps = $this->reg_steps();
1230 1230
 		// if reg step does NOT exist
1231
-		if ( ! isset( $txn_reg_steps[ $reg_step_slug ] ) ) {
1231
+		if ( ! isset($txn_reg_steps[$reg_step_slug])) {
1232 1232
 			return false;
1233 1233
 		}
1234 1234
 		// if  we're trying to complete a step that is already completed
1235
-		if ( $txn_reg_steps[ $reg_step_slug ] === true ) {
1235
+		if ($txn_reg_steps[$reg_step_slug] === true) {
1236 1236
 			return true;
1237 1237
 		}
1238 1238
 		// if  we're trying to complete a step that hasn't even started
1239
-		if ( $status === true && $txn_reg_steps[ $reg_step_slug ] === false ) {
1239
+		if ($status === true && $txn_reg_steps[$reg_step_slug] === false) {
1240 1240
 			return false;
1241 1241
 		}
1242 1242
 		// if current status value matches the incoming value (no change)
1243 1243
 		// type casting as int means values should collapse to either 0, 1, or a timestamp like 1234567890
1244
-		if ( (int) $txn_reg_steps[ $reg_step_slug ] === (int) $status ) {
1244
+		if ((int) $txn_reg_steps[$reg_step_slug] === (int) $status) {
1245 1245
 			// this will happen in cases where multiple AJAX requests occur during the same step
1246 1246
 			return true;
1247 1247
 		}
1248 1248
 		// if we're trying to set a start time, but it has already been set...
1249
-		if ( is_numeric( $status ) && is_numeric( $txn_reg_steps[ $reg_step_slug ] ) ) {
1249
+		if (is_numeric($status) && is_numeric($txn_reg_steps[$reg_step_slug])) {
1250 1250
 			// skip the update below, but don't return FALSE so that errors won't be displayed
1251 1251
 			return true;
1252 1252
 		}
1253 1253
 		// update completed status
1254
-		$txn_reg_steps[ $reg_step_slug ] = $status;
1255
-		$this->set_reg_steps( $txn_reg_steps );
1254
+		$txn_reg_steps[$reg_step_slug] = $status;
1255
+		$this->set_reg_steps($txn_reg_steps);
1256 1256
 		$this->save();
1257 1257
 		return true;
1258 1258
 	}
@@ -1268,11 +1268,11 @@  discard block
 block discarded – undo
1268 1268
 	 * @param string          $reg_step_slug
1269 1269
 	 * @return void
1270 1270
 	 */
1271
-	public function remove_reg_step( $reg_step_slug ) {
1271
+	public function remove_reg_step($reg_step_slug) {
1272 1272
 		// get reg steps array
1273 1273
 		$txn_reg_steps = $this->reg_steps();
1274
-		unset( $txn_reg_steps[ $reg_step_slug ] );
1275
-		$this->set_reg_steps( $txn_reg_steps );
1274
+		unset($txn_reg_steps[$reg_step_slug]);
1275
+		$this->set_reg_steps($txn_reg_steps);
1276 1276
 	}
1277 1277
 
1278 1278
 
@@ -1286,11 +1286,11 @@  discard block
 block discarded – undo
1286 1286
 	 * @param bool $save
1287 1287
 	 * @return bool
1288 1288
 	 */
1289
-	public function toggle_failed_transaction_status( $save = true ) {
1289
+	public function toggle_failed_transaction_status($save = true) {
1290 1290
 		// if TXN status is still set as "failed"...
1291
-		if ( $this->status_ID() === EEM_Transaction::failed_status_code ) {
1292
-			$this->set_status( EEM_Transaction::abandoned_status_code );
1293
-			if ( $save ) {
1291
+		if ($this->status_ID() === EEM_Transaction::failed_status_code) {
1292
+			$this->set_status(EEM_Transaction::abandoned_status_code);
1293
+			if ($save) {
1294 1294
 				$this->save();
1295 1295
 			}
1296 1296
 			return true;
@@ -1319,10 +1319,10 @@  discard block
 block discarded – undo
1319 1319
 				$this->primary_registration() instanceof EE_Registration
1320 1320
 				&& $this->primary_registration()->attendee() instanceof EE_Attendee
1321 1321
 			) {
1322
-				$this->set_status( EEM_Transaction::incomplete_status_code );
1322
+				$this->set_status(EEM_Transaction::incomplete_status_code);
1323 1323
 			} else {
1324 1324
 				// no contact record? yer abandoned!
1325
-				$this->set_status( EEM_Transaction::abandoned_status_code );
1325
+				$this->set_status(EEM_Transaction::abandoned_status_code);
1326 1326
 			}
1327 1327
 			return true;
1328 1328
 		}
@@ -1336,16 +1336,16 @@  discard block
 block discarded – undo
1336 1336
 	 * updates the TXN status based on the amount paid
1337 1337
 	 */
1338 1338
 	public function verify_abandoned_transaction_status() {
1339
-		if ( $this->status_ID() !== EEM_Transaction::abandoned_status_code ) {
1339
+		if ($this->status_ID() !== EEM_Transaction::abandoned_status_code) {
1340 1340
 			return;
1341 1341
 		}
1342
-		$payments = $this->get_many_related( 'Payment' );
1343
-		if ( ! empty( $payments ) ) {
1344
-			foreach ( $payments as $payment ) {
1345
-				if ( $payment instanceof EE_Payment ) {
1342
+		$payments = $this->get_many_related('Payment');
1343
+		if ( ! empty($payments)) {
1344
+			foreach ($payments as $payment) {
1345
+				if ($payment instanceof EE_Payment) {
1346 1346
 					// kk this TXN should NOT be abandoned
1347 1347
 					$this->update_status_based_on_total_paid();
1348
-					if ( is_admin() && ! ( defined('DOING_AJAX') && DOING_AJAX ) ) {
1348
+					if (is_admin() && ! (defined('DOING_AJAX') && DOING_AJAX)) {
1349 1349
 						EE_Error::add_attention(
1350 1350
 							sprintf(
1351 1351
 								esc_html__(
@@ -1361,8 +1361,8 @@  discard block
 block discarded – undo
1361 1361
 					$finalized = $this->final_reg_step_completed();
1362 1362
 					// if the 'finalize_registration' step has been initiated (has a timestamp)
1363 1363
 					// but has not yet been fully completed (TRUE)
1364
-					if ( is_int( $finalized ) && $finalized !== false && $finalized !== true ) {
1365
-						$this->set_reg_step_completed( 'finalize_registration' );
1364
+					if (is_int($finalized) && $finalized !== false && $finalized !== true) {
1365
+						$this->set_reg_step_completed('finalize_registration');
1366 1366
 						$this->save();
1367 1367
 					}
1368 1368
 				}
Please login to merge, or discard this patch.
modules/mijireh_payment_checker/EED_Mijireh_Payment_Checker.module.php 2 patches
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -45,23 +45,23 @@
 block discarded – undo
45 45
 
46 46
 
47 47
 
48
-    /**
49
-     * If the transaction has pending mijireh payments, we check with mijireh to see if they've been completed.
50
-     * @param EE_Transaction $transaction
51
-     * @throws EE_Error if a model is misconfigured
52
-     */
48
+	/**
49
+	 * If the transaction has pending mijireh payments, we check with mijireh to see if they've been completed.
50
+	 * @param EE_Transaction $transaction
51
+	 * @throws EE_Error if a model is misconfigured
52
+	 */
53 53
 	public static function check_for_payment_update_on_transaction( $transaction ) {
54 54
 		if( $transaction instanceof EE_Transaction ) {
55 55
 			//are there pending Mijireh payments on this transaction?
56
-            $a_mijireh_payment = EEM_Payment::instance()->get_one(
57
-                array(
58
-                    array(
59
-                        'TXN_ID' => $transaction->ID(),
60
-                        'STS_ID' => EEM_Payment::status_id_pending,
61
-                        'Payment_Method.PMD_type' => 'Mijireh',
62
-                    )
63
-                )
64
-            );
56
+			$a_mijireh_payment = EEM_Payment::instance()->get_one(
57
+				array(
58
+					array(
59
+						'TXN_ID' => $transaction->ID(),
60
+						'STS_ID' => EEM_Payment::status_id_pending,
61
+						'Payment_Method.PMD_type' => 'Mijireh',
62
+					)
63
+				)
64
+			);
65 65
 			if($a_mijireh_payment instanceof EE_Payment) {
66 66
 				add_action(
67 67
 					'AHEE__EE_Registration_Processor__trigger_registration_update_notifications',
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( !defined( 'EVENT_ESPRESSO_VERSION' ) ) {
3
-	exit( 'No direct script access allowed' );
2
+if ( ! defined('EVENT_ESPRESSO_VERSION')) {
3
+	exit('No direct script access allowed');
4 4
 }
5 5
 
6 6
 /**
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
  * @author				Mike Nelson
20 20
  *
21 21
  */
22
-class EED_Mijireh_Payment_Checker extends EED_Module{
22
+class EED_Mijireh_Payment_Checker extends EED_Module {
23 23
 
24 24
 	/**
25 25
 	 * 	set_hooks - for hooking into EE Core, other modules, etc
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 	 *  @return 	void
41 41
 	 */
42 42
 	public static function set_hooks_admin() {
43
-		add_action( 'AHEE__Transactions_Admin_Page__transaction_details__start', array( 'EED_Mijireh_Payment_Checker', 'check_for_payment_update_on_transaction' ), 10, 1 );
43
+		add_action('AHEE__Transactions_Admin_Page__transaction_details__start', array('EED_Mijireh_Payment_Checker', 'check_for_payment_update_on_transaction'), 10, 1);
44 44
 	}
45 45
 
46 46
 
@@ -50,8 +50,8 @@  discard block
 block discarded – undo
50 50
      * @param EE_Transaction $transaction
51 51
      * @throws EE_Error if a model is misconfigured
52 52
      */
53
-	public static function check_for_payment_update_on_transaction( $transaction ) {
54
-		if( $transaction instanceof EE_Transaction ) {
53
+	public static function check_for_payment_update_on_transaction($transaction) {
54
+		if ($transaction instanceof EE_Transaction) {
55 55
 			//are there pending Mijireh payments on this transaction?
56 56
             $a_mijireh_payment = EEM_Payment::instance()->get_one(
57 57
                 array(
@@ -62,13 +62,13 @@  discard block
 block discarded – undo
62 62
                     )
63 63
                 )
64 64
             );
65
-			if($a_mijireh_payment instanceof EE_Payment) {
65
+			if ($a_mijireh_payment instanceof EE_Payment) {
66 66
 				add_action(
67 67
 					'AHEE__EE_Registration_Processor__trigger_registration_update_notifications',
68
-					array( 'EED_Mijireh_Payment_Checker', 'send_notifications_after_mijireh_ipn' ),
68
+					array('EED_Mijireh_Payment_Checker', 'send_notifications_after_mijireh_ipn'),
69 69
 					5, 2
70 70
 				);
71
-				EE_Payment_Processor::instance()->process_ipn( array(), $transaction, $a_mijireh_payment->payment_method() );
71
+				EE_Payment_Processor::instance()->process_ipn(array(), $transaction, $a_mijireh_payment->payment_method());
72 72
 			}
73 73
 		}
74 74
 	}
@@ -84,10 +84,10 @@  discard block
 block discarded – undo
84 84
 	 * @param EE_Registration $registration
85 85
 	 * @param array $additional_details
86 86
 	 */
87
-	public static function send_notifications_after_mijireh_ipn( $registration, $additional_details ) {
88
-		$last_payment = isset( $additional_details[ 'last_payment' ] ) ? $additional_details[ 'last_payment' ] : null;
89
-		if ( ! $last_payment instanceof EE_Payment || $last_payment->status() != EEM_Payment::status_id_approved ) {
90
-			add_filter( 'FHEE__EED_Messages___maybe_registration__deliver_notifications', '__return_false', 15 );
87
+	public static function send_notifications_after_mijireh_ipn($registration, $additional_details) {
88
+		$last_payment = isset($additional_details['last_payment']) ? $additional_details['last_payment'] : null;
89
+		if ( ! $last_payment instanceof EE_Payment || $last_payment->status() != EEM_Payment::status_id_approved) {
90
+			add_filter('FHEE__EED_Messages___maybe_registration__deliver_notifications', '__return_false', 15);
91 91
 		}
92 92
 	}
93 93
 
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 	 * @access    public
100 100
 	 * @param WP_Query $WP_Query
101 101
 	 */
102
-	public function run( $WP_Query = null ) {
102
+	public function run($WP_Query = null) {
103 103
 	}
104 104
 }
105 105
 
Please login to merge, or discard this patch.
core/libraries/iframe_display/EventListIframeEmbedButton.php 2 patches
Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -15,21 +15,21 @@  discard block
 block discarded – undo
15 15
 class EventListIframeEmbedButton extends IframeEmbedButton
16 16
 {
17 17
 
18
-    /**
19
-     * EventListIframeEmbedButton constructor.
20
-     */
21
-    public function __construct()
22
-    {
23
-        parent::__construct(
24
-            esc_html__( 'Upcoming Event List', 'event_espresso' ),
25
-            'event_list'
26
-        );
27
-    }
18
+	/**
19
+	 * EventListIframeEmbedButton constructor.
20
+	 */
21
+	public function __construct()
22
+	{
23
+		parent::__construct(
24
+			esc_html__( 'Upcoming Event List', 'event_espresso' ),
25
+			'event_list'
26
+		);
27
+	}
28 28
 
29 29
 
30 30
 
31 31
 	public function addEmbedButton() {
32
-        add_filter(
32
+		add_filter(
33 33
 			'FHEE__EE_Admin_Page___display_admin_list_table_page__after_list_table__template_args_array',
34 34
 			array( $this, 'addEventListIframeEmbedButtonSection' )
35 35
 		);
@@ -49,18 +49,18 @@  discard block
 block discarded – undo
49 49
 	 * @param array $after_list_table
50 50
 	 * @return array
51 51
 	 */
52
-    public function addEventListIframeEmbedButtonSection( array $after_list_table )
53
-    {
54
-        return \EEH_Array::insert_into_array(
55
-    		$after_list_table,
56
-		    array(
57
-			    'iframe_embed_buttons' => $this->addIframeEmbedButtonsSection(
58
-				    array( 'event_list' => $this->embedButtonHtml() )
59
-			    )
60
-		    ),
61
-		    'legend'
62
-	    );
63
-    }
52
+	public function addEventListIframeEmbedButtonSection( array $after_list_table )
53
+	{
54
+		return \EEH_Array::insert_into_array(
55
+			$after_list_table,
56
+			array(
57
+				'iframe_embed_buttons' => $this->addIframeEmbedButtonsSection(
58
+					array( 'event_list' => $this->embedButtonHtml() )
59
+				)
60
+			),
61
+			'legend'
62
+		);
63
+	}
64 64
 
65 65
 
66 66
 
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 namespace EventEspresso\core\libraries\iframe_display;
3 3
 
4
-defined( 'ABSPATH' ) || exit;
4
+defined('ABSPATH') || exit;
5 5
 
6 6
 
7 7
 
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
     public function __construct()
22 22
     {
23 23
         parent::__construct(
24
-            esc_html__( 'Upcoming Event List', 'event_espresso' ),
24
+            esc_html__('Upcoming Event List', 'event_espresso'),
25 25
             'event_list'
26 26
         );
27 27
     }
@@ -31,11 +31,11 @@  discard block
 block discarded – undo
31 31
 	public function addEmbedButton() {
32 32
         add_filter(
33 33
 			'FHEE__EE_Admin_Page___display_admin_list_table_page__after_list_table__template_args_array',
34
-			array( $this, 'addEventListIframeEmbedButtonSection' )
34
+			array($this, 'addEventListIframeEmbedButtonSection')
35 35
 		);
36 36
 		add_action(
37 37
 			'admin_enqueue_scripts',
38
-			array( $this, 'embedButtonAssets' ),
38
+			array($this, 'embedButtonAssets'),
39 39
 			10
40 40
 		);
41 41
 	}
@@ -49,13 +49,13 @@  discard block
 block discarded – undo
49 49
 	 * @param array $after_list_table
50 50
 	 * @return array
51 51
 	 */
52
-    public function addEventListIframeEmbedButtonSection( array $after_list_table )
52
+    public function addEventListIframeEmbedButtonSection(array $after_list_table)
53 53
     {
54 54
         return \EEH_Array::insert_into_array(
55 55
     		$after_list_table,
56 56
 		    array(
57 57
 			    'iframe_embed_buttons' => $this->addIframeEmbedButtonsSection(
58
-				    array( 'event_list' => $this->embedButtonHtml() )
58
+				    array('event_list' => $this->embedButtonHtml())
59 59
 			    )
60 60
 		    ),
61 61
 		    'legend'
Please login to merge, or discard this patch.
admin/extend/registrations/EE_Event_Registrations_List_Table.class.php 2 patches
Indentation   +63 added lines, -63 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 		$this->_columns = array_merge( $columns, $this->_columns );
88 88
 		$this->_primary_column = '_REG_att_checked_in';
89 89
 		if ( ! empty( $evt_id )
90
-		     && EE_Registry::instance()->CAP->current_user_can(
90
+			 && EE_Registry::instance()->CAP->current_user_can(
91 91
 				'ee_read_registrations',
92 92
 				'espresso_registrations_registrations_reports',
93 93
 				$evt_id
@@ -104,44 +104,44 @@  discard block
 block discarded – undo
104 104
 				),
105 105
 			);
106 106
 		}
107
-        $this->_bottom_buttons['report_filtered'] = array(
108
-            'route'         => 'registrations_checkin_report',
109
-            'extra_request' => array(
110
-                'use_filters' => true,
111
-                'filters'     => array_merge(
112
-                    array(
113
-                        'EVT_ID' => $evt_id,
114
-                    ),
115
-                    array_diff_key(
116
-                        $this->_req_data,
117
-                        array_flip(
118
-                            array(
119
-                                'page',
120
-                                'action',
121
-                                'default_nonce',
122
-                            )
123
-                        )
124
-                    )
125
-                ),
126
-                'return_url'  => urlencode("//{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}"),
127
-            ),
128
-        );
107
+		$this->_bottom_buttons['report_filtered'] = array(
108
+			'route'         => 'registrations_checkin_report',
109
+			'extra_request' => array(
110
+				'use_filters' => true,
111
+				'filters'     => array_merge(
112
+					array(
113
+						'EVT_ID' => $evt_id,
114
+					),
115
+					array_diff_key(
116
+						$this->_req_data,
117
+						array_flip(
118
+							array(
119
+								'page',
120
+								'action',
121
+								'default_nonce',
122
+							)
123
+						)
124
+					)
125
+				),
126
+				'return_url'  => urlencode("//{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}"),
127
+			),
128
+		);
129 129
 		$this->_sortable_columns = array(
130
-            /**
131
-             * Allows users to change the default sort if they wish.
132
-             * Returning a falsey on this filter will result in the default sort to be by firstname rather than last name.
133
-             *
134
-             * Note: usual naming conventions for filters aren't followed here so that just one filter can be used to
135
-             * change the sorts on any list table involving registration contacts.  If you want to only change the filter
136
-             * for a specific list table you can use the provided reference to this object instance.
137
-             */
130
+			/**
131
+			 * Allows users to change the default sort if they wish.
132
+			 * Returning a falsey on this filter will result in the default sort to be by firstname rather than last name.
133
+			 *
134
+			 * Note: usual naming conventions for filters aren't followed here so that just one filter can be used to
135
+			 * change the sorts on any list table involving registration contacts.  If you want to only change the filter
136
+			 * for a specific list table you can use the provided reference to this object instance.
137
+			 */
138 138
 			'ATT_name' => array(
139
-                    'FHEE__EE_Registrations_List_Table___set_properties__default_sort_by_registration_last_name',
140
-                    true,
141
-                    $this
142
-                )
143
-                ? array( 'ATT_lname' => true )
144
-                : array( 'ATT_fname' => true ),
139
+					'FHEE__EE_Registrations_List_Table___set_properties__default_sort_by_registration_last_name',
140
+					true,
141
+					$this
142
+				)
143
+				? array( 'ATT_lname' => true )
144
+				: array( 'ATT_fname' => true ),
145 145
 			'Event'    => array( 'Event.EVT.Name' => false ),
146 146
 		);
147 147
 		$this->_hidden_columns = array();
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 				if ( ! $evt->get_count_of_all_registrations() ) {
201 201
 					continue;
202 202
 				}
203
-                                $evts[] = array(
203
+								$evts[] = array(
204 204
 					'id'    => $evt->ID(),
205 205
 					'text'  => apply_filters('FHEE__EE_Event_Registrations___get_table_filters__event_name', $evt->get( 'EVT_name' ), $evt),
206 206
 					'class' => $evt->is_expired() ? 'ee-expired-event' : '',
@@ -224,8 +224,8 @@  discard block
 block discarded – undo
224 224
 			if ( count( $this->_dtts_for_event ) > 1 ) {
225 225
 				$dtts[0] = __( 'To toggle check-in status, select a datetime.', 'event_espresso' );
226 226
 				foreach ( $this->_dtts_for_event as $dtt ) {
227
-                    $datetime_string = $dtt->name();
228
-                    $datetime_string = ! empty($datetime_string ) ? ' (' . $datetime_string . ')' : '';
227
+					$datetime_string = $dtt->name();
228
+					$datetime_string = ! empty($datetime_string ) ? ' (' . $datetime_string . ')' : '';
229 229
 					$datetime_string = $dtt->start_date_and_time() . ' - ' . $dtt->end_date_and_time() . $datetime_string;
230 230
 					$dtts[ $dtt->ID() ] = $datetime_string;
231 231
 				}
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
 		$checkinstatus = $item->check_in_status_for_datetime( $this->_cur_dtt_id );
320 320
 		$nonce = wp_create_nonce( 'checkin_nonce' );
321 321
 		$toggle_active = ! empty ( $this->_cur_dtt_id )
322
-		                 && EE_Registry::instance()->CAP->current_user_can(
322
+						 && EE_Registry::instance()->CAP->current_user_can(
323 323
 			'ee_edit_checkin',
324 324
 			'espresso_registrations_toggle_checkin_status',
325 325
 			$item->ID()
@@ -328,11 +328,11 @@  discard block
 block discarded – undo
328 328
 			: '';
329 329
 		$mobile_view_content = ' <span class="show-on-mobile-view-only">' . $attendee_name . '</span>';
330 330
 		return '<span class="checkin-icons checkedin-status-' . $checkinstatus . $toggle_active . '"'
331
-		       . ' data-_regid="' . $item->ID() . '"'
332
-		       . ' data-dttid="' . $this->_cur_dtt_id . '"'
333
-		       . ' data-nonce="' . $nonce . '">'
334
-		       . '</span>'
335
-		       . $mobile_view_content;
331
+			   . ' data-_regid="' . $item->ID() . '"'
332
+			   . ' data-dttid="' . $this->_cur_dtt_id . '"'
333
+			   . ' data-nonce="' . $nonce . '">'
334
+			   . '</span>'
335
+			   . $mobile_view_content;
336 336
 	}
337 337
 
338 338
 
@@ -357,8 +357,8 @@  discard block
 block discarded – undo
357 357
 			'espresso_registrations_edit_attendee'
358 358
 		)
359 359
 			? '<a href="' . $edit_lnk_url . '" title="' . esc_attr__( 'View Registration Details', 'event_espresso' ) . '">'
360
-			    . $item->attendee()->full_name()
361
-			    . '</a>'
360
+				. $item->attendee()->full_name()
361
+				. '</a>'
362 362
 			: $item->attendee()->full_name();
363 363
 		$name_link .= $item->count() === 1
364 364
 			? '&nbsp;<sup><div class="dashicons dashicons-star-filled lt-blue-icon ee-icon-size-8"></div></sup>	'
@@ -393,7 +393,7 @@  discard block
 block discarded – undo
393 393
 			? $latest_related_datetime->ID()
394 394
 			: $DTT_ID;
395 395
 		if ( ! empty( $DTT_ID )
396
-		     && EE_Registry::instance()->CAP->current_user_can(
396
+			 && EE_Registry::instance()->CAP->current_user_can(
397 397
 				'ee_read_checkins',
398 398
 				'espresso_registrations_registration_checkins'
399 399
 			)
@@ -493,15 +493,15 @@  discard block
 block discarded – undo
493 493
 				) ? '
494 494
 				<span class="reg-pad-rght">
495 495
 					<a class="status-'
496
-				    . $item->transaction()->status_ID()
497
-				    . '" href="'
498
-				    . $view_txn_lnk_url
499
-				    . '"  title="'
500
-				    . esc_attr__( 'View Transaction', 'event_espresso' )
501
-				    . '">
496
+					. $item->transaction()->status_ID()
497
+					. '" href="'
498
+					. $view_txn_lnk_url
499
+					. '"  title="'
500
+					. esc_attr__( 'View Transaction', 'event_espresso' )
501
+					. '">
502 502
 						'
503
-				    . $item->transaction()->pretty_paid()
504
-				    . '
503
+					. $item->transaction()->pretty_paid()
504
+					. '
505 505
 					</a>
506 506
 				<span>' : '<span class="reg-pad-rght">' . $item->transaction()->pretty_paid() . '</span>';
507 507
 			}
@@ -534,12 +534,12 @@  discard block
 block discarded – undo
534 534
 				'ee_read_transaction',
535 535
 				'espresso_transactions_view_transaction'
536 536
 			) ? '<a href="'
537
-			    . $view_txn_url
538
-			    . '" title="'
539
-			    . esc_attr__( 'View Transaction', 'event_espresso' )
540
-			    . '"><span class="reg-pad-rght">'
541
-			    . $txn_total
542
-			    . '</span></a>' : '<span class="reg-pad-rght">' . $txn_total . '</span>';
537
+				. $view_txn_url
538
+				. '" title="'
539
+				. esc_attr__( 'View Transaction', 'event_espresso' )
540
+				. '"><span class="reg-pad-rght">'
541
+				. $txn_total
542
+				. '</span></a>' : '<span class="reg-pad-rght">' . $txn_total . '</span>';
543 543
 		} else {
544 544
 			return '<span class="reg-pad-rght"></span>';
545 545
 		}
Please login to merge, or discard this patch.
Spacing   +119 added lines, -119 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1
-<?php if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) {
2
-	exit( 'No direct script access allowed' );
1
+<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) {
2
+	exit('No direct script access allowed');
3 3
 }
4 4
 
5 5
 
@@ -42,51 +42,51 @@  discard block
 block discarded – undo
42 42
 	 *
43 43
 	 * @param \Registrations_Admin_Page $admin_page
44 44
 	 */
45
-	public function __construct( $admin_page ) {
46
-		parent::__construct( $admin_page );
45
+	public function __construct($admin_page) {
46
+		parent::__construct($admin_page);
47 47
 		$this->_status = $this->_admin_page->get_registration_status_array();
48 48
 	}
49 49
 
50 50
 
51 51
 
52 52
 	protected function _setup_data() {
53
-		$this->_data = $this->_view !== 'trash' ? $this->_admin_page->get_event_attendees( $this->_per_page )
54
-			: $this->_admin_page->get_event_attendees( $this->_per_page, false, true );
53
+		$this->_data = $this->_view !== 'trash' ? $this->_admin_page->get_event_attendees($this->_per_page)
54
+			: $this->_admin_page->get_event_attendees($this->_per_page, false, true);
55 55
 		$this->_all_data_count = $this->_view !== 'trash' ? $this->_admin_page->get_event_attendees(
56 56
 			$this->_per_page,
57 57
 			true
58
-		) : $this->_admin_page->get_event_attendees( $this->_per_page, true, true );
58
+		) : $this->_admin_page->get_event_attendees($this->_per_page, true, true);
59 59
 	}
60 60
 
61 61
 
62 62
 
63 63
 	protected function _set_properties() {
64
-		$evt_id = isset( $this->_req_data['event_id'] ) ? $this->_req_data['event_id'] : null;
64
+		$evt_id = isset($this->_req_data['event_id']) ? $this->_req_data['event_id'] : null;
65 65
 		$this->_wp_list_args = array(
66
-			'singular' => __( 'registrant', 'event_espresso' ),
67
-			'plural'   => __( 'registrants', 'event_espresso' ),
66
+			'singular' => __('registrant', 'event_espresso'),
67
+			'plural'   => __('registrants', 'event_espresso'),
68 68
 			'ajax'     => true,
69 69
 			'screen'   => $this->_admin_page->get_current_screen()->id,
70 70
 		);
71 71
 		$columns = array();
72 72
 		//$columns['_Reg_Status'] = '';
73
-		if ( ! empty( $evt_id ) ) {
73
+		if ( ! empty($evt_id)) {
74 74
 			$columns['cb'] = '<input type="checkbox" />'; //Render a checkbox instead of text
75 75
 			$this->_has_checkbox_column = true;
76 76
 		}
77 77
 		$this->_columns = array(
78 78
 			'_REG_att_checked_in' => '<span class="dashicons dashicons-yes ee-icon-size-18"></span>',
79
-			'ATT_name'            => __( 'Registrant', 'event_espresso' ),
80
-			'ATT_email'           => __( 'Email Address', 'event_espresso' ),
81
-			'Event'               => __( 'Event', 'event_espresso' ),
82
-			'PRC_name'            => __( 'TKT Option', 'event_espresso' ),
83
-			'_REG_final_price'    => __( 'Price', 'event_espresso' ),
84
-			'TXN_paid'            => __( 'Paid', 'event_espresso' ),
85
-			'TXN_total'           => __( 'Total', 'event_espresso' ),
79
+			'ATT_name'            => __('Registrant', 'event_espresso'),
80
+			'ATT_email'           => __('Email Address', 'event_espresso'),
81
+			'Event'               => __('Event', 'event_espresso'),
82
+			'PRC_name'            => __('TKT Option', 'event_espresso'),
83
+			'_REG_final_price'    => __('Price', 'event_espresso'),
84
+			'TXN_paid'            => __('Paid', 'event_espresso'),
85
+			'TXN_total'           => __('Total', 'event_espresso'),
86 86
 		);
87
-		$this->_columns = array_merge( $columns, $this->_columns );
87
+		$this->_columns = array_merge($columns, $this->_columns);
88 88
 		$this->_primary_column = '_REG_att_checked_in';
89
-		if ( ! empty( $evt_id )
89
+		if ( ! empty($evt_id)
90 90
 		     && EE_Registry::instance()->CAP->current_user_can(
91 91
 				'ee_read_registrations',
92 92
 				'espresso_registrations_registrations_reports',
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 					'extra_request' =>
100 100
 						array(
101 101
 							'EVT_ID'     => $evt_id,
102
-							'return_url' => urlencode( "//{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}" ),
102
+							'return_url' => urlencode("//{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}"),
103 103
 						),
104 104
 				),
105 105
 			);
@@ -140,12 +140,12 @@  discard block
 block discarded – undo
140 140
                     true,
141 141
                     $this
142 142
                 )
143
-                ? array( 'ATT_lname' => true )
144
-                : array( 'ATT_fname' => true ),
145
-			'Event'    => array( 'Event.EVT.Name' => false ),
143
+                ? array('ATT_lname' => true)
144
+                : array('ATT_fname' => true),
145
+			'Event'    => array('Event.EVT.Name' => false),
146 146
 		);
147 147
 		$this->_hidden_columns = array();
148
-		$this->_evt = EEM_Event::instance()->get_one_by_ID( $evt_id );
148
+		$this->_evt = EEM_Event::instance()->get_one_by_ID($evt_id);
149 149
 		$this->_dtts_for_event = $this->_evt instanceof EE_Event ? $this->_evt->datetimes_ordered() : array();
150 150
 	}
151 151
 
@@ -155,11 +155,11 @@  discard block
 block discarded – undo
155 155
 	 * @param \EE_Registration $item
156 156
 	 * @return string
157 157
 	 */
158
-	protected function _get_row_class( $item ) {
159
-		$class = parent::_get_row_class( $item );
158
+	protected function _get_row_class($item) {
159
+		$class = parent::_get_row_class($item);
160 160
 		//add status class
161
-		$class .= ' ee-status-strip reg-status-' . $item->status_ID();
162
-		if ( $this->_has_checkbox_column ) {
161
+		$class .= ' ee-status-strip reg-status-'.$item->status_ID();
162
+		if ($this->_has_checkbox_column) {
163 163
 			$class .= ' has-checkbox-column';
164 164
 		}
165 165
 		return $class;
@@ -173,61 +173,61 @@  discard block
 block discarded – undo
173 173
 	 */
174 174
 	protected function _get_table_filters() {
175 175
 		$filters = $where = array();
176
-		$current_EVT_ID = isset( $this->_req_data['event_id'] ) ? (int) $this->_req_data['event_id'] : 0;
177
-		if ( empty( $this->_dtts_for_event ) || count( $this->_dtts_for_event ) === 1 ) {
176
+		$current_EVT_ID = isset($this->_req_data['event_id']) ? (int) $this->_req_data['event_id'] : 0;
177
+		if (empty($this->_dtts_for_event) || count($this->_dtts_for_event) === 1) {
178 178
 			//this means we don't have an event so let's setup a filter dropdown for all the events to select
179 179
 			//note possible capability restrictions
180
-			if ( ! EE_Registry::instance()->CAP->current_user_can( 'ee_read_private_events', 'get_events' ) ) {
181
-				$where['status**'] = array( '!=', 'private' );
180
+			if ( ! EE_Registry::instance()->CAP->current_user_can('ee_read_private_events', 'get_events')) {
181
+				$where['status**'] = array('!=', 'private');
182 182
 			}
183
-			if ( ! EE_Registry::instance()->CAP->current_user_can( 'ee_read_others_events', 'get_events' ) ) {
183
+			if ( ! EE_Registry::instance()->CAP->current_user_can('ee_read_others_events', 'get_events')) {
184 184
 				$where['EVT_wp_user'] = get_current_user_id();
185 185
 			}
186 186
 			$events = EEM_Event::instance()->get_all(
187 187
 				array(
188 188
 					$where,
189
-					'order_by' => array( 'Datetime.DTT_EVT_start' => 'DESC' ),
189
+					'order_by' => array('Datetime.DTT_EVT_start' => 'DESC'),
190 190
 				)
191 191
 			);
192 192
 			$evts[] = array(
193 193
 				'id'   => 0,
194
-				'text' => __( 'To toggle Check-in status, select an event', 'event_espresso' ),
194
+				'text' => __('To toggle Check-in status, select an event', 'event_espresso'),
195 195
 			);
196 196
 			$checked = 'checked';
197 197
 			/** @var EE_Event $evt */
198
-			foreach ( $events as $evt ) {
198
+			foreach ($events as $evt) {
199 199
 				//any registrations for this event?
200
-				if ( ! $evt->get_count_of_all_registrations() ) {
200
+				if ( ! $evt->get_count_of_all_registrations()) {
201 201
 					continue;
202 202
 				}
203 203
                                 $evts[] = array(
204 204
 					'id'    => $evt->ID(),
205
-					'text'  => apply_filters('FHEE__EE_Event_Registrations___get_table_filters__event_name', $evt->get( 'EVT_name' ), $evt),
205
+					'text'  => apply_filters('FHEE__EE_Event_Registrations___get_table_filters__event_name', $evt->get('EVT_name'), $evt),
206 206
 					'class' => $evt->is_expired() ? 'ee-expired-event' : '',
207 207
 				);
208
-				if ( $evt->ID() === $current_EVT_ID && $evt->is_expired() ) {
208
+				if ($evt->ID() === $current_EVT_ID && $evt->is_expired()) {
209 209
 					$checked = '';
210 210
 				}
211 211
 			}
212 212
 			$event_filter = '<div class="ee-event-filter">';
213
-			$event_filter .= EEH_Form_Fields::select_input( 'event_id', $evts, $current_EVT_ID );
213
+			$event_filter .= EEH_Form_Fields::select_input('event_id', $evts, $current_EVT_ID);
214 214
 			$event_filter .= '<span class="ee-event-filter-toggle">';
215
-			$event_filter .= '<input type="checkbox" id="js-ee-hide-expired-events" ' . $checked . '> ';
216
-			$event_filter .= __( 'Hide Expired Events', 'event_espresso' );
215
+			$event_filter .= '<input type="checkbox" id="js-ee-hide-expired-events" '.$checked.'> ';
216
+			$event_filter .= __('Hide Expired Events', 'event_espresso');
217 217
 			$event_filter .= '</span>';
218 218
 			$event_filter .= '</div>';
219 219
 			$filters[] = $event_filter;
220 220
 		}
221
-		if ( ! empty( $this->_dtts_for_event ) ) {
221
+		if ( ! empty($this->_dtts_for_event)) {
222 222
 			//DTT datetimes filter
223
-			$this->_cur_dtt_id = isset( $this->_req_data['DTT_ID'] ) ? $this->_req_data['DTT_ID'] : 0;
224
-			if ( count( $this->_dtts_for_event ) > 1 ) {
225
-				$dtts[0] = __( 'To toggle check-in status, select a datetime.', 'event_espresso' );
226
-				foreach ( $this->_dtts_for_event as $dtt ) {
223
+			$this->_cur_dtt_id = isset($this->_req_data['DTT_ID']) ? $this->_req_data['DTT_ID'] : 0;
224
+			if (count($this->_dtts_for_event) > 1) {
225
+				$dtts[0] = __('To toggle check-in status, select a datetime.', 'event_espresso');
226
+				foreach ($this->_dtts_for_event as $dtt) {
227 227
                     $datetime_string = $dtt->name();
228
-                    $datetime_string = ! empty($datetime_string ) ? ' (' . $datetime_string . ')' : '';
229
-					$datetime_string = $dtt->start_date_and_time() . ' - ' . $dtt->end_date_and_time() . $datetime_string;
230
-					$dtts[ $dtt->ID() ] = $datetime_string;
228
+                    $datetime_string = ! empty($datetime_string) ? ' ('.$datetime_string.')' : '';
229
+					$datetime_string = $dtt->start_date_and_time().' - '.$dtt->end_date_and_time().$datetime_string;
230
+					$dtts[$dtt->ID()] = $datetime_string;
231 231
 				}
232 232
 				$input = new EE_Select_Input(
233 233
 					$dtts,
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
 					)
239 239
 				);
240 240
 				$filters[] = $input->get_html_for_input();
241
-				$filters[] = '<input type="hidden" name="event_id" value="' . $current_EVT_ID . '">';
241
+				$filters[] = '<input type="hidden" name="event_id" value="'.$current_EVT_ID.'">';
242 242
 			}
243 243
 		}
244 244
 		return $filters;
@@ -257,22 +257,22 @@  discard block
 block discarded – undo
257 257
 	 * @throws \EE_Error
258 258
 	 */
259 259
 	protected function _get_total_event_attendees() {
260
-		$EVT_ID = isset( $this->_req_data['event_id'] ) ? absint( $this->_req_data['event_id'] ) : false;
260
+		$EVT_ID = isset($this->_req_data['event_id']) ? absint($this->_req_data['event_id']) : false;
261 261
 		$DTT_ID = $this->_cur_dtt_id;
262 262
 		$query_params = array();
263
-		if ( $EVT_ID ) {
263
+		if ($EVT_ID) {
264 264
 			$query_params[0]['EVT_ID'] = $EVT_ID;
265 265
 		}
266 266
 		//if DTT is included we only show for that datetime.  Otherwise we're showing for all datetimes (the event).
267
-		if ( $DTT_ID ) {
267
+		if ($DTT_ID) {
268 268
 			$query_params[0]['Ticket.Datetime.DTT_ID'] = $DTT_ID;
269 269
 		}
270 270
 		$status_ids_array = apply_filters(
271 271
 			'FHEE__Extend_Registrations_Admin_Page__get_event_attendees__status_ids_array',
272
-			array( EEM_Registration::status_id_pending_payment, EEM_Registration::status_id_approved )
272
+			array(EEM_Registration::status_id_pending_payment, EEM_Registration::status_id_approved)
273 273
 		);
274
-		$query_params[0]['STS_ID'] = array( 'IN', $status_ids_array );
275
-		return EEM_Registration::instance()->count( $query_params );
274
+		$query_params[0]['STS_ID'] = array('IN', $status_ids_array);
275
+		return EEM_Registration::instance()->count($query_params);
276 276
 	}
277 277
 
278 278
 
@@ -281,8 +281,8 @@  discard block
 block discarded – undo
281 281
 	 * @param \EE_Registration $item
282 282
 	 * @return string
283 283
 	 */
284
-	public function column__Reg_Status( EE_Registration $item ) {
285
-		return '<span class="ee-status-strip ee-status-strip-td reg-status-' . $item->status_ID() . '"></span>';
284
+	public function column__Reg_Status(EE_Registration $item) {
285
+		return '<span class="ee-status-strip ee-status-strip-td reg-status-'.$item->status_ID().'"></span>';
286 286
 	}
287 287
 
288 288
 
@@ -292,8 +292,8 @@  discard block
 block discarded – undo
292 292
 	 * @return string
293 293
 	 * @throws \EE_Error
294 294
 	 */
295
-	public function column_cb( $item ) {
296
-		return sprintf( '<input type="checkbox" name="checkbox[%1$s]" value="%1$s" />', $item->ID() );
295
+	public function column_cb($item) {
296
+		return sprintf('<input type="checkbox" name="checkbox[%1$s]" value="%1$s" />', $item->ID());
297 297
 	}
298 298
 
299 299
 
@@ -305,20 +305,20 @@  discard block
 block discarded – undo
305 305
 	 * @return string
306 306
 	 * @throws \EE_Error
307 307
 	 */
308
-	public function column__REG_att_checked_in( EE_Registration $item ) {
308
+	public function column__REG_att_checked_in(EE_Registration $item) {
309 309
 		$attendee = $item->attendee();
310 310
 		$attendee_name = $attendee instanceof EE_Attendee ? $attendee->full_name() : '';
311 311
 
312
-		if ( $this->_cur_dtt_id === 0 && count( $this->_dtts_for_event ) === 1 ) {
312
+		if ($this->_cur_dtt_id === 0 && count($this->_dtts_for_event) === 1) {
313 313
 			$latest_related_datetime = $item->get_latest_related_datetime();
314
-			if ( $latest_related_datetime instanceof EE_Datetime ) {
314
+			if ($latest_related_datetime instanceof EE_Datetime) {
315 315
 				$this->_cur_dtt_id = $latest_related_datetime->ID();
316 316
 			}
317 317
 		}
318 318
 
319
-		$checkinstatus = $item->check_in_status_for_datetime( $this->_cur_dtt_id );
320
-		$nonce = wp_create_nonce( 'checkin_nonce' );
321
-		$toggle_active = ! empty ( $this->_cur_dtt_id )
319
+		$checkinstatus = $item->check_in_status_for_datetime($this->_cur_dtt_id);
320
+		$nonce = wp_create_nonce('checkin_nonce');
321
+		$toggle_active = ! empty ($this->_cur_dtt_id)
322 322
 		                 && EE_Registry::instance()->CAP->current_user_can(
323 323
 			'ee_edit_checkin',
324 324
 			'espresso_registrations_toggle_checkin_status',
@@ -326,11 +326,11 @@  discard block
 block discarded – undo
326 326
 		)
327 327
 			? ' clickable trigger-checkin'
328 328
 			: '';
329
-		$mobile_view_content = ' <span class="show-on-mobile-view-only">' . $attendee_name . '</span>';
330
-		return '<span class="checkin-icons checkedin-status-' . $checkinstatus . $toggle_active . '"'
331
-		       . ' data-_regid="' . $item->ID() . '"'
332
-		       . ' data-dttid="' . $this->_cur_dtt_id . '"'
333
-		       . ' data-nonce="' . $nonce . '">'
329
+		$mobile_view_content = ' <span class="show-on-mobile-view-only">'.$attendee_name.'</span>';
330
+		return '<span class="checkin-icons checkedin-status-'.$checkinstatus.$toggle_active.'"'
331
+		       . ' data-_regid="'.$item->ID().'"'
332
+		       . ' data-dttid="'.$this->_cur_dtt_id.'"'
333
+		       . ' data-nonce="'.$nonce.'">'
334 334
 		       . '</span>'
335 335
 		       . $mobile_view_content;
336 336
 	}
@@ -342,21 +342,21 @@  discard block
 block discarded – undo
342 342
 	 * @return mixed|string|void
343 343
 	 * @throws \EE_Error
344 344
 	 */
345
-	public function column_ATT_name( EE_Registration $item ) {
345
+	public function column_ATT_name(EE_Registration $item) {
346 346
 		$attendee = $item->attendee();
347
-		if ( ! $attendee instanceof EE_Attendee ) {
348
-			return __( 'No contact record for this registration.', 'event_espresso' );
347
+		if ( ! $attendee instanceof EE_Attendee) {
348
+			return __('No contact record for this registration.', 'event_espresso');
349 349
 		}
350 350
 		// edit attendee link
351 351
 		$edit_lnk_url = EE_Admin_Page::add_query_args_and_nonce(
352
-			array( 'action' => 'view_registration', '_REG_ID' => $item->ID() ),
352
+			array('action' => 'view_registration', '_REG_ID' => $item->ID()),
353 353
 			REG_ADMIN_URL
354 354
 		);
355 355
 		$name_link = EE_Registry::instance()->CAP->current_user_can(
356 356
 			'ee_edit_contacts',
357 357
 			'espresso_registrations_edit_attendee'
358 358
 		)
359
-			? '<a href="' . $edit_lnk_url . '" title="' . esc_attr__( 'View Registration Details', 'event_espresso' ) . '">'
359
+			? '<a href="'.$edit_lnk_url.'" title="'.esc_attr__('View Registration Details', 'event_espresso').'">'
360 360
 			    . $item->attendee()->full_name()
361 361
 			    . '</a>'
362 362
 			: $item->attendee()->full_name();
@@ -364,10 +364,10 @@  discard block
 block discarded – undo
364 364
 			? '&nbsp;<sup><div class="dashicons dashicons-star-filled lt-blue-icon ee-icon-size-8"></div></sup>	'
365 365
 			: '';
366 366
 		//add group details
367
-		$name_link .= '&nbsp;' . sprintf( __( '(%s of %s)', 'event_espresso' ), $item->count(), $item->group_size() );
367
+		$name_link .= '&nbsp;'.sprintf(__('(%s of %s)', 'event_espresso'), $item->count(), $item->group_size());
368 368
 		//add regcode
369 369
 		$link = EE_Admin_Page::add_query_args_and_nonce(
370
-			array( 'action' => 'view_registration', '_REG_ID' => $item->ID() ),
370
+			array('action' => 'view_registration', '_REG_ID' => $item->ID()),
371 371
 			REG_ADMIN_URL
372 372
 		);
373 373
 		$name_link .= '<br>';
@@ -376,50 +376,50 @@  discard block
 block discarded – undo
376 376
 			'view_registration',
377 377
 			$item->ID()
378 378
 		)
379
-			? '<a href="' . $link . '" title="' . esc_attr__( 'View Registration Details', 'event_espresso' ) . '">'
379
+			? '<a href="'.$link.'" title="'.esc_attr__('View Registration Details', 'event_espresso').'">'
380 380
 			  . $item->reg_code()
381 381
 			  . '</a>'
382 382
 			: $item->reg_code();
383 383
 		//status
384 384
 		$name_link .= '<br><span class="ee-status-text-small">';
385
-		$name_link .= EEH_Template::pretty_status( $item->status_ID(), false, 'sentence' );
385
+		$name_link .= EEH_Template::pretty_status($item->status_ID(), false, 'sentence');
386 386
 		$name_link .= '</span>';
387 387
 		$actions = array();
388 388
 		$DTT_ID = $this->_cur_dtt_id;
389
-		$latest_related_datetime = empty( $DTT_ID ) && ! empty( $this->_req_data['event_id'] ) && $item instanceof EE_Registration
389
+		$latest_related_datetime = empty($DTT_ID) && ! empty($this->_req_data['event_id']) && $item instanceof EE_Registration
390 390
 			? $item->get_latest_related_datetime()
391 391
 			: null;
392 392
 		$DTT_ID = $latest_related_datetime instanceof EE_Datetime
393 393
 			? $latest_related_datetime->ID()
394 394
 			: $DTT_ID;
395
-		if ( ! empty( $DTT_ID )
395
+		if ( ! empty($DTT_ID)
396 396
 		     && EE_Registry::instance()->CAP->current_user_can(
397 397
 				'ee_read_checkins',
398 398
 				'espresso_registrations_registration_checkins'
399 399
 			)
400 400
 		) {
401 401
 			$checkin_list_url = EE_Admin_Page::add_query_args_and_nonce(
402
-				array( 'action' => 'registration_checkins', '_REGID' => $item->ID(), 'DTT_ID' => $DTT_ID )
402
+				array('action' => 'registration_checkins', '_REGID' => $item->ID(), 'DTT_ID' => $DTT_ID)
403 403
 			);
404 404
 			// get the timestamps for this registration's checkins, related to the selected datetime
405
-			$timestamps = $item->get_many_related( 'Checkin', array( array( 'DTT_ID' => $DTT_ID ) ) );
406
-			if( ! empty( $timestamps ) ) {
405
+			$timestamps = $item->get_many_related('Checkin', array(array('DTT_ID' => $DTT_ID)));
406
+			if ( ! empty($timestamps)) {
407 407
 				// get the last timestamp
408
-				$last_timestamp = end( $timestamps );
408
+				$last_timestamp = end($timestamps);
409 409
 				// checked in or checked out?
410
-				$checkin_status = $last_timestamp->get( 'CHK_in' ) 
411
-					? esc_html__( 'Checked In', 'event_espresso' )
412
-					: esc_html__( 'Checked Out', 'event_espresso' );
410
+				$checkin_status = $last_timestamp->get('CHK_in') 
411
+					? esc_html__('Checked In', 'event_espresso')
412
+					: esc_html__('Checked Out', 'event_espresso');
413 413
 				// get timestamp string
414
-				$timestamp_string = $last_timestamp->get_datetime( 'CHK_timestamp' );
415
-				$actions['checkin'] = '<a href="' . $checkin_list_url . '" title="' . esc_attr__(
414
+				$timestamp_string = $last_timestamp->get_datetime('CHK_timestamp');
415
+				$actions['checkin'] = '<a href="'.$checkin_list_url.'" title="'.esc_attr__(
416 416
 						'View this registrant\'s check-ins/checkouts for the datetime',
417 417
 						'event_espresso'
418
-					) . '">' . $checkin_status . ': ' . $timestamp_string . '</a>';
418
+					).'">'.$checkin_status.': '.$timestamp_string.'</a>';
419 419
 			}
420 420
 		} 
421
-		return ( ! empty( $DTT_ID ) && ! empty( $timestamps ) ) 
422
-			? sprintf( '%1$s %2$s', $name_link, $this->row_actions( $actions, true ) ) 
421
+		return ( ! empty($DTT_ID) && ! empty($timestamps)) 
422
+			? sprintf('%1$s %2$s', $name_link, $this->row_actions($actions, true)) 
423 423
 			: $name_link;
424 424
 	}
425 425
 
@@ -429,7 +429,7 @@  discard block
 block discarded – undo
429 429
 	 * @param \EE_Registration $item
430 430
 	 * @return string
431 431
 	 */
432
-	public function column_ATT_email( EE_Registration $item ) {
432
+	public function column_ATT_email(EE_Registration $item) {
433 433
 		$attendee = $item->attendee();
434 434
 		return $attendee instanceof EE_Attendee ? $attendee->email() : '';
435 435
 	}
@@ -441,22 +441,22 @@  discard block
 block discarded – undo
441 441
 	 * @return bool|string
442 442
 	 * @throws \EE_Error
443 443
 	 */
444
-	public function column_Event( EE_Registration $item ) {
444
+	public function column_Event(EE_Registration $item) {
445 445
 		try {
446 446
 			$event = $this->_evt instanceof EE_Event ? $this->_evt : $item->event();
447 447
 			$chkin_lnk_url = EE_Admin_Page::add_query_args_and_nonce(
448
-				array( 'action' => 'event_registrations', 'event_id' => $event->ID() ),
448
+				array('action' => 'event_registrations', 'event_id' => $event->ID()),
449 449
 				REG_ADMIN_URL
450 450
 			);
451 451
 			$event_label = EE_Registry::instance()->CAP->current_user_can(
452 452
 				'ee_read_checkins',
453 453
 				'espresso_registrations_registration_checkins'
454
-			) ? '<a href="' . $chkin_lnk_url . '" title="' . esc_attr__(
454
+			) ? '<a href="'.$chkin_lnk_url.'" title="'.esc_attr__(
455 455
 					'View Checkins for this Event',
456 456
 					'event_espresso'
457
-				) . '">' . $event->name() . '</a>' : $event->name();
458
-		} catch ( \EventEspresso\core\exceptions\EntityNotFoundException $e ) {
459
-			$event_label = esc_html__( 'Unknown', 'event_espresso' );
457
+				).'">'.$event->name().'</a>' : $event->name();
458
+		} catch (\EventEspresso\core\exceptions\EntityNotFoundException $e) {
459
+			$event_label = esc_html__('Unknown', 'event_espresso');
460 460
 		}
461 461
 		return $event_label;
462 462
 	}
@@ -467,8 +467,8 @@  discard block
 block discarded – undo
467 467
 	 * @param \EE_Registration $item
468 468
 	 * @return mixed|string|void
469 469
 	 */
470
-	public function column_PRC_name( EE_Registration $item ) {
471
-		return $item->ticket() instanceof EE_Ticket ? $item->ticket()->name() : __( "Unknown", "event_espresso" );
470
+	public function column_PRC_name(EE_Registration $item) {
471
+		return $item->ticket() instanceof EE_Ticket ? $item->ticket()->name() : __("Unknown", "event_espresso");
472 472
 	}
473 473
 
474 474
 
@@ -479,8 +479,8 @@  discard block
 block discarded – undo
479 479
 	 * @param \EE_Registration $item
480 480
 	 * @return string
481 481
 	 */
482
-	public function column__REG_final_price( EE_Registration $item ) {
483
-		return '<span class="reg-pad-rght">' . ' ' . $item->pretty_final_price() . '</span>';
482
+	public function column__REG_final_price(EE_Registration $item) {
483
+		return '<span class="reg-pad-rght">'.' '.$item->pretty_final_price().'</span>';
484 484
 	}
485 485
 
486 486
 
@@ -492,13 +492,13 @@  discard block
 block discarded – undo
492 492
 	 * @return string
493 493
 	 * @throws \EE_Error
494 494
 	 */
495
-	public function column_TXN_paid( EE_Registration $item ) {
496
-		if ( $item->count() === 1 ) {
497
-			if ( $item->transaction()->paid() >= $item->transaction()->total() ) {
495
+	public function column_TXN_paid(EE_Registration $item) {
496
+		if ($item->count() === 1) {
497
+			if ($item->transaction()->paid() >= $item->transaction()->total()) {
498 498
 				return '<span class="reg-pad-rght"><div class="dashicons dashicons-yes green-icon"></div></span>';
499 499
 			} else {
500 500
 				$view_txn_lnk_url = EE_Admin_Page::add_query_args_and_nonce(
501
-					array( 'action' => 'view_transaction', 'TXN_ID' => $item->transaction_ID() ),
501
+					array('action' => 'view_transaction', 'TXN_ID' => $item->transaction_ID()),
502 502
 					TXN_ADMIN_URL
503 503
 				);
504 504
 				return EE_Registry::instance()->CAP->current_user_can(
@@ -511,13 +511,13 @@  discard block
 block discarded – undo
511 511
 				    . '" href="'
512 512
 				    . $view_txn_lnk_url
513 513
 				    . '"  title="'
514
-				    . esc_attr__( 'View Transaction', 'event_espresso' )
514
+				    . esc_attr__('View Transaction', 'event_espresso')
515 515
 				    . '">
516 516
 						'
517 517
 				    . $item->transaction()->pretty_paid()
518 518
 				    . '
519 519
 					</a>
520
-				<span>' : '<span class="reg-pad-rght">' . $item->transaction()->pretty_paid() . '</span>';
520
+				<span>' : '<span class="reg-pad-rght">'.$item->transaction()->pretty_paid().'</span>';
521 521
 			}
522 522
 		} else {
523 523
 			return '<span class="reg-pad-rght"></span>';
@@ -533,13 +533,13 @@  discard block
 block discarded – undo
533 533
 	 * @return string
534 534
 	 * @throws \EE_Error
535 535
 	 */
536
-	public function column_TXN_total( EE_Registration $item ) {
536
+	public function column_TXN_total(EE_Registration $item) {
537 537
 		$txn = $item->transaction();
538
-		$view_txn_url = add_query_arg( array( 'action' => 'view_transaction', 'TXN_ID' => $txn->ID() ), TXN_ADMIN_URL );
539
-		if ( $item->get( 'REG_count' ) === 1 ) {
538
+		$view_txn_url = add_query_arg(array('action' => 'view_transaction', 'TXN_ID' => $txn->ID()), TXN_ADMIN_URL);
539
+		if ($item->get('REG_count') === 1) {
540 540
 			$line_total_obj = $txn->total_line_item();
541 541
 			$txn_total = $line_total_obj instanceof EE_Line_Item
542
-				? $line_total_obj->get_pretty( 'LIN_total' )
542
+				? $line_total_obj->get_pretty('LIN_total')
543 543
 				: __(
544 544
 					'View Transaction',
545 545
 					'event_espresso'
@@ -550,10 +550,10 @@  discard block
 block discarded – undo
550 550
 			) ? '<a href="'
551 551
 			    . $view_txn_url
552 552
 			    . '" title="'
553
-			    . esc_attr__( 'View Transaction', 'event_espresso' )
553
+			    . esc_attr__('View Transaction', 'event_espresso')
554 554
 			    . '"><span class="reg-pad-rght">'
555 555
 			    . $txn_total
556
-			    . '</span></a>' : '<span class="reg-pad-rght">' . $txn_total . '</span>';
556
+			    . '</span></a>' : '<span class="reg-pad-rght">'.$txn_total.'</span>';
557 557
 		} else {
558 558
 			return '<span class="reg-pad-rght"></span>';
559 559
 		}
Please login to merge, or discard this patch.
admin/new/pricing/templates/event_tickets_datetime_ticket_row.template.php 2 patches
Braces   +40 added lines, -16 removed lines patch added patch discarded remove patch
@@ -6,24 +6,33 @@  discard block
 block discarded – undo
6 6
 		<?php if ( $disabled ) : ?>
7 7
 			<input type="hidden" id="edit-ticket-TKT_start_date-<?php echo $tkt_row; ?>"  name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_start_date]" class="edit-ticket-TKT_start_date ee-text-inp" value="<?php echo $TKT_start_date; ?>" >
8 8
 			<input type="text" name="archived_ticket[TKT_start_date]" class="edit-ticket-TKT_start_date ee-text-inp" value="<?php echo $TKT_start_date; ?>" disabled>
9
-		<?php else : ?>
10
-			<input id="edit-ticket-TKT_start_date-<?php echo $tkt_row; ?>" type="text" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_start_date]" class="edit-ticket-TKT_start_date ee-text-inp ee-datepicker" value="<?php echo $TKT_start_date; ?>" data-context="start-ticket" data-date-field-context="#display-ticketrow-<?php echo $tkt_row; ?>" data-related-field=".edit-ticket-TKT_end_date" data-next-field=".edit-ticket-TKT_end_date">
9
+		<?php else {
10
+	: ?>
11
+			<input id="edit-ticket-TKT_start_date-<?php echo $tkt_row;
12
+}
13
+?>" type="text" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_start_date]" class="edit-ticket-TKT_start_date ee-text-inp ee-datepicker" value="<?php echo $TKT_start_date; ?>" data-context="start-ticket" data-date-field-context="#display-ticketrow-<?php echo $tkt_row; ?>" data-related-field=".edit-ticket-TKT_end_date" data-next-field=".edit-ticket-TKT_end_date">
11 14
 		<?php endif; ?>
12 15
 	</td>
13 16
 	<td>
14 17
 		<?php if ( $disabled ) : ?>
15 18
 			<input type="hidden" id="edit-ticket-TKT_end_date-<?php echo $tkt_row; ?>"  name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_end_date]" class="edit-ticket-TKT_end_date ee-text-inp" value="<?php echo $TKT_end_date; ?>" >
16 19
 			<input type="text" name="archived_ticket[TKT_end_date]" class="edit-ticket-TKT_end_date ee-text-inp" value="<?php echo $TKT_end_date; ?>" disabled>
17
-		<?php else : ?>
18
-			<input id="edit-ticket-TKT_end_date-<?php echo $tkt_row; ?>" type="text" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_end_date]" class="edit-ticket-TKT_end_date ee-text-inp ee-datepicker" value="<?php echo $TKT_end_date; ?>" data-context="end-ticket" data-date-field-context="#display-ticketrow-<?php echo $tkt_row; ?>" data-related-field=".edit-ticket-TKT_start_date" data-next-field=".edit-ticket-TKT_qty">
20
+		<?php else {
21
+	: ?>
22
+			<input id="edit-ticket-TKT_end_date-<?php echo $tkt_row;
23
+}
24
+?>" type="text" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_end_date]" class="edit-ticket-TKT_end_date ee-text-inp ee-datepicker" value="<?php echo $TKT_end_date; ?>" data-context="end-ticket" data-date-field-context="#display-ticketrow-<?php echo $tkt_row; ?>" data-related-field=".edit-ticket-TKT_start_date" data-next-field=".edit-ticket-TKT_qty">
19 25
 		<?php endif; ?>
20 26
 	</td>
21 27
 	<td>
22 28
 		<?php if ( $disabled ) : ?>
23 29
 			<input id="edit-ticket-TKT_base_price-<?php echo $tkt_row; ?>" type="hidden" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_base_price]" class="edit-ticket-TKT_base_price ee-small-text-inp edit-price-PRC_amount ee-numeric" value="<?php echo $TKT_base_price; ?>">
24 30
 			<input type="text" name="archived_ticket[<?php echo $tkt_row; ?>][TKT_base_price]" class="edit-ticket-TKT_base_price ee-small-text-inp edit-price-PRC_amount ee-numeric" value="<?php echo $TKT_base_price; ?>" disabled>
25
-		<?php else : ?>
26
-			<input id="edit-ticket-TKT_base_price-<?php echo $tkt_row; ?>" type="text" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_base_price]" class="edit-ticket-TKT_base_price ee-small-text-inp edit-price-PRC_amount ee-numeric" value="<?php echo $TKT_base_price; ?>">
31
+		<?php else {
32
+	: ?>
33
+			<input id="edit-ticket-TKT_base_price-<?php echo $tkt_row;
34
+}
35
+?>" type="text" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_base_price]" class="edit-ticket-TKT_base_price ee-small-text-inp edit-price-PRC_amount ee-numeric" value="<?php echo $TKT_base_price; ?>">
27 36
 		<?php endif; ?>
28 37
 		<input type="hidden" id="edit-ticket-TKT_base_price_ID-<?php echo $tkt_row; ?>" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_base_price_ID]" value="<?php echo $TKT_base_price_ID; ?>">
29 38
 	</td>
@@ -31,8 +40,11 @@  discard block
 block discarded – undo
31 40
 		<?php if ( $disabled ) : ?>
32 41
 			<input type="hidden" class="edit-ticket-TKT_qty ee-small-text-inp ee-numeric" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_qty]" value="<?php echo $TKT_qty_for_input; ?>">
33 42
 			<input type="text" class="edit-ticket-TKT_qty ee-small-text-inp ee-numeric" name="archived_ticket[<?php echo $tkt_row; ?>][TKT_qty]" value="<?php echo $TKT_qty_for_input; ?>" disabled>
34
-		<?php else : ?>
35
-			<input type="text" id="edit-ticket-TKT_qty-<?php echo $tkt_row; ?>"class="edit-ticket-TKT_qty ee-small-text-inp ee-numeric" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_qty]" value="<?php echo $TKT_qty_for_input; ?>">
43
+		<?php else {
44
+	: ?>
45
+			<input type="text" id="edit-ticket-TKT_qty-<?php echo $tkt_row;
46
+}
47
+?>"class="edit-ticket-TKT_qty ee-small-text-inp ee-numeric" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_qty]" value="<?php echo $TKT_qty_for_input; ?>">
36 48
 		<?php endif; ?>
37 49
 	</td>
38 50
 	<!--<td><span class="ticket-display-row-TKT_price"><?php //echo $TKT_price; ?></span></td>-->
@@ -79,24 +91,33 @@  discard block
 block discarded – undo
79 91
 								<?php if ( $disabled ) : ?>
80 92
 									<input type="hidden" class="edit-ticket-TKT_uses ee-small-text-inp ee-numeric" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_uses]" value="<?php echo $TKT_uses; ?>">
81 93
 									<input type="text" class="edit-ticket-TKT_uses ee-small-text-inp ee-numeric" name="archived_ticket[<?php echo $tkt_row; ?>][TKT_uses]" value="<?php echo $TKT_uses; ?>" disabled>
82
-								<?php else : ?>
83
-									<input type="text" class="edit-ticket-TKT_uses ee-small-text-inp ee-numeric" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_uses]" value="<?php echo $TKT_uses; ?>">
94
+								<?php else {
95
+	: ?>
96
+									<input type="text" class="edit-ticket-TKT_uses ee-small-text-inp ee-numeric" name="<?php echo $edit_tickets_name;
97
+}
98
+?>[<?php echo $tkt_row; ?>][TKT_uses]" value="<?php echo $TKT_uses; ?>">
84 99
 								<?php endif; ?>
85 100
 							</td>
86 101
 							<td>
87 102
 								<?php if ( $disabled ) : ?>
88 103
 									<input type="hidden" class="edit-ticket-TKT_min ee-small-text-inp ee-numeric" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_min]" value="<?php echo $TKT_min; ?>">
89 104
 									<input type="text" class="edit-ticket-TKT_min ee-small-text-inp ee-numeric" name="archived_ticket[<?php echo $tkt_row; ?>][TKT_min]" value="<?php echo $TKT_min; ?>" disabled>
90
-								<?php else: ?>
91
-									<input type="text" class="edit-ticket-TKT_min ee-small-text-inp ee-numeric" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_min]" value="<?php echo $TKT_min; ?>">
105
+								<?php else {
106
+	: ?>
107
+									<input type="text" class="edit-ticket-TKT_min ee-small-text-inp ee-numeric" name="<?php echo $edit_tickets_name;
108
+}
109
+?>[<?php echo $tkt_row; ?>][TKT_min]" value="<?php echo $TKT_min; ?>">
92 110
 								<?php endif; ?>
93 111
 							</td>
94 112
 							<td>
95 113
 								<?php if ( $disabled ) : ?>
96 114
 									<input type="hidden" class="edit-ticket-TKT_max ee-small-text-inp ee-numeric" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_max]" value="<?php echo $TKT_max; ?>">
97 115
 									<input type="text" class="edit-ticket-TKT_max ee-small-text-inp ee-numeric" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_max]" value="<?php echo $TKT_max; ?>" disabled>
98
-								<?php else : ?>
99
-									<input type="text" class="edit-ticket-TKT_max ee-small-text-inp ee-numeric" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_max]" value="<?php echo $TKT_max; ?>">
116
+								<?php else {
117
+	: ?>
118
+									<input type="text" class="edit-ticket-TKT_max ee-small-text-inp ee-numeric" name="<?php echo $edit_tickets_name;
119
+}
120
+?>[<?php echo $tkt_row; ?>][TKT_max]" value="<?php echo $TKT_max; ?>">
100 121
 								<?php endif; ?>
101 122
 							</td>
102 123
 						</tr>
@@ -117,8 +138,11 @@  discard block
 block discarded – undo
117 138
 							?>
118 139
 							<input class="TKT-taxable-checkbox" type="hidden" name="<?php echo $edit_tickets_name;?>[<?php echo $tkt_row; ?>][TKT_taxable]" value="<?php echo $tax_value; ?>">
119 140
 							<input class="TKT-taxable-checkbox" id="edit-ticket-TKT_taxable-<?php echo $tkt_row; ?>" type="checkbox" name="archived_ticket[<?php echo $tkt_row; ?>][TKT_taxable]" value="1"<?php echo $TKT_taxable; ?> disabled>
120
-						<?php else : ?>
121
-							<input class="TKT-taxable-checkbox" id="edit-ticket-TKT_taxable-<?php echo $tkt_row; ?>" type="checkbox" name="<?php echo $edit_tickets_name;?>[<?php echo $tkt_row; ?>][TKT_taxable]" value="1"<?php echo $TKT_taxable; ?>>
141
+						<?php else {
142
+	: ?>
143
+							<input class="TKT-taxable-checkbox" id="edit-ticket-TKT_taxable-<?php echo $tkt_row;
144
+}
145
+?>" type="checkbox" name="<?php echo $edit_tickets_name;?>[<?php echo $tkt_row; ?>][TKT_taxable]" value="1"<?php echo $TKT_taxable; ?>>
122 146
 						<?php endif; ?>
123 147
 						<label for="edit-ticket-TKT_taxable-<?php echo $tkt_row; ?>"> <?php esc_html_e('This ticket is taxable.', 'event_espresso'); ?>
124 148
 					<?php } //end tax_rows check ?>
Please login to merge, or discard this patch.
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@  discard block
 block discarded – undo
1
-    <tr valign="top" class="ee-ticket-sortable ticket-row<?php echo $ticket_archive_class; if(WP_DEBUG){ echo ' ee-wp-debug'; } ?>" id="display-ticketrow-<?php echo $tkt_row; ?>">
1
+    <tr valign="top" class="ee-ticket-sortable ticket-row<?php echo $ticket_archive_class; if (WP_DEBUG) { echo ' ee-wp-debug'; } ?>" id="display-ticketrow-<?php echo $tkt_row; ?>">
2 2
 	<!--<td class="ee-tkt-order-field"><span class="dashicons dashicons-sort<?php echo $tkt_status_class; ?>"><input type="hidden" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_order]" class="edit-ticket-TKT_order" value ="<?php echo $TKT_order; ?>" ></span></td>-->
3 3
 	<td class="ee-tkt-order-field"><span class="ee-status-strip-td ee-status-strip<?php echo $tkt_status_class; ?>"></span><input type="hidden" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_order]" class="edit-ticket-TKT_order" value ="<?php echo $TKT_order; ?>"></td>
4 4
 	<td><input maxlength="245" type="text" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_name]" class="edit-ticket-TKT_name ee-large-text-inp" placeholder="Ticket Title" value="<?php echo $TKT_name; ?>"></td>
5 5
 	<td>
6
-		<?php if ( $disabled ) : ?>
6
+		<?php if ($disabled) : ?>
7 7
 			<input type="hidden" id="edit-ticket-TKT_start_date-<?php echo $tkt_row; ?>"  name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_start_date]" class="edit-ticket-TKT_start_date ee-text-inp" value="<?php echo $TKT_start_date; ?>" >
8 8
 			<input type="text" name="archived_ticket[TKT_start_date]" class="edit-ticket-TKT_start_date ee-text-inp" value="<?php echo $TKT_start_date; ?>" disabled>
9 9
 		<?php else : ?>
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 		<?php endif; ?>
12 12
 	</td>
13 13
 	<td>
14
-		<?php if ( $disabled ) : ?>
14
+		<?php if ($disabled) : ?>
15 15
 			<input type="hidden" id="edit-ticket-TKT_end_date-<?php echo $tkt_row; ?>"  name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_end_date]" class="edit-ticket-TKT_end_date ee-text-inp" value="<?php echo $TKT_end_date; ?>" >
16 16
 			<input type="text" name="archived_ticket[TKT_end_date]" class="edit-ticket-TKT_end_date ee-text-inp" value="<?php echo $TKT_end_date; ?>" disabled>
17 17
 		<?php else : ?>
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 		<?php endif; ?>
20 20
 	</td>
21 21
 	<td>
22
-		<?php if ( $disabled ) : ?>
22
+		<?php if ($disabled) : ?>
23 23
 			<input id="edit-ticket-TKT_base_price-<?php echo $tkt_row; ?>" type="hidden" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_base_price]" class="edit-ticket-TKT_base_price ee-small-text-inp edit-price-PRC_amount ee-numeric" value="<?php echo $TKT_base_price; ?>">
24 24
 			<input type="text" name="archived_ticket[<?php echo $tkt_row; ?>][TKT_base_price]" class="edit-ticket-TKT_base_price ee-small-text-inp edit-price-PRC_amount ee-numeric" value="<?php echo $TKT_base_price; ?>" disabled>
25 25
 		<?php else : ?>
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 		<input type="hidden" id="edit-ticket-TKT_base_price_ID-<?php echo $tkt_row; ?>" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_base_price_ID]" value="<?php echo $TKT_base_price_ID; ?>">
29 29
 	</td>
30 30
 	<td>
31
-		<?php if ( $disabled ) : ?>
31
+		<?php if ($disabled) : ?>
32 32
 			<input type="hidden" class="edit-ticket-TKT_qty ee-small-text-inp ee-numeric" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_qty]" value="<?php echo $TKT_qty_for_input; ?>">
33 33
 			<input type="text" class="edit-ticket-TKT_qty ee-small-text-inp ee-numeric" name="archived_ticket[<?php echo $tkt_row; ?>][TKT_qty]" value="<?php echo $TKT_qty_for_input; ?>" disabled>
34 34
 		<?php else : ?>
@@ -56,10 +56,10 @@  discard block
 block discarded – undo
56 56
 			<input type="hidden" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_ID]" class="edit-ticket-TKT_ID" value="<?php echo $TKT_ID; ?>">
57 57
 			<input type="hidden" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_row]" class="edit-ticket-TKT_row" value="<?php echo $tkt_row; ?>">
58 58
 
59
-			<!--<div class="total-price-container"><?php printf( esc_html__('Total Final Price: %s', 'event_espresso'), '<span class="ticket-price-amount">' . $TKT_price . '</span>'); ?> </div>-->
59
+			<!--<div class="total-price-container"><?php printf(esc_html__('Total Final Price: %s', 'event_espresso'), '<span class="ticket-price-amount">'.$TKT_price.'</span>'); ?> </div>-->
60 60
 			<textarea name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_description]" class="edit-ticket-TKT_description ee-full-textarea-inp" placeholder="Ticket Description"><?php echo $TKT_description; ?></textarea>
61 61
 
62
-			<?php do_action( 'AHEE__event_tickets_datetime_ticket_row_template_after_desc', $tkt_row, $TKT_ID ); ?>
62
+			<?php do_action('AHEE__event_tickets_datetime_ticket_row_template_after_desc', $tkt_row, $TKT_ID); ?>
63 63
 
64 64
 			<div class="basic-ticket-container">
65 65
 				<h4 class="tickets-heading"><?php esc_html_e('Ticket Details', 'event_espresso'); ?></h4>
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 					<tbody>
76 76
 						<tr>
77 77
 							<td>
78
-								<?php if ( $disabled ) : ?>
78
+								<?php if ($disabled) : ?>
79 79
 									<input type="hidden" class="edit-ticket-TKT_uses ee-small-text-inp ee-numeric" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_uses]" value="<?php echo $TKT_uses; ?>">
80 80
 									<input type="text" class="edit-ticket-TKT_uses ee-small-text-inp ee-numeric" name="archived_ticket[<?php echo $tkt_row; ?>][TKT_uses]" value="<?php echo $TKT_uses; ?>" disabled>
81 81
 								<?php else : ?>
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 								<?php endif; ?>
84 84
 							</td>
85 85
 							<td>
86
-								<?php if ( $disabled ) : ?>
86
+								<?php if ($disabled) : ?>
87 87
 									<input type="hidden" class="edit-ticket-TKT_min ee-small-text-inp ee-numeric" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_min]" value="<?php echo $TKT_min; ?>">
88 88
 									<input type="text" class="edit-ticket-TKT_min ee-small-text-inp ee-numeric" name="archived_ticket[<?php echo $tkt_row; ?>][TKT_min]" value="<?php echo $TKT_min; ?>" disabled>
89 89
 								<?php else: ?>
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 								<?php endif; ?>
92 92
 							</td>
93 93
 							<td>
94
-								<?php if ( $disabled ) : ?>
94
+								<?php if ($disabled) : ?>
95 95
 									<input type="hidden" class="edit-ticket-TKT_max ee-small-text-inp ee-numeric" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_max]" value="<?php echo $TKT_max; ?>">
96 96
 									<input type="text" class="edit-ticket-TKT_max ee-small-text-inp ee-numeric" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_max]" value="<?php echo $TKT_max; ?>" disabled>
97 97
 								<?php else : ?>
@@ -109,15 +109,15 @@  discard block
 block discarded – undo
109 109
 					<label for="edit-ticket-TKT_required"><?php esc_html_e('This ticket is required (will appear first in frontend ticket lists).', 'event_espresso'); ?></label>
110 110
 				</div>
111 111
 				<div class="ticket-is-taxable-container">
112
-					<?php if ( !empty($tax_rows) ) { ?>
113
-						<?php if ( $disabled ) : ?>
112
+					<?php if ( ! empty($tax_rows)) { ?>
113
+						<?php if ($disabled) : ?>
114 114
 							<?php
115
-								$tax_value = !empty( $TKT_taxable ) ? 1 : 0;
115
+								$tax_value = ! empty($TKT_taxable) ? 1 : 0;
116 116
 							?>
117
-							<input class="TKT-taxable-checkbox" type="hidden" name="<?php echo $edit_tickets_name;?>[<?php echo $tkt_row; ?>][TKT_taxable]" value="<?php echo $tax_value; ?>">
117
+							<input class="TKT-taxable-checkbox" type="hidden" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_taxable]" value="<?php echo $tax_value; ?>">
118 118
 							<input class="TKT-taxable-checkbox" id="edit-ticket-TKT_taxable-<?php echo $tkt_row; ?>" type="checkbox" name="archived_ticket[<?php echo $tkt_row; ?>][TKT_taxable]" value="1"<?php echo $TKT_taxable; ?> disabled>
119 119
 						<?php else : ?>
120
-							<input class="TKT-taxable-checkbox" id="edit-ticket-TKT_taxable-<?php echo $tkt_row; ?>" type="checkbox" name="<?php echo $edit_tickets_name;?>[<?php echo $tkt_row; ?>][TKT_taxable]" value="1"<?php echo $TKT_taxable; ?>>
120
+							<input class="TKT-taxable-checkbox" id="edit-ticket-TKT_taxable-<?php echo $tkt_row; ?>" type="checkbox" name="<?php echo $edit_tickets_name; ?>[<?php echo $tkt_row; ?>][TKT_taxable]" value="1"<?php echo $TKT_taxable; ?>>
121 121
 						<?php endif; ?>
122 122
 						<label for="edit-ticket-TKT_taxable-<?php echo $tkt_row; ?>"> <?php esc_html_e('This ticket is taxable.', 'event_espresso'); ?>
123 123
 					<?php } //end tax_rows check ?>
@@ -174,10 +174,10 @@  discard block
 block discarded – undo
174 174
 				<?php echo $ticket_datetimes_list; ?>
175 175
 			</ul>
176 176
 
177
-			<?php do_action( 'AHEE__event_tickets_datetime_ticket_row_template__advanced_details_end', $tkt_row, $TKT_ID ); ?>
177
+			<?php do_action('AHEE__event_tickets_datetime_ticket_row_template__advanced_details_end', $tkt_row, $TKT_ID); ?>
178 178
 			<div class="ee-editor-footer-container">
179 179
 				<div class="ee-editor-id-container">
180
-					<span class="ee-item-id"><?php echo $TKT_ID ? sprintf( esc_html__( 'Ticket ID: %d', 'event_espresso' ), $TKT_ID ) : ''; ?></span>
180
+					<span class="ee-item-id"><?php echo $TKT_ID ? sprintf(esc_html__('Ticket ID: %d', 'event_espresso'), $TKT_ID) : ''; ?></span>
181 181
 				</div>
182 182
 				<div class="save-cancel-button-container">
183 183
 					<label for="edit-ticket-TKT_is_default_selector"><?php esc_html_e('use this new ticket as a default ticket for any new events', 'event_espresso'); ?></label>
Please login to merge, or discard this patch.