Passed
Push — master ( 63ad62...113528 )
by Brian
05:30
created
templates/subscriptions/subscription-details.php 2 patches
Indentation   +52 added lines, -52 removed lines patch added patch discarded remove patch
@@ -46,64 +46,64 @@  discard block
 block discarded – undo
46 46
 				<td style="width: 65%">
47 47
 					<?php
48 48
 
49
-						switch ( $key ) {
49
+                        switch ( $key ) {
50 50
 
51
-							case 'status':
52
-								echo esc_html( $subscription->get_status_label() );
53
-								break;
51
+                            case 'status':
52
+                                echo esc_html( $subscription->get_status_label() );
53
+                                break;
54 54
 
55
-							case 'start_date':
56
-								echo esc_html( getpaid_format_date_value( $subscription->get_date_created() ) );
57
-								break;
55
+                            case 'start_date':
56
+                                echo esc_html( getpaid_format_date_value( $subscription->get_date_created() ) );
57
+                                break;
58 58
 
59
-							case 'expiry_date':
60
-								echo esc_html( getpaid_format_date_value( $subscription->get_next_renewal_date() ) );
61
-								break;
59
+                            case 'expiry_date':
60
+                                echo esc_html( getpaid_format_date_value( $subscription->get_next_renewal_date() ) );
61
+                                break;
62 62
 
63
-							case 'initial_amount':
64
-								echo wpinv_price( $subscription->get_initial_amount(), $subscription->get_parent_payment()->get_currency() );
63
+                            case 'initial_amount':
64
+                                echo wpinv_price( $subscription->get_initial_amount(), $subscription->get_parent_payment()->get_currency() );
65 65
 
66
-								if ( $subscription->has_trial_period() ) {
66
+                                if ( $subscription->has_trial_period() ) {
67 67
 
68
-									echo "<small class='text-muted'>&nbsp;";
69
-									printf(
70
-										_x( '( %1$s trial )', 'Subscription trial period. (e.g.: 1 month trial)', 'invoicing' ),
71
-										esc_html( $subscription->get_trial_period() )
72
-									);
73
-									echo '</small>';
68
+                                    echo "<small class='text-muted'>&nbsp;";
69
+                                    printf(
70
+                                        _x( '( %1$s trial )', 'Subscription trial period. (e.g.: 1 month trial)', 'invoicing' ),
71
+                                        esc_html( $subscription->get_trial_period() )
72
+                                    );
73
+                                    echo '</small>';
74 74
 
75
-								}
75
+                                }
76 76
 
77
-								break;
77
+                                break;
78 78
 
79
-							case 'recurring_amount':
80
-								$frequency = getpaid_get_subscription_period_label( $subscription->get_period(), $subscription->get_frequency(), '' );
81
-								$amount    = wpinv_price( $subscription->get_recurring_amount(), $subscription->get_parent_payment()->get_currency() );
82
-								echo strtolower( "<strong style='font-weight: 500;'>$amount</strong> / <span class='getpaid-item-recurring-period'>$frequency</span>" );
83
-								break;
79
+                            case 'recurring_amount':
80
+                                $frequency = getpaid_get_subscription_period_label( $subscription->get_period(), $subscription->get_frequency(), '' );
81
+                                $amount    = wpinv_price( $subscription->get_recurring_amount(), $subscription->get_parent_payment()->get_currency() );
82
+                                echo strtolower( "<strong style='font-weight: 500;'>$amount</strong> / <span class='getpaid-item-recurring-period'>$frequency</span>" );
83
+                                break;
84 84
 
85
-							case 'item':
85
+                            case 'item':
86 86
 
87
-								if ( empty( $subscription_group ) ) {
88
-									echo WPInv_Subscriptions_List_Table::generate_item_markup( $subscription->get_product_id() );
89
-								} else {
90
-									$markup = array_map( array( 'WPInv_Subscriptions_List_Table', 'generate_item_markup' ), array_keys( $subscription_group['items'] ) );
91
-									echo implode( ' | ', $markup );
92
-								}
87
+                                if ( empty( $subscription_group ) ) {
88
+                                    echo WPInv_Subscriptions_List_Table::generate_item_markup( $subscription->get_product_id() );
89
+                                } else {
90
+                                    $markup = array_map( array( 'WPInv_Subscriptions_List_Table', 'generate_item_markup' ), array_keys( $subscription_group['items'] ) );
91
+                                    echo implode( ' | ', $markup );
92
+                                }
93 93
 
94
-								break;
94
+                                break;
95 95
 
96
-							case 'payments':
96
+                            case 'payments':
97 97
 
98
-								$max_activations = (int) $subscription->get_bill_times();
99
-								echo (int) $subscription->get_times_billed() . ' / ' . ( empty( $max_activations ) ? "&infin;" : $max_activations );
98
+                                $max_activations = (int) $subscription->get_bill_times();
99
+                                echo (int) $subscription->get_times_billed() . ' / ' . ( empty( $max_activations ) ? "&infin;" : $max_activations );
100 100
 
101
-								break;
101
+                                break;
102 102
 
103
-						}
104
-						do_action( "getpaid_render_single_subscription_column_$key", $subscription );
103
+                        }
104
+                        do_action( "getpaid_render_single_subscription_column_$key", $subscription );
105 105
 
106
-					?>
106
+                    ?>
107 107
 				</td>
108 108
 
109 109
 			</tr>
@@ -130,17 +130,17 @@  discard block
 block discarded – undo
130 130
 <span class="form-text">
131 131
 
132 132
 	<?php
133
-		if ( $subscription->can_cancel() ) {
134
-			printf(
135
-				'<a href="%s" class="btn btn-danger btn-sm" onclick="return confirm(\'%s\')">%s</a>&nbsp;&nbsp;',
136
-				esc_url( $subscription->get_cancel_url() ),
137
-				esc_attr__( 'Are you sure you want to cancel this subscription?', 'invoicing' ),
138
-				__( 'Cancel Subscription', 'invoicing' )
139
-			);
140
-		}
141
-
142
-		do_action( 'getpaid-single-subscription-page-actions', $subscription );
143
-	?>
133
+        if ( $subscription->can_cancel() ) {
134
+            printf(
135
+                '<a href="%s" class="btn btn-danger btn-sm" onclick="return confirm(\'%s\')">%s</a>&nbsp;&nbsp;',
136
+                esc_url( $subscription->get_cancel_url() ),
137
+                esc_attr__( 'Are you sure you want to cancel this subscription?', 'invoicing' ),
138
+                __( 'Cancel Subscription', 'invoicing' )
139
+            );
140
+        }
141
+
142
+        do_action( 'getpaid-single-subscription-page-actions', $subscription );
143
+    ?>
144 144
 
145 145
 	<a href="<?php echo esc_url( getpaid_get_tab_url( 'gp-subscriptions', get_permalink( (int) wpinv_get_option( 'invoice_subscription_page' ) ) ) ); ?>" class="btn btn-secondary btn-sm"><?php _e( 'Go Back', 'invoicing' ); ?></a>
146 146
 </span>
