@@ -40,86 +40,86 @@ discard block |
||
40 | 40 | <tr class="wpinv-item wpinv-item-<?php echo $invoice_status = $invoice->get_status(); ?>"> |
41 | 41 | <?php |
42 | 42 | |
43 | - foreach ( wpinv_get_user_invoices_columns() as $column_id => $column_name ) : |
|
43 | + foreach ( wpinv_get_user_invoices_columns() as $column_id => $column_name ) : |
|
44 | 44 | |
45 | - $column_id = sanitize_html_class( $column_id ); |
|
46 | - $class = empty( $column_name['class'] ) ? '' : sanitize_html_class( $column_name['class'] ); |
|
45 | + $column_id = sanitize_html_class( $column_id ); |
|
46 | + $class = empty( $column_name['class'] ) ? '' : sanitize_html_class( $column_name['class'] ); |
|
47 | 47 | |
48 | - echo "<td class='$column_id $class'>"; |
|
49 | - switch ( $column_id ) { |
|
48 | + echo "<td class='$column_id $class'>"; |
|
49 | + switch ( $column_id ) { |
|
50 | 50 | |
51 | - case 'invoice-number': |
|
52 | - echo wpinv_invoice_link( $invoice ); |
|
53 | - break; |
|
51 | + case 'invoice-number': |
|
52 | + echo wpinv_invoice_link( $invoice ); |
|
53 | + break; |
|
54 | 54 | |
55 | - case 'created-date': |
|
56 | - echo date_i18n( get_option( 'date_format' ), strtotime( $invoice->get_date_created() ) ); |
|
57 | - break; |
|
55 | + case 'created-date': |
|
56 | + echo date_i18n( get_option( 'date_format' ), strtotime( $invoice->get_date_created() ) ); |
|
57 | + break; |
|
58 | 58 | |
59 | - case 'payment-date': |
|
59 | + case 'payment-date': |
|
60 | 60 | |
61 | - if ( $invoice->needs_payment() ) { |
|
62 | - echo "—"; |
|
63 | - } else { |
|
64 | - echo date_i18n( get_option( 'date_format' ), strtotime( $invoice->get_date_completed() ) ); |
|
65 | - } |
|
61 | + if ( $invoice->needs_payment() ) { |
|
62 | + echo "—"; |
|
63 | + } else { |
|
64 | + echo date_i18n( get_option( 'date_format' ), strtotime( $invoice->get_date_completed() ) ); |
|
65 | + } |
|
66 | 66 | |
67 | - break; |
|
67 | + break; |
|
68 | 68 | |
69 | - case 'invoice-status': |
|
70 | - echo wpinv_invoice_status_label( $invoice->get_status(), $invoice->get_status_nicename() ); |
|
69 | + case 'invoice-status': |
|
70 | + echo wpinv_invoice_status_label( $invoice->get_status(), $invoice->get_status_nicename() ); |
|
71 | 71 | |
72 | - break; |
|
72 | + break; |
|
73 | 73 | |
74 | - case 'invoice-total': |
|
75 | - echo wpinv_price( wpinv_format_amount( $invoice->get_total() ) ); |
|
74 | + case 'invoice-total': |
|
75 | + echo wpinv_price( wpinv_format_amount( $invoice->get_total() ) ); |
|
76 | 76 | |
77 | - break; |
|
77 | + break; |
|
78 | 78 | |
79 | - case 'invoice-actions': |
|
79 | + case 'invoice-actions': |
|
80 | 80 | |
81 | - $actions = array( |
|
81 | + $actions = array( |
|
82 | 82 | |
83 | - 'pay' => array( |
|
84 | - 'url' => $invoice->get_checkout_payment_url(), |
|
85 | - 'name' => __( 'Pay Now', 'invoicing' ), |
|
83 | + 'pay' => array( |
|
84 | + 'url' => $invoice->get_checkout_payment_url(), |
|
85 | + 'name' => __( 'Pay Now', 'invoicing' ), |
|
86 | 86 | 'class' => 'btn-success' |
87 | - ), |
|
87 | + ), |
|
88 | 88 | |
89 | 89 | 'print' => array( |
90 | - 'url' => $invoice->get_view_url(), |
|
91 | - 'name' => __( 'View Invoice', 'invoicing' ), |
|
90 | + 'url' => $invoice->get_view_url(), |
|
91 | + 'name' => __( 'View Invoice', 'invoicing' ), |
|
92 | 92 | 'class' => 'btn-secondary', |
93 | 93 | 'attrs' => 'target="_blank"' |
94 | - ) |
|
95 | - ); |
|
94 | + ) |
|
95 | + ); |
|
96 | 96 | |
97 | - if ( ! $invoice->needs_payment() ) { |
|
98 | - unset( $actions['pay'] ); |
|
99 | - } |
|
97 | + if ( ! $invoice->needs_payment() ) { |
|
98 | + unset( $actions['pay'] ); |
|
99 | + } |
|
100 | 100 | |
101 | - $actions = apply_filters( 'wpinv_user_invoices_actions', $actions, $invoice ); |
|
101 | + $actions = apply_filters( 'wpinv_user_invoices_actions', $actions, $invoice ); |
|
102 | 102 | |
103 | - foreach ( $actions as $key => $action ) { |
|
104 | - $class = !empty($action['class']) ? sanitize_html_class($action['class']) : ''; |
|
105 | - echo '<a href="' . esc_url( $action['url'] ) . '" class="btn btn-sm btn-block ' . $class . ' ' . sanitize_html_class( $key ) . '" ' . ( !empty($action['attrs']) ? $action['attrs'] : '' ) . '>' . $action['name'] . '</a>'; |
|
106 | - } |
|
103 | + foreach ( $actions as $key => $action ) { |
|
104 | + $class = !empty($action['class']) ? sanitize_html_class($action['class']) : ''; |
|
105 | + echo '<a href="' . esc_url( $action['url'] ) . '" class="btn btn-sm btn-block ' . $class . ' ' . sanitize_html_class( $key ) . '" ' . ( !empty($action['attrs']) ? $action['attrs'] : '' ) . '>' . $action['name'] . '</a>'; |
|
106 | + } |
|
107 | 107 | |
108 | - break; |
|
108 | + break; |
|
109 | 109 | |
110 | - default: |
|
111 | - do_action( "wpinv_user_invoices_column_$column_id", $invoice ); |
|
112 | - break; |
|
110 | + default: |
|
111 | + do_action( "wpinv_user_invoices_column_$column_id", $invoice ); |
|
112 | + break; |
|
113 | 113 | |
114 | 114 | |
115 | - } |
|
115 | + } |
|
116 | 116 | |
117 | - do_action( "wpinv_user_invoices_column_after_$column_id", $invoice ); |
|
117 | + do_action( "wpinv_user_invoices_column_after_$column_id", $invoice ); |
|
118 | 118 | |
119 | - echo '</td>'; |
|
119 | + echo '</td>'; |
|
120 | 120 | |
121 | - endforeach; |
|
122 | - ?> |
|
121 | + endforeach; |
|
122 | + ?> |
|
123 | 123 | </tr> |
124 | 124 | |
125 | 125 | <?php endforeach; ?> |
@@ -132,14 +132,14 @@ discard block |
||
132 | 132 | <?php if ( 1 < $invoices->max_num_pages ) : ?> |
133 | 133 | <div class="invoicing-Pagination"> |
134 | 134 | <?php |
135 | - $big = 999999; |
|
136 | - |
|
137 | - echo paginate_links( array( |
|
138 | - 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), |
|
139 | - 'format' => '?paged=%#%', |
|
140 | - 'total' => $invoices->max_num_pages, |
|
141 | - ) ); |
|
142 | - ?> |
|
135 | + $big = 999999; |
|
136 | + |
|
137 | + echo paginate_links( array( |
|
138 | + 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), |
|
139 | + 'format' => '?paged=%#%', |
|
140 | + 'total' => $invoices->max_num_pages, |
|
141 | + ) ); |
|
142 | + ?> |
|
143 | 143 | </div> |
144 | 144 | <?php endif; ?> |
145 | 145 |
@@ -7,13 +7,13 @@ discard block |
||
7 | 7 | * @version 1.0.19 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
10 | +defined('ABSPATH') || exit; |
|
11 | 11 | |
12 | 12 | // Current page. |
13 | -$current_page = empty( $_GET[ 'page' ] ) ? 1 : absint( $_GET[ 'page' ] ); |
|
13 | +$current_page = empty($_GET['page']) ? 1 : absint($_GET['page']); |
|
14 | 14 | |
15 | 15 | // Fires before displaying user invoices. |
16 | -do_action( 'wpinv_before_user_invoices', $invoices->invoices, $invoices->total, $invoices->max_num_pages ); |
|
16 | +do_action('wpinv_before_user_invoices', $invoices->invoices, $invoices->total, $invoices->max_num_pages); |
|
17 | 17 | |
18 | 18 | ?> |
19 | 19 | |
@@ -23,9 +23,9 @@ discard block |
||
23 | 23 | <thead> |
24 | 24 | <tr> |
25 | 25 | |
26 | - <?php foreach ( wpinv_get_user_invoices_columns() as $column_id => $column_name ) : ?> |
|
27 | - <th class="<?php echo sanitize_html_class( $column_id ); ?> <?php echo ( ! empty( $column_name['class'] ) ? sanitize_html_class( $column_name['class'] ) : '');?> border-bottom-0"> |
|
28 | - <span class="nobr"><?php echo esc_html( $column_name['title'] ); ?></span> |
|
26 | + <?php foreach (wpinv_get_user_invoices_columns() as $column_id => $column_name) : ?> |
|
27 | + <th class="<?php echo sanitize_html_class($column_id); ?> <?php echo (!empty($column_name['class']) ? sanitize_html_class($column_name['class']) : ''); ?> border-bottom-0"> |
|
28 | + <span class="nobr"><?php echo esc_html($column_name['title']); ?></span> |
|
29 | 29 | </th> |
30 | 30 | <?php endforeach; ?> |
31 | 31 | |
@@ -35,44 +35,44 @@ discard block |
||
35 | 35 | |
36 | 36 | |
37 | 37 | <tbody> |
38 | - <?php foreach ( $invoices->invoices as $invoice ) : ?> |
|
38 | + <?php foreach ($invoices->invoices as $invoice) : ?> |
|
39 | 39 | |
40 | 40 | <tr class="wpinv-item wpinv-item-<?php echo $invoice_status = $invoice->get_status(); ?>"> |
41 | 41 | <?php |
42 | 42 | |
43 | - foreach ( wpinv_get_user_invoices_columns() as $column_id => $column_name ) : |
|
43 | + foreach (wpinv_get_user_invoices_columns() as $column_id => $column_name) : |
|
44 | 44 | |
45 | - $column_id = sanitize_html_class( $column_id ); |
|
46 | - $class = empty( $column_name['class'] ) ? '' : sanitize_html_class( $column_name['class'] ); |
|
45 | + $column_id = sanitize_html_class($column_id); |
|
46 | + $class = empty($column_name['class']) ? '' : sanitize_html_class($column_name['class']); |
|
47 | 47 | |
48 | 48 | echo "<td class='$column_id $class'>"; |
49 | - switch ( $column_id ) { |
|
49 | + switch ($column_id) { |
|
50 | 50 | |
51 | 51 | case 'invoice-number': |
52 | - echo wpinv_invoice_link( $invoice ); |
|
52 | + echo wpinv_invoice_link($invoice); |
|
53 | 53 | break; |
54 | 54 | |
55 | 55 | case 'created-date': |
56 | - echo date_i18n( get_option( 'date_format' ), strtotime( $invoice->get_date_created() ) ); |
|
56 | + echo date_i18n(get_option('date_format'), strtotime($invoice->get_date_created())); |
|
57 | 57 | break; |
58 | 58 | |
59 | 59 | case 'payment-date': |
60 | 60 | |
61 | - if ( $invoice->needs_payment() ) { |
|
61 | + if ($invoice->needs_payment()) { |
|
62 | 62 | echo "—"; |
63 | 63 | } else { |
64 | - echo date_i18n( get_option( 'date_format' ), strtotime( $invoice->get_date_completed() ) ); |
|
64 | + echo date_i18n(get_option('date_format'), strtotime($invoice->get_date_completed())); |
|
65 | 65 | } |
66 | 66 | |
67 | 67 | break; |
68 | 68 | |
69 | 69 | case 'invoice-status': |
70 | - echo wpinv_invoice_status_label( $invoice->get_status(), $invoice->get_status_nicename() ); |
|
70 | + echo wpinv_invoice_status_label($invoice->get_status(), $invoice->get_status_nicename()); |
|
71 | 71 | |
72 | 72 | break; |
73 | 73 | |
74 | 74 | case 'invoice-total': |
75 | - echo wpinv_price( wpinv_format_amount( $invoice->get_total() ) ); |
|
75 | + echo wpinv_price(wpinv_format_amount($invoice->get_total())); |
|
76 | 76 | |
77 | 77 | break; |
78 | 78 | |
@@ -82,39 +82,39 @@ discard block |
||
82 | 82 | |
83 | 83 | 'pay' => array( |
84 | 84 | 'url' => $invoice->get_checkout_payment_url(), |
85 | - 'name' => __( 'Pay Now', 'invoicing' ), |
|
85 | + 'name' => __('Pay Now', 'invoicing'), |
|
86 | 86 | 'class' => 'btn-success' |
87 | 87 | ), |
88 | 88 | |
89 | 89 | 'print' => array( |
90 | 90 | 'url' => $invoice->get_view_url(), |
91 | - 'name' => __( 'View Invoice', 'invoicing' ), |
|
91 | + 'name' => __('View Invoice', 'invoicing'), |
|
92 | 92 | 'class' => 'btn-secondary', |
93 | 93 | 'attrs' => 'target="_blank"' |
94 | 94 | ) |
95 | 95 | ); |
96 | 96 | |
97 | - if ( ! $invoice->needs_payment() ) { |
|
98 | - unset( $actions['pay'] ); |
|
97 | + if (!$invoice->needs_payment()) { |
|
98 | + unset($actions['pay']); |
|
99 | 99 | } |
100 | 100 | |
101 | - $actions = apply_filters( 'wpinv_user_invoices_actions', $actions, $invoice ); |
|
101 | + $actions = apply_filters('wpinv_user_invoices_actions', $actions, $invoice); |
|
102 | 102 | |
103 | - foreach ( $actions as $key => $action ) { |
|
103 | + foreach ($actions as $key => $action) { |
|
104 | 104 | $class = !empty($action['class']) ? sanitize_html_class($action['class']) : ''; |
105 | - echo '<a href="' . esc_url( $action['url'] ) . '" class="btn btn-sm btn-block ' . $class . ' ' . sanitize_html_class( $key ) . '" ' . ( !empty($action['attrs']) ? $action['attrs'] : '' ) . '>' . $action['name'] . '</a>'; |
|
105 | + echo '<a href="' . esc_url($action['url']) . '" class="btn btn-sm btn-block ' . $class . ' ' . sanitize_html_class($key) . '" ' . (!empty($action['attrs']) ? $action['attrs'] : '') . '>' . $action['name'] . '</a>'; |
|
106 | 106 | } |
107 | 107 | |
108 | 108 | break; |
109 | 109 | |
110 | 110 | default: |
111 | - do_action( "wpinv_user_invoices_column_$column_id", $invoice ); |
|
111 | + do_action("wpinv_user_invoices_column_$column_id", $invoice); |
|
112 | 112 | break; |
113 | 113 | |
114 | 114 | |
115 | 115 | } |
116 | 116 | |
117 | - do_action( "wpinv_user_invoices_column_after_$column_id", $invoice ); |
|
117 | + do_action("wpinv_user_invoices_column_after_$column_id", $invoice); |
|
118 | 118 | |
119 | 119 | echo '</td>'; |
120 | 120 | |
@@ -127,20 +127,20 @@ discard block |
||
127 | 127 | </tbody> |
128 | 128 | </table> |
129 | 129 | |
130 | - <?php do_action( 'wpinv_before_user_invoices_pagination' ); ?> |
|
130 | + <?php do_action('wpinv_before_user_invoices_pagination'); ?> |
|
131 | 131 | |
132 | - <?php if ( 1 < $invoices->max_num_pages ) : ?> |
|
132 | + <?php if (1 < $invoices->max_num_pages) : ?> |
|
133 | 133 | <div class="invoicing-Pagination"> |
134 | 134 | <?php |
135 | 135 | $big = 999999; |
136 | 136 | |
137 | - echo paginate_links( array( |
|
138 | - 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), |
|
137 | + echo paginate_links(array( |
|
138 | + 'base' => str_replace($big, '%#%', esc_url(get_pagenum_link($big))), |
|
139 | 139 | 'format' => '?paged=%#%', |
140 | 140 | 'total' => $invoices->max_num_pages, |
141 | - ) ); |
|
141 | + )); |
|
142 | 142 | ?> |
143 | 143 | </div> |
144 | 144 | <?php endif; ?> |
145 | 145 | |
146 | -<?php do_action( 'wpinv_after_user_invoices', $invoices->invoices, $invoices->total, $invoices->max_num_pages ); ?> |
|
146 | +<?php do_action('wpinv_after_user_invoices', $invoices->invoices, $invoices->total, $invoices->max_num_pages); ?> |
@@ -7,18 +7,18 @@ discard block |
||
7 | 7 | * @version 1.0.19 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
10 | +defined('ABSPATH') || exit; |
|
11 | 11 | |
12 | -$column_count = count( $columns ); |
|
12 | +$column_count = count($columns); |
|
13 | 13 | ?> |
14 | 14 | |
15 | -<?php do_action( 'wpinv_before_email_items', $invoice ); ?> |
|
15 | +<?php do_action('wpinv_before_email_items', $invoice); ?> |
|
16 | 16 | |
17 | 17 | |
18 | 18 | <div id="wpinv-email-items"> |
19 | 19 | |
20 | 20 | <h3 class="wpinv-items-t"> |
21 | - <?php echo apply_filters( 'wpinv_email_items_title', __( 'Items', 'invoicing' ) ); ?> |
|
21 | + <?php echo apply_filters('wpinv_email_items_title', __('Items', 'invoicing')); ?> |
|
22 | 22 | </h3> |
23 | 23 | |
24 | 24 | <table id="wpinv_checkout_cart" class="table table-bordered table-hover"> |
@@ -27,9 +27,9 @@ discard block |
||
27 | 27 | |
28 | 28 | <tr class="wpinv_cart_header_row"> |
29 | 29 | |
30 | - <?php foreach ( $columns as $key => $label ) : ?> |
|
31 | - <th class="<?php echo 'name' == $key ? 'text-left' : 'text-right' ?> wpinv_cart_item_<?php echo sanitize_html_class( $key ); ?>"> |
|
32 | - <?php echo sanitize_text_field( $label ); ?> |
|
30 | + <?php foreach ($columns as $key => $label) : ?> |
|
31 | + <th class="<?php echo 'name' == $key ? 'text-left' : 'text-right' ?> wpinv_cart_item_<?php echo sanitize_html_class($key); ?>"> |
|
32 | + <?php echo sanitize_text_field($label); ?> |
|
33 | 33 | </th> |
34 | 34 | <?php endforeach; ?> |
35 | 35 | |
@@ -42,9 +42,9 @@ discard block |
||
42 | 42 | <?php |
43 | 43 | |
44 | 44 | // Display the item totals. |
45 | - foreach ( $invoice->get_items() as $item ) { |
|
46 | - noptin_dump( $item ); |
|
47 | - wpinv_get_template( 'emails/invoice-items.php', compact( 'invoice', 'item', 'columns' ) ); |
|
45 | + foreach ($invoice->get_items() as $item) { |
|
46 | + noptin_dump($item); |
|
47 | + wpinv_get_template('emails/invoice-items.php', compact('invoice', 'item', 'columns')); |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | ?> |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | </tbody> |
53 | 53 | |
54 | 54 | <tfoot> |
55 | - <?php wpinv_get_template( 'emails/invoice-totals.php', compact( 'invoice', 'column_count' ) ); ?> |
|
55 | + <?php wpinv_get_template('emails/invoice-totals.php', compact('invoice', 'column_count')); ?> |
|
56 | 56 | </tfoot> |
57 | 57 | |
58 | 58 | </table> |
@@ -7,22 +7,22 @@ discard block |
||
7 | 7 | * @version 1.0.19 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
10 | +defined('ABSPATH') || exit; |
|
11 | 11 | |
12 | 12 | // Totals rows. |
13 | -$totals = getpaid_invoice_totals_rows( $invoice ); |
|
13 | +$totals = getpaid_invoice_totals_rows($invoice); |
|
14 | 14 | |
15 | -do_action( 'getpaid_before_email_line_totals', $invoice, $totals ); |
|
15 | +do_action('getpaid_before_email_line_totals', $invoice, $totals); |
|
16 | 16 | |
17 | 17 | ?> |
18 | 18 | |
19 | 19 | |
20 | -<?php if ( has_action( 'wpinv_email_footer_buttons' ) ) : ?> |
|
20 | +<?php if (has_action('wpinv_email_footer_buttons')) : ?> |
|
21 | 21 | |
22 | 22 | <tr class="wpinv_cart_footer_row"> |
23 | 23 | |
24 | - <td colspan="<?php echo ( (int) $column_count ); ?>"> |
|
25 | - <?php do_action( 'wpinv_email_footer_buttons' ); ?> |
|
24 | + <td colspan="<?php echo ((int) $column_count); ?>"> |
|
25 | + <?php do_action('wpinv_email_footer_buttons'); ?> |
|
26 | 26 | </td> |
27 | 27 | |
28 | 28 | </tr> |
@@ -30,40 +30,40 @@ discard block |
||
30 | 30 | <?php endif; ?> |
31 | 31 | |
32 | 32 | |
33 | -<?php foreach ( $totals as $key => $label ) : ?> |
|
33 | +<?php foreach ($totals as $key => $label) : ?> |
|
34 | 34 | |
35 | - <tr class="wpinv_cart_footer_row wpinv_cart_<?php echo sanitize_html_class( $key ); ?>_row"> |
|
35 | + <tr class="wpinv_cart_footer_row wpinv_cart_<?php echo sanitize_html_class($key); ?>_row"> |
|
36 | 36 | |
37 | - <td colspan="<?php echo ( $column_count - 1 ); ?>" class="wpinv_cart_<?php echo sanitize_html_class( $key ); ?>_label text-right"> |
|
38 | - <strong><?php echo sanitize_text_field( $label ); ?>:</strong> |
|
37 | + <td colspan="<?php echo ($column_count - 1); ?>" class="wpinv_cart_<?php echo sanitize_html_class($key); ?>_label text-right"> |
|
38 | + <strong><?php echo sanitize_text_field($label); ?>:</strong> |
|
39 | 39 | </td> |
40 | 40 | |
41 | - <td class="wpinv_cart_<?php echo sanitize_html_class( $key ); ?> text-right"> |
|
41 | + <td class="wpinv_cart_<?php echo sanitize_html_class($key); ?> text-right"> |
|
42 | 42 | |
43 | 43 | <?php |
44 | 44 | |
45 | 45 | // Total tax. |
46 | - if ( 'tax' == $key ) { |
|
47 | - echo wpinv_price( wpinv_format_amount( $invoice->get_total_tax() ), $invoice->get_currency() ); |
|
46 | + if ('tax' == $key) { |
|
47 | + echo wpinv_price(wpinv_format_amount($invoice->get_total_tax()), $invoice->get_currency()); |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | // Total discount. |
51 | - if ( 'discount' == $key ) { |
|
52 | - echo wpinv_price( wpinv_format_amount( $invoice->get_total_discount() ), $invoice->get_currency() ); |
|
51 | + if ('discount' == $key) { |
|
52 | + echo wpinv_price(wpinv_format_amount($invoice->get_total_discount()), $invoice->get_currency()); |
|
53 | 53 | } |
54 | 54 | |
55 | 55 | // Sub total. |
56 | - if ( 'subtotal' == $key ) { |
|
57 | - echo wpinv_price( wpinv_format_amount( $invoice->get_subtotal() ), $invoice->get_currency() ); |
|
56 | + if ('subtotal' == $key) { |
|
57 | + echo wpinv_price(wpinv_format_amount($invoice->get_subtotal()), $invoice->get_currency()); |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | // Total. |
61 | - if ( 'total' == $key ) { |
|
62 | - echo wpinv_price( wpinv_format_amount( $invoice->get_total() ), $invoice->get_currency() ); |
|
61 | + if ('total' == $key) { |
|
62 | + echo wpinv_price(wpinv_format_amount($invoice->get_total()), $invoice->get_currency()); |
|
63 | 63 | } |
64 | 64 | |
65 | 65 | // Fires when printing a cart total in an email. |
66 | - do_action( "getpaid_email_cart_totals_$key", $invoice ); |
|
66 | + do_action("getpaid_email_cart_totals_$key", $invoice); |
|
67 | 67 | |
68 | 68 | ?> |
69 | 69 | |
@@ -75,4 +75,4 @@ discard block |
||
75 | 75 | |
76 | 76 | <?php |
77 | 77 | |
78 | - do_action( 'getpaid_after_email_line_totals', $invoice, $totals ); |
|
78 | + do_action('getpaid_after_email_line_totals', $invoice, $totals); |
@@ -7,63 +7,63 @@ discard block |
||
7 | 7 | * @version 1.0.19 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
10 | +defined('ABSPATH') || exit; |
|
11 | 11 | |
12 | 12 | ?> |
13 | 13 | |
14 | -<?php do_action( 'getpaid_before_email_line_item', $invoice, $item ); ?> |
|
14 | +<?php do_action('getpaid_before_email_line_item', $invoice, $item); ?> |
|
15 | 15 | |
16 | -<tr class="wpinv_cart_item item-type-<?php echo sanitize_html_class( $item->get_type() ); ?>"> |
|
16 | +<tr class="wpinv_cart_item item-type-<?php echo sanitize_html_class($item->get_type()); ?>"> |
|
17 | 17 | |
18 | - <?php foreach ( array_keys( $columns ) as $column ): ?> |
|
18 | + <?php foreach (array_keys($columns) as $column): ?> |
|
19 | 19 | |
20 | - <td class="<?php echo 'name' == $column ? 'text-left' : 'text-right' ?> wpinv_cart_item_<?php echo sanitize_html_class( $column ); ?>"> |
|
20 | + <td class="<?php echo 'name' == $column ? 'text-left' : 'text-right' ?> wpinv_cart_item_<?php echo sanitize_html_class($column); ?>"> |
|
21 | 21 | |
22 | 22 | <?php |
23 | 23 | |
24 | 24 | // Fires before printing a line item column. |
25 | - do_action( "getpaid_email_line_item_before_$column", $item, $invoice ); |
|
25 | + do_action("getpaid_email_line_item_before_$column", $item, $invoice); |
|
26 | 26 | |
27 | 27 | // Item name. |
28 | - if ( 'name' == $column ) { |
|
28 | + if ('name' == $column) { |
|
29 | 29 | |
30 | 30 | // Display the name. |
31 | - echo '<div class="wpinv_email_cart_item_title">' . sanitize_text_field( $item->get_name() ) . '</div>'; |
|
31 | + echo '<div class="wpinv_email_cart_item_title">' . sanitize_text_field($item->get_name()) . '</div>'; |
|
32 | 32 | |
33 | 33 | // And an optional description. |
34 | 34 | $description = $item->get_description(); |
35 | 35 | |
36 | - if ( ! empty( $description ) ) { |
|
37 | - $description = wp_kses_post( $description ); |
|
36 | + if (!empty($description)) { |
|
37 | + $description = wp_kses_post($description); |
|
38 | 38 | echo "<small class='form-text text-muted pr-2 m-0'>$description</small>"; |
39 | 39 | } |
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( wpinv_format_amount( $item->get_price() ), $invoice->get_currency() ); |
|
47 | + if ($invoice->is_recurring() && $invoice->is_renewal()) { |
|
48 | + echo wpinv_price(wpinv_format_amount($item->get_price()), $invoice->get_currency()); |
|
49 | 49 | } else { |
50 | - echo wpinv_price( wpinv_format_amount( $item->get_initial_price() ), $invoice->get_currency() ); |
|
50 | + echo wpinv_price(wpinv_format_amount($item->get_initial_price()), $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 (int) $item->get_qantity(); |
58 | 58 | } |
59 | 59 | |
60 | 60 | // Item sub total. |
61 | - if ( 'subtotal' == $column ) { |
|
62 | - echo wpinv_price( wpinv_format_amount( $item->get_sub_total() ), $invoice->get_currency() ); |
|
61 | + if ('subtotal' == $column) { |
|
62 | + echo wpinv_price(wpinv_format_amount($item->get_sub_total()), $invoice->get_currency()); |
|
63 | 63 | } |
64 | 64 | |
65 | 65 | // Fires when printing a line item column. |
66 | - do_action( "getpaid_email_line_item_$column", $item, $invoice ); |
|
66 | + do_action("getpaid_email_line_item_$column", $item, $invoice); |
|
67 | 67 | |
68 | 68 | ?> |
69 | 69 | |
@@ -73,4 +73,4 @@ discard block |
||
73 | 73 | |
74 | 74 | </tr> |
75 | 75 | |
76 | -<?php do_action( 'getpaid_after_email_line_item', $invoice, $item ); ?> |
|
76 | +<?php do_action('getpaid_after_email_line_item', $invoice, $item); ?> |
@@ -1,68 +1,68 @@ |
||
1 | 1 | <?php |
2 | 2 | // don't load directly |
3 | -if ( !defined('ABSPATH') ) |
|
3 | +if (!defined('ABSPATH')) |
|
4 | 4 | die('-1'); |
5 | 5 | |
6 | 6 | global $wpinv_euvat; |
7 | 7 | |
8 | -$sent_to_admin = !empty( $sent_to_admin ) ? true : false; |
|
9 | -$invoice_url = $invoice->get_view_url( true ); |
|
8 | +$sent_to_admin = !empty($sent_to_admin) ? true : false; |
|
9 | +$invoice_url = $invoice->get_view_url(true); |
|
10 | 10 | $use_taxes = wpinv_use_taxes(); |
11 | 11 | $vat_name = $wpinv_euvat->get_vat_name(); |
12 | 12 | |
13 | -do_action( 'wpinv_email_before_invoice_details', $invoice, $sent_to_admin ); ?> |
|
13 | +do_action('wpinv_email_before_invoice_details', $invoice, $sent_to_admin); ?> |
|
14 | 14 | <div id="wpinv-email-details"> |
15 | - <h3 class="wpinv-details-t"><?php echo apply_filters( 'wpinv_email_details_title', __( 'Invoice Details', 'invoicing' ), $invoice ); ?></h3> |
|
15 | + <h3 class="wpinv-details-t"><?php echo apply_filters('wpinv_email_details_title', __('Invoice Details', 'invoicing'), $invoice); ?></h3> |
|
16 | 16 | <table class="table table-bordered table-sm"> |
17 | - <?php if ( $invoice_number = $invoice->get_number() ) { ?> |
|
17 | + <?php if ($invoice_number = $invoice->get_number()) { ?> |
|
18 | 18 | <tr> |
19 | - <td><?php echo apply_filters( 'wpinv_invoice_number_label', __( 'Invoice Number', 'invoicing' ), $invoice ); ?></td> |
|
20 | - <td><a href="<?php echo esc_url( $invoice_url ) ;?>"><?php echo $invoice_number; ?></a></td> |
|
19 | + <td><?php echo apply_filters('wpinv_invoice_number_label', __('Invoice Number', 'invoicing'), $invoice); ?></td> |
|
20 | + <td><a href="<?php echo esc_url($invoice_url); ?>"><?php echo $invoice_number; ?></a></td> |
|
21 | 21 | </tr> |
22 | 22 | <?php } ?> |
23 | 23 | <tr> |
24 | - <td><?php echo apply_filters( 'wpinv_invoice_status_title', __( 'Invoice Status', 'invoicing' ), $invoice ); ?></td> |
|
25 | - <td><?php echo $invoice->get_status( true ); ?></td> |
|
24 | + <td><?php echo apply_filters('wpinv_invoice_status_title', __('Invoice Status', 'invoicing'), $invoice); ?></td> |
|
25 | + <td><?php echo $invoice->get_status(true); ?></td> |
|
26 | 26 | </tr> |
27 | - <?php if ( $invoice->is_renewal() ) { ?> |
|
27 | + <?php if ($invoice->is_renewal()) { ?> |
|
28 | 28 | <tr> |
29 | - <td><?php echo apply_filters( 'wpinv_invoice_parent_invoice_label', __( 'Parent Invoice', 'invoicing' ), $invoice ); ?></td> |
|
30 | - <td><?php echo wpinv_invoice_link( $invoice->parent_invoice ); ?></td> |
|
29 | + <td><?php echo apply_filters('wpinv_invoice_parent_invoice_label', __('Parent Invoice', 'invoicing'), $invoice); ?></td> |
|
30 | + <td><?php echo wpinv_invoice_link($invoice->parent_invoice); ?></td> |
|
31 | 31 | </tr> |
32 | 32 | <?php } ?> |
33 | - <?php if ( ( $gateway_title = $invoice->get_gateway_title() ) && ( $invoice->is_paid() || $invoice->is_refunded() ) ) { ?> |
|
34 | - <td><?php echo apply_filters( 'wpinv_invoice_payment_method_label', __( 'Payment Method', 'invoicing' ), $invoice ); ?></td> |
|
33 | + <?php if (($gateway_title = $invoice->get_gateway_title()) && ($invoice->is_paid() || $invoice->is_refunded())) { ?> |
|
34 | + <td><?php echo apply_filters('wpinv_invoice_payment_method_label', __('Payment Method', 'invoicing'), $invoice); ?></td> |
|
35 | 35 | <td><?php echo $gateway_title; ?></td> |
36 | 36 | <?php } ?> |
37 | - <?php if ( $invoice_date = $invoice->get_invoice_date( false ) ) { ?> |
|
37 | + <?php if ($invoice_date = $invoice->get_invoice_date(false)) { ?> |
|
38 | 38 | <tr> |
39 | - <td><?php echo apply_filters( 'wpinv_invoice_date_label', __( 'Invoice Date', 'invoicing' ), $invoice ); ?></td> |
|
40 | - <td><?php echo wp_sprintf( '<time datetime="%s">%s</time>', date_i18n( 'c', strtotime( $invoice_date ) ), $invoice->get_invoice_date() ); ?></td> |
|
39 | + <td><?php echo apply_filters('wpinv_invoice_date_label', __('Invoice Date', 'invoicing'), $invoice); ?></td> |
|
40 | + <td><?php echo wp_sprintf('<time datetime="%s">%s</time>', date_i18n('c', strtotime($invoice_date)), $invoice->get_invoice_date()); ?></td> |
|
41 | 41 | </tr> |
42 | 42 | <?php } ?> |
43 | - <?php if ( wpinv_get_option( 'overdue_active' ) && $invoice->needs_payment() && ( $due_date = $invoice->get_due_date() ) ) { ?> |
|
43 | + <?php if (wpinv_get_option('overdue_active') && $invoice->needs_payment() && ($due_date = $invoice->get_due_date())) { ?> |
|
44 | 44 | <tr> |
45 | - <td><?php echo apply_filters( 'wpinv_invoice_due_date_label', __( 'Due Date', 'invoicing' ), $invoice ); ?></td> |
|
46 | - <td><?php echo wp_sprintf( '<time datetime="%s">%s</time>', date_i18n( 'c', strtotime( $due_date ) ), $invoice->get_due_date( true ) ); ?></td> |
|
45 | + <td><?php echo apply_filters('wpinv_invoice_due_date_label', __('Due Date', 'invoicing'), $invoice); ?></td> |
|
46 | + <td><?php echo wp_sprintf('<time datetime="%s">%s</time>', date_i18n('c', strtotime($due_date)), $invoice->get_due_date(true)); ?></td> |
|
47 | 47 | </tr> |
48 | 48 | <?php } ?> |
49 | - <?php do_action( 'wpinv_email_invoice_details_after_due_date', $invoice->ID ); ?> |
|
50 | - <?php if ( empty( $sent_to_admin ) && ( $owner_vat_number = $wpinv_euvat->get_vat_number() ) ) { ?> |
|
49 | + <?php do_action('wpinv_email_invoice_details_after_due_date', $invoice->ID); ?> |
|
50 | + <?php if (empty($sent_to_admin) && ($owner_vat_number = $wpinv_euvat->get_vat_number())) { ?> |
|
51 | 51 | <tr> |
52 | - <td><?php echo apply_filters( 'wpinv_invoice_owner_vat_number_label', wp_sprintf( __( 'Owner %s Number', 'invoicing' ), $vat_name ), $invoice, $vat_name ); ?></td> |
|
52 | + <td><?php echo apply_filters('wpinv_invoice_owner_vat_number_label', wp_sprintf(__('Owner %s Number', 'invoicing'), $vat_name), $invoice, $vat_name); ?></td> |
|
53 | 53 | <td><?php echo $owner_vat_number; ?></td> |
54 | 54 | </tr> |
55 | 55 | <?php } ?> |
56 | - <?php if ( $use_taxes && ( $user_vat_number = $invoice->vat_number ) ) { ?> |
|
56 | + <?php if ($use_taxes && ($user_vat_number = $invoice->vat_number)) { ?> |
|
57 | 57 | <tr> |
58 | - <td><?php echo apply_filters( 'wpinv_invoice_user_vat_number_label', wp_sprintf( __( 'Invoice %s Number', 'invoicing' ), $vat_name ), $invoice, $vat_name ); ?></td> |
|
58 | + <td><?php echo apply_filters('wpinv_invoice_user_vat_number_label', wp_sprintf(__('Invoice %s Number', 'invoicing'), $vat_name), $invoice, $vat_name); ?></td> |
|
59 | 59 | <td><?php echo $user_vat_number; ?></td> |
60 | 60 | </tr> |
61 | 61 | <?php } ?> |
62 | 62 | <tr class="table-active"> |
63 | - <td><strong><?php _e( 'Total Amount', 'invoicing' ) ?></strong></td> |
|
64 | - <td><strong><?php echo $invoice->get_total( true ); ?></strong></td> |
|
63 | + <td><strong><?php _e('Total Amount', 'invoicing') ?></strong></td> |
|
64 | + <td><strong><?php echo $invoice->get_total(true); ?></strong></td> |
|
65 | 65 | </tr> |
66 | 66 | </table> |
67 | 67 | </div> |
68 | -<?php do_action( 'wpinv_email_after_invoice_details', $invoice, $sent_to_admin ); ?> |
|
69 | 68 | \ No newline at end of file |
69 | +<?php do_action('wpinv_email_after_invoice_details', $invoice, $sent_to_admin); ?> |
|
70 | 70 | \ No newline at end of file |
@@ -2,12 +2,12 @@ discard block |
||
2 | 2 | global $wpi_invoice; |
3 | 3 | |
4 | 4 | // Backwards compatibility. |
5 | -if ( empty( $invoice ) ) { |
|
5 | +if (empty($invoice)) { |
|
6 | 6 | $invoice = $wpi_invoice; |
7 | 7 | } |
8 | 8 | |
9 | 9 | $success_page_uri = wpinv_get_success_page_uri(); |
10 | -if ( !empty( $wpi_invoice ) ) { |
|
10 | +if (!empty($wpi_invoice)) { |
|
11 | 11 | $success_page_uri = $invoice->get_receipt_url(); |
12 | 12 | } |
13 | 13 | ?> |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | <?php |
18 | 18 | echo |
19 | 19 | wp_sprintf( |
20 | - __( 'Your payment is processing. This page will reload automatically in 10 seconds. If it does not, click <a href="%s">here</a>.', 'invoicing' ), |
|
20 | + __('Your payment is processing. This page will reload automatically in 10 seconds. If it does not, click <a href="%s">here</a>.', 'invoicing'), |
|
21 | 21 | $success_page_uri |
22 | 22 | ); |
23 | 23 | ?> |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | <script type="text/javascript"> |
28 | 28 | setTimeout( |
29 | 29 | function(){ |
30 | - window.location = '<?php echo esc_url( $success_page_uri ); ?>'; |
|
30 | + window.location = '<?php echo esc_url($success_page_uri); ?>'; |
|
31 | 31 | }, |
32 | 32 | 10000 |
33 | 33 | ); |
@@ -8,26 +8,26 @@ discard block |
||
8 | 8 | * @version 1.0.19 |
9 | 9 | */ |
10 | 10 | |
11 | -defined( 'ABSPATH' ) || exit; |
|
11 | +defined('ABSPATH') || exit; |
|
12 | 12 | |
13 | 13 | // Totals rows. |
14 | -$totals = getpaid_invoice_totals_rows( $invoice ); |
|
14 | +$totals = getpaid_invoice_totals_rows($invoice); |
|
15 | 15 | |
16 | -do_action( 'getpaid_before_invoice_line_totals', $invoice, $totals ); |
|
16 | +do_action('getpaid_before_invoice_line_totals', $invoice, $totals); |
|
17 | 17 | |
18 | 18 | ?> |
19 | 19 | <div class='border-top getpaid-invoice-line-totals'> |
20 | 20 | <div class="row"> |
21 | 21 | <div class="col-12 offset-sm-6 col-sm-6 border-left pl-0"> |
22 | 22 | |
23 | - <?php foreach ( $totals as $key => $label ) : ?> |
|
23 | + <?php foreach ($totals as $key => $label) : ?> |
|
24 | 24 | |
25 | - <div class="getpaid-invoice-line-totals-col <?php echo sanitize_html_class( $key ); ?>"> |
|
25 | + <div class="getpaid-invoice-line-totals-col <?php echo sanitize_html_class($key); ?>"> |
|
26 | 26 | |
27 | 27 | <div class="row"> |
28 | 28 | |
29 | 29 | <div class="col-12 col-sm-8 getpaid-invoice-line-totals-label"> |
30 | - <?php echo sanitize_text_field( $label ); ?> |
|
30 | + <?php echo sanitize_text_field($label); ?> |
|
31 | 31 | </div> |
32 | 32 | |
33 | 33 | <div class="col-12 col-sm-2 getpaid-invoice-line-totals-value"> |
@@ -35,27 +35,27 @@ discard block |
||
35 | 35 | <?php |
36 | 36 | |
37 | 37 | // Total tax. |
38 | - if ( 'tax' == $key ) { |
|
39 | - echo wpinv_price( wpinv_format_amount( $invoice->get_total_tax() ), $invoice->get_currency() ); |
|
38 | + if ('tax' == $key) { |
|
39 | + echo wpinv_price(wpinv_format_amount($invoice->get_total_tax()), $invoice->get_currency()); |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | // Total discount. |
43 | - if ( 'discount' == $key ) { |
|
44 | - echo wpinv_price( wpinv_format_amount( $invoice->get_total_discount() ), $invoice->get_currency() ); |
|
43 | + if ('discount' == $key) { |
|
44 | + echo wpinv_price(wpinv_format_amount($invoice->get_total_discount()), $invoice->get_currency()); |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | // Sub total. |
48 | - if ( 'subtotal' == $key ) { |
|
49 | - echo wpinv_price( wpinv_format_amount( $invoice->get_subtotal() ), $invoice->get_currency() ); |
|
48 | + if ('subtotal' == $key) { |
|
49 | + echo wpinv_price(wpinv_format_amount($invoice->get_subtotal()), $invoice->get_currency()); |
|
50 | 50 | } |
51 | 51 | |
52 | 52 | // Total. |
53 | - if ( 'total' == $key ) { |
|
54 | - echo wpinv_price( wpinv_format_amount( $invoice->get_total() ), $invoice->get_currency() ); |
|
53 | + if ('total' == $key) { |
|
54 | + echo wpinv_price(wpinv_format_amount($invoice->get_total()), $invoice->get_currency()); |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | // Fires when printing a cart total. |
58 | - do_action( "getpaid_invoice_cart_totals_$key", $invoice ); |
|
58 | + do_action("getpaid_invoice_cart_totals_$key", $invoice); |
|
59 | 59 | |
60 | 60 | ?> |
61 | 61 | |
@@ -69,4 +69,4 @@ discard block |
||
69 | 69 | </div> |
70 | 70 | </div> <!-- end .getpaid-invoice-line-totals --> |
71 | 71 | |
72 | -<?php do_action( 'getpaid_after_invoice_line_totals', $invoice, $totals ); ?> |
|
72 | +<?php do_action('getpaid_after_invoice_line_totals', $invoice, $totals); ?> |
@@ -7,35 +7,35 @@ |
||
7 | 7 | * @version 1.0.19 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
10 | +defined('ABSPATH') || exit; |
|
11 | 11 | |
12 | 12 | ?> |
13 | 13 | |
14 | 14 | <div class="getpaid-header-right-actions"> |
15 | 15 | |
16 | - <?php if ( $invoice->is_type( 'invoice' ) ) : ?> |
|
16 | + <?php if ($invoice->is_type('invoice')) : ?> |
|
17 | 17 | |
18 | 18 | <a class="btn btn-secondary invoice-action-print" onclick="window.print();" href="javascript:void(0)"> |
19 | - <?php _e( 'Print Invoice', 'invoicing' ); ?> |
|
19 | + <?php _e('Print Invoice', 'invoicing'); ?> |
|
20 | 20 | </a> |
21 | 21 | |
22 | - <?php if ( is_user_logged_in() ) : ?> |
|
22 | + <?php if (is_user_logged_in()) : ?> |
|
23 | 23 | |
24 | - <a class="btn btn-secondary invoice-action-history" href="<?php echo esc_url( wpinv_get_history_page_uri() ); ?>"> |
|
25 | - <?php _e( 'Invoice History', 'invoicing' ); ?> |
|
24 | + <a class="btn btn-secondary invoice-action-history" href="<?php echo esc_url(wpinv_get_history_page_uri()); ?>"> |
|
25 | + <?php _e('Invoice History', 'invoicing'); ?> |
|
26 | 26 | </a> |
27 | 27 | <?php endif; ?> |
28 | 28 | |
29 | - <?php if ( wpinv_current_user_can_manage_invoicing() ) : ?> |
|
29 | + <?php if (wpinv_current_user_can_manage_invoicing()) : ?> |
|
30 | 30 | |
31 | - <a class="btn btn-secondary invoice-action-edit" href="<?php echo esc_url( get_edit_post_link( $invoice->get_id() ) ); ?>"> |
|
32 | - <?php _e( 'Edit Invoice', 'invoicing' ); ?> |
|
31 | + <a class="btn btn-secondary invoice-action-edit" href="<?php echo esc_url(get_edit_post_link($invoice->get_id())); ?>"> |
|
32 | + <?php _e('Edit Invoice', 'invoicing'); ?> |
|
33 | 33 | </a> |
34 | 34 | <?php endif; ?> |
35 | 35 | |
36 | 36 | <?php endif; ?> |
37 | 37 | |
38 | - <?php do_action('wpinv_invoice_display_right_actions', $invoice ); ?> |
|
38 | + <?php do_action('wpinv_invoice_display_right_actions', $invoice); ?> |
|
39 | 39 | </div> |
40 | 40 | |
41 | 41 | <?php |
@@ -7,20 +7,20 @@ discard block |
||
7 | 7 | * @version 1.0.19 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
10 | +defined('ABSPATH') || exit; |
|
11 | 11 | |
12 | 12 | ?> |
13 | 13 | |
14 | -<?php do_action( 'getpaid_invoice_before_line_items', $invoice ); ?> |
|
14 | +<?php do_action('getpaid_invoice_before_line_items', $invoice); ?> |
|
15 | 15 | |
16 | 16 | <div class="getpaid-invoice-items mt-5 mb-4 border"> |
17 | 17 | |
18 | 18 | |
19 | - <div class="getpaid-invoice-items-header <?php echo sanitize_html_class( $invoice->get_template() ); ?>"> |
|
19 | + <div class="getpaid-invoice-items-header <?php echo sanitize_html_class($invoice->get_template()); ?>"> |
|
20 | 20 | <div class="form-row"> |
21 | - <?php foreach ( $columns as $key => $label ) : ?> |
|
22 | - <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 ); ?>"> |
|
23 | - <?php echo sanitize_text_field( $label ); ?> |
|
21 | + <?php foreach ($columns as $key => $label) : ?> |
|
22 | + <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); ?>"> |
|
23 | + <?php echo sanitize_text_field($label); ?> |
|
24 | 24 | </div> |
25 | 25 | <?php endforeach; ?> |
26 | 26 | </div> |
@@ -30,15 +30,15 @@ discard block |
||
30 | 30 | <?php |
31 | 31 | |
32 | 32 | // Display the item totals. |
33 | - foreach ( $invoice->get_items() as $item ) { |
|
34 | - wpinv_get_template( 'invoice/line-item.php', compact( 'invoice', 'item', 'columns' ) ); |
|
33 | + foreach ($invoice->get_items() as $item) { |
|
34 | + wpinv_get_template('invoice/line-item.php', compact('invoice', 'item', 'columns')); |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | // Display the cart totals. |
38 | - wpinv_get_template( 'invoice/line-totals.php', compact( 'invoice' ) ); |
|
38 | + wpinv_get_template('invoice/line-totals.php', compact('invoice')); |
|
39 | 39 | |
40 | 40 | ?> |
41 | 41 | |
42 | 42 | </div> |
43 | 43 | |
44 | -<?php do_action( 'getpaid_invoice_after_line_items', $invoice ); ?> |
|
44 | +<?php do_action('getpaid_invoice_after_line_items', $invoice); ?> |