Please login to merge, or discard this patch.
Spacing   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -9,17 +9,17 @@  discard block
 block discarded – undo
9 9
  * @var WPInv_Subscriptions_Widget $widget
10 10
  */
11 11
 
12
-defined( 'ABSPATH' ) || exit;
12
+defined('ABSPATH') || exit;
13 13
 
14
-do_action( 'getpaid_single_subscription_before_notices', $subscription );
14
+do_action('getpaid_single_subscription_before_notices', $subscription);
15 15
 
16 16
 // Display errors and notices.
17 17
 wpinv_print_errors();
18 18
 
19
-$subscription_groups = getpaid_get_invoice_subscription_groups( $subscription->get_parent_invoice_id() );
20
-$subscription_group  = getpaid_get_invoice_subscription_group( $subscription->get_parent_invoice_id(), $subscription->get_id() );
19
+$subscription_groups = getpaid_get_invoice_subscription_groups($subscription->get_parent_invoice_id());
20
+$subscription_group  = getpaid_get_invoice_subscription_group($subscription->get_parent_invoice_id(), $subscription->get_id());
21 21
 
22
-do_action( 'getpaid_before_single_subscription', $subscription, $subscription_groups );
22
+do_action('getpaid_before_single_subscription', $subscription, $subscription_groups);
23 23
 
24 24
 ?>
25 25
 
@@ -31,44 +31,44 @@  discard block
 block discarded – undo
31 31
 
32 32
 </style>
33 33
 
34
-<h2 class="mb-1 h4"><?php _e( 'Subscription Details', 'invoicing' ); ?></h2>
34
+<h2 class="mb-1 h4"><?php _e('Subscription Details', 'invoicing'); ?></h2>
35 35
 <table class="table table-bordered">
36 36
 	<tbody>
37 37
 
38
-		<?php foreach ( $widget->get_single_subscription_columns( $subscription ) as $key => $label ) : ?>
38
+		<?php foreach ($widget->get_single_subscription_columns($subscription) as $key => $label) : ?>
39 39
 
40
-			<tr class="getpaid-subscription-meta-<?php echo sanitize_html_class( $key ); ?>">
40
+			<tr class="getpaid-subscription-meta-<?php echo sanitize_html_class($key); ?>">
41 41
 
42 42
 				<th class="font-weight-bold" style="width: 35%">
43
-					<?php echo esc_html( $label ); ?>
43
+					<?php echo esc_html($label); ?>
44 44
 				</th>
45 45
 
46 46
 				<td style="width: 65%">
47 47
 					<?php
48 48
 
49
-						switch ( $key ) {
49
+						switch ($key) {
50 50
 
51 51
 							case 'status':
52
-								echo esc_html( $subscription->get_status_label() );
52
+								echo esc_html($subscription->get_status_label());
53 53
 								break;
54 54
 
55 55
 							case 'start_date':
56
-								echo esc_html( getpaid_format_date_value( $subscription->get_date_created() ) );
56
+								echo esc_html(getpaid_format_date_value($subscription->get_date_created()));
57 57
 								break;
58 58
 
59 59
 							case 'expiry_date':
60
-								echo esc_html( getpaid_format_date_value( $subscription->get_next_renewal_date() ) );
60
+								echo esc_html(getpaid_format_date_value($subscription->get_next_renewal_date()));
61 61
 								break;
62 62
 
63 63
 							case 'initial_amount':
64
-								echo wpinv_price( $subscription->get_initial_amount(), $subscription->get_parent_payment()->get_currency() );
64
+								echo wpinv_price($subscription->get_initial_amount(), $subscription->get_parent_payment()->get_currency());
65 65
 
66
-								if ( $subscription->has_trial_period() ) {
66
+								if ($subscription->has_trial_period()) {
67 67
 
68 68
 									echo "<small class='text-muted'>&nbsp;";
69 69
 									printf(
70
-										_x( '( %1$s trial )', 'Subscription trial period. (e.g.: 1 month trial)', 'invoicing' ),
71
-										esc_html( $subscription->get_trial_period() )
70
+										_x('( %1$s trial )', 'Subscription trial period. (e.g.: 1 month trial)', 'invoicing'),
71
+										esc_html($subscription->get_trial_period())
72 72
 									);
73 73
 									echo '</small>';
74 74
 
@@ -77,18 +77,18 @@  discard block
 block discarded – undo
77 77
 								break;
78 78
 
79 79
 							case 'recurring_amount':
80
-								$frequency = getpaid_get_subscription_period_label( $subscription->get_period(), $subscription->get_frequency(), '' );
81
-								$amount    = wpinv_price( $subscription->get_recurring_amount(), $subscription->get_parent_payment()->get_currency() );
82
-								echo strtolower( "<strong style='font-weight: 500;'>$amount</strong> / <span class='getpaid-item-recurring-period'>$frequency</span>" );
80
+								$frequency = getpaid_get_subscription_period_label($subscription->get_period(), $subscription->get_frequency(), '');
81
+								$amount    = wpinv_price($subscription->get_recurring_amount(), $subscription->get_parent_payment()->get_currency());
82
+								echo strtolower("<strong style='font-weight: 500;'>$amount</strong> / <span class='getpaid-item-recurring-period'>$frequency</span>");
83 83
 								break;
84 84
 
85 85
 							case 'item':
86 86
 
87
-								if ( empty( $subscription_group ) ) {
88
-									echo WPInv_Subscriptions_List_Table::generate_item_markup( $subscription->get_product_id() );
87
+								if (empty($subscription_group)) {
88
+									echo WPInv_Subscriptions_List_Table::generate_item_markup($subscription->get_product_id());
89 89
 								} else {
90
-									$markup = array_map( array( 'WPInv_Subscriptions_List_Table', 'generate_item_markup' ), array_keys( $subscription_group['items'] ) );
91
-									echo implode( ' | ', $markup );
90
+									$markup = array_map(array('WPInv_Subscriptions_List_Table', 'generate_item_markup'), array_keys($subscription_group['items']));
91
+									echo implode(' | ', $markup);
92 92
 								}
93 93
 
94 94
 								break;
@@ -96,12 +96,12 @@  discard block
 block discarded – undo
96 96
 							case 'payments':
97 97
 
98 98
 								$max_activations = (int) $subscription->get_bill_times();
99
-								echo (int) $subscription->get_times_billed() . ' / ' . ( empty( $max_activations ) ? "&infin;" : $max_activations );
99
+								echo (int) $subscription->get_times_billed() . ' / ' . (empty($max_activations) ? "&infin;" : $max_activations);
100 100
 
101 101
 								break;
102 102
 
103 103
 						}
104
-						do_action( "getpaid_render_single_subscription_column_$key", $subscription );
104
+						do_action("getpaid_render_single_subscription_column_$key", $subscription);
105 105
 
106 106
 					?>
107 107
 				</td>
@@ -113,34 +113,34 @@  discard block
 block discarded – undo
113 113
 	</tbody>
114 114
 </table>
115 115
 
116
-<?php if ( ! empty( $subscription_group ) ) : ?>
117
-	<h2 class='mt-5 mb-1 h4'><?php _e( 'Subscription Items', 'invoicing' ); ?></h2>
118
-	<?php getpaid_admin_subscription_item_details_metabox( $subscription ); ?>
116
+<?php if (!empty($subscription_group)) : ?>
117
+	<h2 class='mt-5 mb-1 h4'><?php _e('Subscription Items', 'invoicing'); ?></h2>
118
+	<?php getpaid_admin_subscription_item_details_metabox($subscription); ?>
119 119
 <?php endif; ?>
120 120
 
121
-<h2 class='mt-5 mb-1 h4'><?php _e( 'Related Invoices', 'invoicing' ); ?></h2>
121
+<h2 class='mt-5 mb-1 h4'><?php _e('Related Invoices', 'invoicing'); ?></h2>
122 122
 
123
-<?php echo getpaid_admin_subscription_invoice_details_metabox( $subscription ); ?>
123
+<?php echo getpaid_admin_subscription_invoice_details_metabox($subscription); ?>
124 124
 
125
-<?php if ( 1 < count( $subscription_groups ) ) : ?>
126
-	<h2 class='mt-5 mb-1 h4'><?php _e( 'Related Subscriptions', 'invoicing' ); ?></h2>
127
-	<?php getpaid_admin_subscription_related_subscriptions_metabox( $subscription ); ?>
125
+<?php if (1 < count($subscription_groups)) : ?>
126
+	<h2 class='mt-5 mb-1 h4'><?php _e('Related Subscriptions', 'invoicing'); ?></h2>
127
+	<?php getpaid_admin_subscription_related_subscriptions_metabox($subscription); ?>
128 128
 <?php endif; ?>
129 129
 
130 130
 <span class="form-text">
131 131
 
132 132
 	<?php
133
-		if ( $subscription->can_cancel() ) {
133
+		if ($subscription->can_cancel()) {
134 134
 			printf(
135 135
 				'<a href="%s" class="btn btn-danger btn-sm" onclick="return confirm(\'%s\')">%s</a>&nbsp;&nbsp;',
136
-				esc_url( $subscription->get_cancel_url() ),
137
-				esc_attr__( 'Are you sure you want to cancel this subscription?', 'invoicing' ),
138
-				__( 'Cancel Subscription', 'invoicing' )
136
+				esc_url($subscription->get_cancel_url()),
137
+				esc_attr__('Are you sure you want to cancel this subscription?', 'invoicing'),
138
+				__('Cancel Subscription', 'invoicing')
139 139
 			);
140 140
 		}
141 141
 
142
-		do_action( 'getpaid-single-subscription-page-actions', $subscription );
142
+		do_action('getpaid-single-subscription-page-actions', $subscription);
143 143
 	?>
144 144
 
145
-	<a href="<?php echo esc_url( getpaid_get_tab_url( 'gp-subscriptions', get_permalink( (int) wpinv_get_option( 'invoice_subscription_page' ) ) ) ); ?>" class="btn btn-secondary btn-sm"><?php _e( 'Go Back', 'invoicing' ); ?></a>
145
+	<a href="<?php echo esc_url(getpaid_get_tab_url('gp-subscriptions', get_permalink((int) wpinv_get_option('invoice_subscription_page')))); ?>" class="btn btn-secondary btn-sm"><?php _e('Go Back', 'invoicing'); ?></a>
146 146
 </span>
Please login to merge, or discard this patch.
templates/subscriptions/subscriptions-table-row.php 2 patches
Indentation   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -13,42 +13,42 @@
 block discarded – undo
13 13
 
14 14
 foreach ( array_keys( $widget->get_subscriptions_table_columns() ) as $column ) :
15 15
 
16
-	$class = sanitize_html_class( $column );
17
-	echo "<td class='getpaid-subscriptions-table-column-$class'>";
16
+    $class = sanitize_html_class( $column );
17
+    echo "<td class='getpaid-subscriptions-table-column-$class'>";
18 18
 
19
-		do_action( "getpaid_subscriptions_before_frontend_subscription_table_$column", $subscription );
19
+        do_action( "getpaid_subscriptions_before_frontend_subscription_table_$column", $subscription );
20 20
 
21
-		switch( $column ) :
21
+        switch( $column ) :
22 22
 
23
-			case 'subscription':
24
-				$subscription_id = (int) $subscription->get_id();
25
-				$url             = esc_url( $subscription->get_view_url() );
26
-				$id_label        = sprintf(
27
-					esc_attr_x( '#%s', 'subscription id', 'invoicing' ),
28
-					$subscription->get_id()
29
-				);
30
-				echo $widget->add_row_actions( "<a href='$url' class='font-weight-bold text-decoration-none'>$id_label</a>", $subscription );
31
-				break;
23
+            case 'subscription':
24
+                $subscription_id = (int) $subscription->get_id();
25
+                $url             = esc_url( $subscription->get_view_url() );
26
+                $id_label        = sprintf(
27
+                    esc_attr_x( '#%s', 'subscription id', 'invoicing' ),
28
+                    $subscription->get_id()
29
+                );
30
+                echo $widget->add_row_actions( "<a href='$url' class='font-weight-bold text-decoration-none'>$id_label</a>", $subscription );
31
+                break;
32 32
 
33
-			case 'status':
34
-				echo esc_html( $subscription->get_status_label() );
35
-				break;
33
+            case 'status':
34
+                echo esc_html( $subscription->get_status_label() );
35
+                break;
36 36
 
37
-			case 'renewal-date':
38
-				$renewal = getpaid_format_date_value( $subscription->get_next_renewal_date() );
39
-				echo $subscription->is_active() ? esc_html( $renewal ) : "&mdash;";
40
-				break;
37
+            case 'renewal-date':
38
+                $renewal = getpaid_format_date_value( $subscription->get_next_renewal_date() );
39
+                echo $subscription->is_active() ? esc_html( $renewal ) : "&mdash;";
40
+                break;
41 41
 
42
-			case 'amount':
43
-				$frequency = getpaid_get_subscription_period_label( $subscription->get_period(), $subscription->get_frequency(), '' );
44
-				$amount    = wpinv_price( $subscription->get_recurring_amount(), $subscription->get_parent_payment()->get_currency() );
45
-				echo wp_kses_post( "<span>$amount</span> / <span class='getpaid-item-recurring-period'>$frequency</span>" );
46
-				break;
42
+            case 'amount':
43
+                $frequency = getpaid_get_subscription_period_label( $subscription->get_period(), $subscription->get_frequency(), '' );
44
+                $amount    = wpinv_price( $subscription->get_recurring_amount(), $subscription->get_parent_payment()->get_currency() );
45
+                echo wp_kses_post( "<span>$amount</span> / <span class='getpaid-item-recurring-period'>$frequency</span>" );
46
+                break;
47 47
 
48
-		endswitch;
48
+        endswitch;
49 49
 
50
-		do_action( "getpaid_subscriptions_frontend_subscription_table_$column", $subscription );
50
+        do_action( "getpaid_subscriptions_frontend_subscription_table_$column", $subscription );
51 51
 
52
-	echo '</td>';
52
+    echo '</td>';
53 53
 
54 54
 endforeach;
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -9,45 +9,45 @@
 block discarded – undo
9 9
  * @var WPInv_Subscriptions_Widget $widget
10 10
  */
11 11
 
12
-defined( 'ABSPATH' ) || exit;
12
+defined('ABSPATH') || exit;
13 13
 
14
-foreach ( array_keys( $widget->get_subscriptions_table_columns() ) as $column ) :
14
+foreach (array_keys($widget->get_subscriptions_table_columns()) as $column) :
15 15
 
16
-	$class = sanitize_html_class( $column );
16
+	$class = sanitize_html_class($column);
17 17
 	echo "<td class='getpaid-subscriptions-table-column-$class'>";
18 18
 
19
-		do_action( "getpaid_subscriptions_before_frontend_subscription_table_$column", $subscription );
19
+		do_action("getpaid_subscriptions_before_frontend_subscription_table_$column", $subscription);
20 20
 
21
-		switch( $column ) :
21
+		switch ($column) :
22 22
 
23 23
 			case 'subscription':
24 24
 				$subscription_id = (int) $subscription->get_id();
25
-				$url             = esc_url( $subscription->get_view_url() );
25
+				$url             = esc_url($subscription->get_view_url());
26 26
 				$id_label        = sprintf(
27
-					esc_attr_x( '#%s', 'subscription id', 'invoicing' ),
27
+					esc_attr_x('#%s', 'subscription id', 'invoicing'),
28 28
 					$subscription->get_id()
29 29
 				);
30
-				echo $widget->add_row_actions( "<a href='$url' class='font-weight-bold text-decoration-none'>$id_label</a>", $subscription );
30
+				echo $widget->add_row_actions("<a href='$url' class='font-weight-bold text-decoration-none'>$id_label</a>", $subscription);
31 31
 				break;
32 32
 
33 33
 			case 'status':
34
-				echo esc_html( $subscription->get_status_label() );
34
+				echo esc_html($subscription->get_status_label());
35 35
 				break;
36 36
 
37 37
 			case 'renewal-date':
38
-				$renewal = getpaid_format_date_value( $subscription->get_next_renewal_date() );
39
-				echo $subscription->is_active() ? esc_html( $renewal ) : "&mdash;";
38
+				$renewal = getpaid_format_date_value($subscription->get_next_renewal_date());
39
+				echo $subscription->is_active() ? esc_html($renewal) : "&mdash;";
40 40
 				break;
41 41
 
42 42
 			case 'amount':
43
-				$frequency = getpaid_get_subscription_period_label( $subscription->get_period(), $subscription->get_frequency(), '' );
44
-				$amount    = wpinv_price( $subscription->get_recurring_amount(), $subscription->get_parent_payment()->get_currency() );
45
-				echo wp_kses_post( "<span>$amount</span> / <span class='getpaid-item-recurring-period'>$frequency</span>" );
43
+				$frequency = getpaid_get_subscription_period_label($subscription->get_period(), $subscription->get_frequency(), '');
44
+				$amount    = wpinv_price($subscription->get_recurring_amount(), $subscription->get_parent_payment()->get_currency());
45
+				echo wp_kses_post("<span>$amount</span> / <span class='getpaid-item-recurring-period'>$frequency</span>");
46 46
 				break;
47 47
 
48 48
 		endswitch;
49 49
 
50
-		do_action( "getpaid_subscriptions_frontend_subscription_table_$column", $subscription );
50
+		do_action("getpaid_subscriptions_frontend_subscription_table_$column", $subscription);
51 51
 
52 52
 	echo '</td>';
53 53
 
Please login to merge, or discard this patch.
templates/invoice/company-address.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -7,17 +7,17 @@  discard block
 block discarded – undo
7 7
  * @version 1.0.19
8 8
  */
9 9
 
10
-defined( 'ABSPATH' ) || exit;
10
+defined('ABSPATH') || exit;
11 11
 
12 12
 // Prepare the company name.
13
-$company_name = wpinv_get_option( 'vat_company_name' );
13
+$company_name = wpinv_get_option('vat_company_name');
14 14
 
15
-if ( empty( $company_name ) ) {
15
+if (empty($company_name)) {
16 16
     $company_name = wpinv_get_business_name();
17 17
 }
18 18
 
19 19
 // Prepare the VAT number.
20
-$vat_number = wpinv_get_option( 'vat_number' );
20
+$vat_number = wpinv_get_option('vat_number');
21 21
 
22 22
 ?>
23 23
     <div class="getpaid-company-address form-group">
@@ -25,36 +25,36 @@  discard block
 block discarded – undo
25 25
         <div class="row">
26 26
 
27 27
             <div class="invoice-company-address-label col-2">
28
-                <strong><?php _e( 'From:', 'invoicing' ) ?></strong>
28
+                <strong><?php _e('From:', 'invoicing') ?></strong>
29 29
             </div>
30 30
 
31 31
             <div class="invoice-company-address-value col-10">
32 32
 
33
-                <?php do_action( 'getpaid_company_address_top' ); ?>
33
+                <?php do_action('getpaid_company_address_top'); ?>
34 34
 
35 35
                 <div class="name">
36
-                    <a target="_blank" class="text-dark" href="<?php echo esc_url( wpinv_get_business_website() ); ?>">
37
-                        <?php echo esc_html( $company_name ); ?>
36
+                    <a target="_blank" class="text-dark" href="<?php echo esc_url(wpinv_get_business_website()); ?>">
37
+                        <?php echo esc_html($company_name); ?>
38 38
                     </a>
39 39
                 </div>
40 40
 
41
-                <?php if ( $address = wpinv_get_business_address() ) { ?>
42
-                    <?php echo $address;?>
41
+                <?php if ($address = wpinv_get_business_address()) { ?>
42
+                    <?php echo $address; ?>
43 43
                 <?php } ?>
44 44
 
45
-                <?php if ( $email_from = wpinv_mail_get_from_address() ) { ?>
45
+                <?php if ($email_from = wpinv_mail_get_from_address()) { ?>
46 46
                     <div class="email_from">
47
-                        <?php echo wp_sprintf( __( 'Email: %s', 'invoicing' ), $email_from );?>
47
+                        <?php echo wp_sprintf(__('Email: %s', 'invoicing'), $email_from); ?>
48 48
                     </div>
49 49
                 <?php } ?>
50 50
 
51
-                <?php if ( ! empty( $vat_number ) ) { ?>
51
+                <?php if (!empty($vat_number)) { ?>
52 52
                     <div class="email_from">
53
-                        <?php echo wp_sprintf( __( 'VAT Number: %s', 'invoicing' ), esc_html( $vat_number ) );?>
53
+                        <?php echo wp_sprintf(__('VAT Number: %s', 'invoicing'), esc_html($vat_number)); ?>
54 54
                     </div>
55 55
                 <?php } ?>
56 56
 
57
-                <?php do_action( 'getpaid_company_address_bottom' ); ?>
57
+                <?php do_action('getpaid_company_address_bottom'); ?>
58 58
 
59 59
             </div>
60 60
 
Please login to merge, or discard this patch.
templates/invoice/line-item.php 1 patch
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -10,55 +10,55 @@  discard block
 block discarded – undo
10 10
  * @var array $columns
11 11
  */
12 12
 
13
-defined( 'ABSPATH' ) || exit;
13
+defined('ABSPATH') || exit;
14 14
 
15
-do_action( 'getpaid_before_invoice_line_item', $invoice, $item );
15
+do_action('getpaid_before_invoice_line_item', $invoice, $item);
16 16
 
17 17
 ?>
18 18
 
19
-<div class='getpaid-invoice-item item-<?php echo (int) $item->get_id(); ?> item-type-<?php echo sanitize_html_class( $item->get_type() ); ?> border-bottom'>
19
+<div class='getpaid-invoice-item item-<?php echo (int) $item->get_id(); ?> item-type-<?php echo sanitize_html_class($item->get_type()); ?> border-bottom'>
20 20
 
21 21
     <div class="form-row">
22 22
 
23
-        <?php foreach ( array_keys( $columns ) as $column ): ?>
23
+        <?php foreach (array_keys($columns) as $column): ?>
24 24
 
25
-            <div class="<?php echo 'name' == $column ? 'col-12 col-sm-6' : 'col-12 col-sm' ?> getpaid-invoice-item-<?php echo sanitize_html_class( $column ); ?>">
25
+            <div class="<?php echo 'name' == $column ? 'col-12 col-sm-6' : 'col-12 col-sm' ?> getpaid-invoice-item-<?php echo sanitize_html_class($column); ?>">
26 26
 
27 27
                 <?php
28 28
 
29 29
                     // Fires before printing a line item column.
30
-                    do_action( "getpaid_invoice_line_item_before_$column", $item, $invoice );
30
+                    do_action("getpaid_invoice_line_item_before_$column", $item, $invoice);
31 31
 
32 32
                     // Item name.
33
-                    if ( 'name' == $column ) {
33
+                    if ('name' == $column) {
34 34
 
35 35
                         // Display the name.
36
-                        echo '<div class="mb-1">' . esc_html( $item->get_name() ) . '</div>';
36
+                        echo '<div class="mb-1">' . esc_html($item->get_name()) . '</div>';
37 37
 
38 38
                         // And an optional description.
39 39
                         $description = $item->get_description();
40 40
 
41
-                        if ( ! empty( $description ) ) {
42
-                            $description = wp_kses_post( $description );
41
+                        if (!empty($description)) {
42
+                            $description = wp_kses_post($description);
43 43
                             echo "<small class='form-text text-muted pr-2 m-0'>$description</small>";
44 44
                         }
45 45
 
46 46
                         // Fires before printing the line item actions.
47
-                        do_action( "getpaid_before_invoice_line_item_actions", $item, $invoice );
47
+                        do_action("getpaid_before_invoice_line_item_actions", $item, $invoice);
48 48
 
49
-                        $actions = apply_filters( 'getpaid-invoice-page-line-item-actions', array(), $item, $invoice );
49
+                        $actions = apply_filters('getpaid-invoice-page-line-item-actions', array(), $item, $invoice);
50 50
 
51
-                        if ( ! empty( $actions ) ) {
51
+                        if (!empty($actions)) {
52 52
 
53
-                            $sanitized  = array();
54
-                            foreach ( $actions as $key => $action ) {
55
-                                $key         = sanitize_html_class( $key );
56
-                                $action      = wp_kses_post( $action );
53
+                            $sanitized = array();
54
+                            foreach ($actions as $key => $action) {
55
+                                $key         = sanitize_html_class($key);
56
+                                $action      = wp_kses_post($action);
57 57
                                 $sanitized[] = "<span class='$key'>$action</span>";
58 58
                             }
59 59
 
60 60
                             echo "<small class='form-text getpaid-line-item-actions'>";
61
-                            echo implode( ' | ', $sanitized );
61
+                            echo implode(' | ', $sanitized);
62 62
                             echo '</small>';
63 63
 
64 64
                         }
@@ -66,35 +66,35 @@  discard block
 block discarded – undo
66 66
                     }
67 67
 
68 68
                     // Item price.
69
-                    if ( 'price' == $column ) {
69
+                    if ('price' == $column) {
70 70
 
71 71
                         // Display the item price (or recurring price if this is a renewal invoice)
72 72
                         $price = $invoice->is_renewal() ? $item->get_price() : $item->get_initial_price();
73
-                        echo wpinv_price( $price, $invoice->get_currency() );
73
+                        echo wpinv_price($price, $invoice->get_currency());
74 74
 
75 75
                     }
76 76
 
77 77
                     // Tax rate.
78
-                    if ( 'tax_rate' == $column ) {
79
-                        echo round( getpaid_get_invoice_tax_rate( $invoice, $item ), 2 ) . '%';
78
+                    if ('tax_rate' == $column) {
79
+                        echo round(getpaid_get_invoice_tax_rate($invoice, $item), 2) . '%';
80 80
                     }
81 81
 
82 82
                     // Item quantity.
83
-                    if ( 'quantity' == $column ) {
83
+                    if ('quantity' == $column) {
84 84
                         echo (float) $item->get_quantity();
85 85
                     }
86 86
 
87 87
                     // Item sub total.
88
-                    if ( 'subtotal' == $column ) {
88
+                    if ('subtotal' == $column) {
89 89
                         $subtotal = $invoice->is_renewal() ? $item->get_recurring_sub_total() : $item->get_sub_total();
90
-                        echo wpinv_price( $subtotal, $invoice->get_currency() );
90
+                        echo wpinv_price($subtotal, $invoice->get_currency());
91 91
                     }
92 92
 
93 93
                     // Fires when printing a line item column.
94
-                    do_action( "getpaid_invoice_line_item_$column", $item, $invoice );
94
+                    do_action("getpaid_invoice_line_item_$column", $item, $invoice);
95 95
 
96 96
                     // Fires after printing a line item column.
97
-                    do_action( "getpaid_invoice_line_item_after_$column", $item, $invoice );
97
+                    do_action("getpaid_invoice_line_item_after_$column", $item, $invoice);
98 98
 
99 99
                 ?>
100 100
 
Please login to merge, or discard this patch.
templates/invoice/billing-address.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -7,10 +7,10 @@  discard block
 block discarded – undo
7 7
  * @version 1.0.19
8 8
  */
9 9
 
10
-defined( 'ABSPATH' ) || exit;
10
+defined('ABSPATH') || exit;
11 11
 
12
-$invoice     = new WPInv_Invoice( $invoice );
13
-$address_row = wpinv_get_invoice_address_markup( $invoice->get_user_info() );
12
+$invoice     = new WPInv_Invoice($invoice);
13
+$address_row = wpinv_get_invoice_address_markup($invoice->get_user_info());
14 14
 $phone       = $invoice->get_phone();
15 15
 $email       = $invoice->get_email();
16 16
 $vat_number  = $invoice->get_vat_number();
@@ -22,47 +22,47 @@  discard block
 block discarded – undo
22 22
 
23 23
 
24 24
             <div class="invoice-billing-address-label col-2">
25
-                <strong><?php _e( 'To:', 'invoicing' ) ?></strong>
25
+                <strong><?php _e('To:', 'invoicing') ?></strong>
26 26
             </div>
27 27
 
28 28
 
29 29
             <div class="invoice-billing-address-value col-10">
30 30
 
31
-                <?php do_action( 'getpaid_billing_address_top' ); ?>
31
+                <?php do_action('getpaid_billing_address_top'); ?>
32 32
 
33
-                <?php if ( ! empty( $address_row ) ) : ?>
33
+                <?php if (!empty($address_row)) : ?>
34 34
                     <div class="billing-address">
35 35
                         <?php echo $address_row; ?>
36 36
                     </div>
37 37
                 <?php endif; ?>
38 38
 
39 39
 
40
-                <?php if ( ! empty( $phone ) ) : ?>
40
+                <?php if (!empty($phone)) : ?>
41 41
                     <div class="billing-phone">
42
-                        <?php echo wp_sprintf( __( 'Phone: %s', 'invoicing' ), esc_html( $phone ) ); ?>
42
+                        <?php echo wp_sprintf(__('Phone: %s', 'invoicing'), esc_html($phone)); ?>
43 43
                     </div>
44 44
                 <?php endif; ?>
45 45
 
46 46
 
47
-                <?php if ( ! empty( $email ) ) : ?>
47
+                <?php if (!empty($email)) : ?>
48 48
                     <div class="billing-email">
49
-                        <?php echo wp_sprintf( __( 'Email: %s', 'invoicing' ), sanitize_email( $email ) ); ?>
49
+                        <?php echo wp_sprintf(__('Email: %s', 'invoicing'), sanitize_email($email)); ?>
50 50
                     </div>
51 51
                 <?php endif; ?>
52 52
 
53
-                <?php if ( ! empty( $vat_number ) ) : ?>
53
+                <?php if (!empty($vat_number)) : ?>
54 54
                     <div class="vat-number">
55
-                        <?php echo wp_sprintf( __( 'Vat Number: %s', 'invoicing' ), esc_html( $vat_number ) ); ?>
55
+                        <?php echo wp_sprintf(__('Vat Number: %s', 'invoicing'), esc_html($vat_number)); ?>
56 56
                     </div>
57 57
                 <?php endif; ?>
58 58
 
59
-                <?php if ( ! empty( $company_id ) ) : ?>
59
+                <?php if (!empty($company_id)) : ?>
60 60
                     <div class="company-id">
61
-                        <?php echo wp_sprintf( __( 'Company ID: %s', 'invoicing' ), esc_html( $company_id ) ); ?>
61
+                        <?php echo wp_sprintf(__('Company ID: %s', 'invoicing'), esc_html($company_id)); ?>
62 62
                     </div>
63 63
                 <?php endif; ?>
64 64
 
65
-                <?php do_action( 'getpaid_billing_address_bottom' ); ?>
65
+                <?php do_action('getpaid_billing_address_bottom'); ?>
66 66
 
67 67
             </div>
68 68
 
Please login to merge, or discard this patch.
templates/invoice/line-items.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -8,21 +8,21 @@  discard block
 block discarded – undo
8 8
  * @var WPInv_Invoice $invoice
9 9
  */
10 10
 
11
-defined( 'ABSPATH' ) || exit;
11
+defined('ABSPATH') || exit;
12 12
 
13 13
 ?>
14 14
 
15
-<?php do_action( 'getpaid_invoice_before_line_items', $invoice ); ?>
15
+<?php do_action('getpaid_invoice_before_line_items', $invoice); ?>
16 16
 
17
-    <h2 class="mt-5 mb-1 h4"><?php echo sprintf( esc_html__( '%s Items', 'invoicing' ), ucfirst( $invoice->get_invoice_quote_type() )); ?></h2>
17
+    <h2 class="mt-5 mb-1 h4"><?php echo sprintf(esc_html__('%s Items', 'invoicing'), ucfirst($invoice->get_invoice_quote_type())); ?></h2>
18 18
     <div class="getpaid-invoice-items mb-4 border">
19 19
 
20 20
 
21
-        <div class="getpaid-invoice-items-header <?php echo sanitize_html_class( $invoice->get_template() ); ?>">
21
+        <div class="getpaid-invoice-items-header <?php echo sanitize_html_class($invoice->get_template()); ?>">
22 22
             <div class="form-row">
23
-                <?php foreach ( $columns as $key => $label ) : ?>
24
-                    <div class="<?php echo 'name' == $key ? 'col-12 col-sm-6' : 'col-12 col-sm' ?> getpaid-invoice-line-item-col-<?php echo esc_attr( $key ); ?>">
25
-                        <?php echo esc_html( $label ); ?>
23
+                <?php foreach ($columns as $key => $label) : ?>
24
+                    <div class="<?php echo 'name' == $key ? 'col-12 col-sm-6' : 'col-12 col-sm' ?> getpaid-invoice-line-item-col-<?php echo esc_attr($key); ?>">
25
+                        <?php echo esc_html($label); ?>
26 26
                     </div>
27 27
                 <?php endforeach; ?>
28 28
             </div>
@@ -32,20 +32,20 @@  discard block
 block discarded – undo
32 32
         <?php
33 33
 
34 34
             // Display the item totals.
35
-            foreach ( $invoice->get_items() as $item ) {
36
-                wpinv_get_template( 'invoice/line-item.php', compact( 'invoice', 'item', 'columns' ) );
35
+            foreach ($invoice->get_items() as $item) {
36
+                wpinv_get_template('invoice/line-item.php', compact('invoice', 'item', 'columns'));
37 37
             }
38 38
 
39 39
             // Display the fee totals.
40
-            foreach ( $invoice->get_fees() as $fee ) {
41
-                wpinv_get_template( 'invoice/fee-item.php', compact( 'invoice', 'fee', 'columns' ) );
40
+            foreach ($invoice->get_fees() as $fee) {
41
+                wpinv_get_template('invoice/fee-item.php', compact('invoice', 'fee', 'columns'));
42 42
             }
43 43
 
44 44
             // Display the cart totals.
45
-            wpinv_get_template( 'invoice/line-totals.php', compact( 'invoice' ) );
45
+            wpinv_get_template('invoice/line-totals.php', compact('invoice'));
46 46
 
47 47
         ?>
48 48
 
49 49
     </div>
50 50
 
51
-<?php do_action( 'getpaid_invoice_after_line_items', $invoice ); ?>
51
+<?php do_action('getpaid_invoice_after_line_items', $invoice); ?>
Please login to merge, or discard this patch.
templates/invoice/invoice-meta.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -7,50 +7,50 @@
 block discarded – undo
7 7
  * @version 1.0.19
8 8
  */
9 9
 
10
-defined( 'ABSPATH' ) || exit;
10
+defined('ABSPATH') || exit;
11 11
 
12
-$class = ! is_singular( 'page' ) ? 'px-1' : '';
12
+$class = !is_singular('page') ? 'px-1' : '';
13 13
 ?>
14 14
 
15
-        <?php do_action( 'getpaid_before_invoice_meta', $invoice ); ?>
15
+        <?php do_action('getpaid_before_invoice_meta', $invoice); ?>
16 16
         <div class="getpaid-invoice-meta-data">
17 17
 
18
-            <?php do_action( 'getpaid_before_invoice_meta_table', $invoice ); ?>
18
+            <?php do_action('getpaid_before_invoice_meta_table', $invoice); ?>
19 19
             <table class="table table-bordered">
20 20
                 <tbody>
21 21
 
22
-                    <?php do_action( "getpaid_before_invoice_meta_rows", $invoice ); ?>
23
-                    <?php foreach ( $meta as $key => $data ) : ?>
22
+                    <?php do_action("getpaid_before_invoice_meta_rows", $invoice); ?>
23
+                    <?php foreach ($meta as $key => $data) : ?>
24 24
 
25
-                        <?php if ( ! empty( $data['value'] ) ) : ?>
25
+                        <?php if (!empty($data['value'])) : ?>
26 26
 
27
-                            <?php do_action( "getpaid_before_invoice_meta_$key", $invoice, $data ); ?>
27
+                            <?php do_action("getpaid_before_invoice_meta_$key", $invoice, $data); ?>
28 28
 
29
-                            <tr class="getpaid-invoice-meta-<?php echo sanitize_html_class( $key ); ?>">
29
+                            <tr class="getpaid-invoice-meta-<?php echo sanitize_html_class($key); ?>">
30 30
 
31 31
                                 <th class="<?php echo $class; ?> font-weight-bold" style="width: 40%">
32
-                                    <?php echo esc_html( $data['label'] ); ?>
32
+                                    <?php echo esc_html($data['label']); ?>
33 33
                                 </th>
34 34
 
35 35
                                 <td class="<?php echo $class; ?> <?php echo $key == 'invoice_total' ? 'font-weight-bold' : 'font-weight-normal'; ?> text-break" style="width: 60%">
36
-                                    <span class="getpaid-invoice-meta-<?php echo sanitize_html_class( $key ); ?>-value"><?php echo wp_kses_post( $data['value'] ); ?></span>
36
+                                    <span class="getpaid-invoice-meta-<?php echo sanitize_html_class($key); ?>-value"><?php echo wp_kses_post($data['value']); ?></span>
37 37
                                 </td>
38 38
 
39 39
                             </tr>
40 40
 
41
-                            <?php do_action( "getpaid_after_invoice_meta_$key", $invoice, $data ); ?>
41
+                            <?php do_action("getpaid_after_invoice_meta_$key", $invoice, $data); ?>
42 42
 
43 43
                         <?php endif; ?>
44 44
                     
45 45
                     <?php endforeach; ?>
46
-                    <?php do_action( "getpaid_after_invoice_meta_rows", $invoice ); ?>
46
+                    <?php do_action("getpaid_after_invoice_meta_rows", $invoice); ?>
47 47
 
48 48
                 </tbody>
49 49
             </table>
50
-            <?php do_action( 'getpaid_after_invoice_meta_table', $invoice ); ?>
50
+            <?php do_action('getpaid_after_invoice_meta_table', $invoice); ?>
51 51
 
52 52
 
53 53
         </div>
54
-        <?php do_action( 'getpaid_after_invoice_meta', $invoice ); ?>
54
+        <?php do_action('getpaid_after_invoice_meta', $invoice); ?>
55 55
 
56 56
 <?php
Please login to merge, or discard this patch.
templates/invoice/line-totals.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -9,26 +9,26 @@  discard block
 block discarded – undo
9 9
  * @var WPInv_Invoice $invoice
10 10
  */
11 11
 
12
-defined( 'ABSPATH' ) || exit;
12
+defined('ABSPATH') || exit;
13 13
 
14 14
 // Totals rows.
15
-$totals = getpaid_invoice_totals_rows( $invoice );
15
+$totals = getpaid_invoice_totals_rows($invoice);
16 16
 
17
-do_action( 'getpaid_before_invoice_line_totals', $invoice, $totals );
17
+do_action('getpaid_before_invoice_line_totals', $invoice, $totals);
18 18
 
19 19
 ?>
20 20
 <div class='getpaid-invoice-line-totals'>
21 21
     <div class="row">
22 22
         <div class="col-12 offset-sm-6 col-sm-6 border-sm-left pl-sm-0">
23 23
 
24
-            <?php foreach ( $totals as $key => $label ) : ?>
24
+            <?php foreach ($totals as $key => $label) : ?>
25 25
 
26
-                <div class="getpaid-invoice-line-totals-col <?php echo sanitize_html_class( $key ); ?>">
26
+                <div class="getpaid-invoice-line-totals-col <?php echo sanitize_html_class($key); ?>">
27 27
 
28 28
                     <div class="form-row">
29 29
 
30 30
                         <div class="col-8 getpaid-invoice-line-totals-label">
31
-                            <?php echo esc_html( $label ); ?>
31
+                            <?php echo esc_html($label); ?>
32 32
                         </div>
33 33
 
34 34
                         <div class="col-4 getpaid-invoice-line-totals-value pl-0">
@@ -36,15 +36,15 @@  discard block
 block discarded – undo
36 36
                             <?php
37 37
 
38 38
                                 // Total tax.
39
-                                if ( 'tax' == $key ) {
40
-                                    echo wpinv_price( $invoice->get_total_tax(), $invoice->get_currency() );
39
+                                if ('tax' == $key) {
40
+                                    echo wpinv_price($invoice->get_total_tax(), $invoice->get_currency());
41 41
 
42
-                                    if ( wpinv_use_taxes() && ! $invoice->get_disable_taxes() ) {
42
+                                    if (wpinv_use_taxes() && !$invoice->get_disable_taxes()) {
43 43
 
44 44
                                         $taxes = $invoice->get_total_tax();
45
-                                        if ( empty( $taxes ) && GetPaid_Payment_Form_Submission_Taxes::is_eu_transaction( $invoice->get_country() ) ) {
45
+                                        if (empty($taxes) && GetPaid_Payment_Form_Submission_Taxes::is_eu_transaction($invoice->get_country())) {
46 46
                                             echo ' <em class="text-muted small">';
47
-                                            _x( '(Reverse charged)','This is a legal term for reverse charging tax in the EU', 'invoicing' );
47
+                                            _x('(Reverse charged)', 'This is a legal term for reverse charging tax in the EU', 'invoicing');
48 48
                                             echo '</em>';
49 49
                                         }
50 50
 
@@ -53,27 +53,27 @@  discard block
 block discarded – undo
53 53
                                 }
54 54
 
55 55
                                 // Total Fee.
56
-                                if ( 'fee' == $key ) {
57
-                                    echo wpinv_price( $invoice->get_total_fees(), $invoice->get_currency() );
56
+                                if ('fee' == $key) {
57
+                                    echo wpinv_price($invoice->get_total_fees(), $invoice->get_currency());
58 58
                                 }
59 59
 
60 60
                                 // Total discount.
61
-                                if ( 'discount' == $key ) {
62
-                                    echo wpinv_price( $invoice->get_total_discount(), $invoice->get_currency() );
61
+                                if ('discount' == $key) {
62
+                                    echo wpinv_price($invoice->get_total_discount(), $invoice->get_currency());
63 63
                                 }
64 64
 
65 65
                                 // Sub total.
66
-                                if ( 'subtotal' == $key ) {
67
-                                    echo wpinv_price( $invoice->get_subtotal(), $invoice->get_currency() );
66
+                                if ('subtotal' == $key) {
67
+                                    echo wpinv_price($invoice->get_subtotal(), $invoice->get_currency());
68 68
                                 }
69 69
 
70 70
                                 // Total.
71
-                                if ( 'total' == $key ) {
72
-                                    echo wpinv_price( $invoice->get_total(), $invoice->get_currency() );
71
+                                if ('total' == $key) {
72
+                                    echo wpinv_price($invoice->get_total(), $invoice->get_currency());
73 73
                                 }
74 74
  
75 75
                                 // Fires when printing a cart total.
76
-                                do_action( "getpaid_invoice_cart_totals_$key", $invoice );
76
+                                do_action("getpaid_invoice_cart_totals_$key", $invoice);
77 77
 
78 78
                             ?>
79 79
 
@@ -87,4 +87,4 @@  discard block
 block discarded – undo
87 87
     </div>
88 88
 </div> <!-- end .getpaid-invoice-line-totals -->
89 89
 
90
-<?php do_action(  'getpaid_after_invoice_line_totals', $invoice, $totals ); ?>
90
+<?php do_action('getpaid_after_invoice_line_totals', $invoice, $totals); ?>
Please login to merge, or discard this patch.
templates/invoice/fee-item.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -9,9 +9,9 @@  discard block
 block discarded – undo
9 9
  * @var array $fee
10 10
  */
11 11
 
12
-defined( 'ABSPATH' ) || exit;
12
+defined('ABSPATH') || exit;
13 13
 
14
-do_action( 'getpaid_before_invoice_fee_item', $invoice, $fee );
14
+do_action('getpaid_before_invoice_fee_item', $invoice, $fee);
15 15
 
16 16
 ?>
17 17
 
@@ -19,66 +19,66 @@  discard block
 block discarded – undo
19 19
 
20 20
     <div class="form-row">
21 21
 
22
-        <?php foreach ( array_keys( $columns ) as $column ): ?>
22
+        <?php foreach (array_keys($columns) as $column): ?>
23 23
 
24
-            <div class="<?php echo 'name' == $column ? 'col-12 col-sm-6' : 'col-12 col-sm' ?> getpaid-invoice-item-<?php echo sanitize_html_class( $column ); ?>">
24
+            <div class="<?php echo 'name' == $column ? 'col-12 col-sm-6' : 'col-12 col-sm' ?> getpaid-invoice-item-<?php echo sanitize_html_class($column); ?>">
25 25
 
26 26
                 <?php
27 27
 
28 28
                     // Fires before printing a fee item column.
29
-                    do_action( "getpaid_invoice_fee_item_before_$column", $fee, $invoice );
29
+                    do_action("getpaid_invoice_fee_item_before_$column", $fee, $invoice);
30 30
 
31 31
                     // Item name.
32
-                    if ( 'name' == $column ) {
32
+                    if ('name' == $column) {
33 33
 
34 34
                         // Display the name.
35
-                        echo '<div class="mb-1">' . esc_html( $fee['name'] ) . '</div>';
35
+                        echo '<div class="mb-1">' . esc_html($fee['name']) . '</div>';
36 36
 
37 37
                         // And an optional description.
38
-                        $description = empty( $fee['description'] ) ? esc_html__( 'Fee', 'invoicing' ) : esc_html( $fee['description'] );
38
+                        $description = empty($fee['description']) ? esc_html__('Fee', 'invoicing') : esc_html($fee['description']);
39 39
                         echo "<small class='form-text text-muted pr-2 m-0'>$description</small>";
40 40
 
41 41
                     }
42 42
 
43 43
                     // Item price.
44
-                    if ( 'price' == $column ) {
44
+                    if ('price' == $column) {
45 45
 
46 46
                         // Display the item price (or recurring price if this is a renewal invoice)
47
-                        if ( $invoice->is_recurring() && $invoice->is_renewal() ) {
48
-                            echo wpinv_price( $fee['recurring_fee'], $invoice->get_currency() );
47
+                        if ($invoice->is_recurring() && $invoice->is_renewal()) {
48
+                            echo wpinv_price($fee['recurring_fee'], $invoice->get_currency());
49 49
                         } else {
50
-                            echo wpinv_price( $fee['initial_fee'], $invoice->get_currency() );
50
+                            echo wpinv_price($fee['initial_fee'], $invoice->get_currency());
51 51
                         }
52 52
 
53 53
                     }
54 54
 
55 55
                     // Item quantity.
56
-                    if ( 'quantity' == $column ) {
56
+                    if ('quantity' == $column) {
57 57
                         echo "&mdash;";
58 58
                     }
59 59
 
60 60
                     // Item tax.
61
-                    if ( 'tax_rate' == $column ) {
61
+                    if ('tax_rate' == $column) {
62 62
                         echo "&mdash;";
63 63
                     }
64 64
 
65 65
                     // Item sub total.
66
-                    if ( 'subtotal' == $column ) {
66
+                    if ('subtotal' == $column) {
67 67
 
68 68
                         // Display the item price (or recurring price if this is a renewal invoice)
69
-                        if ( $invoice->is_recurring() && $invoice->is_renewal() ) {
70
-                            echo wpinv_price( $fee['recurring_fee'], $invoice->get_currency() );
69
+                        if ($invoice->is_recurring() && $invoice->is_renewal()) {
70
+                            echo wpinv_price($fee['recurring_fee'], $invoice->get_currency());
71 71
                         } else {
72
-                            echo wpinv_price( $fee['initial_fee'], $invoice->get_currency() );
72
+                            echo wpinv_price($fee['initial_fee'], $invoice->get_currency());
73 73
                         }
74 74
 
75 75
                     }
76 76
 
77 77
                     // Fires when printing a fee item column.
78
-                    do_action( "getpaid_invoice_fee_item_$column", $fee, $invoice );
78
+                    do_action("getpaid_invoice_fee_item_$column", $fee, $invoice);
79 79
 
80 80
                     // Fires after printing a fee item column.
81
-                    do_action( "getpaid_invoice_fee_item_after_$column", $fee, $invoice );
81
+                    do_action("getpaid_invoice_fee_item_after_$column", $fee, $invoice);
82 82
 
83 83
                 ?>
84 84
 
Please login to merge, or discard this patch.