@@ -7,21 +7,21 @@ 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 | - <h2 class="mt-5 mb-1 h4"><?php echo sprintf( esc_html__( '%s Items', 'invoicing' ), ucfirst( $invoice->get_type() )); ?></h2> |
|
16 | + <h2 class="mt-5 mb-1 h4"><?php echo sprintf(esc_html__('%s Items', 'invoicing'), ucfirst($invoice->get_type())); ?></h2> |
|
17 | 17 | <div class="getpaid-invoice-items mb-4 border"> |
18 | 18 | |
19 | 19 | |
20 | - <div class="getpaid-invoice-items-header <?php echo sanitize_html_class( $invoice->get_template() ); ?>"> |
|
20 | + <div class="getpaid-invoice-items-header <?php echo sanitize_html_class($invoice->get_template()); ?>"> |
|
21 | 21 | <div class="form-row"> |
22 | - <?php foreach ( $columns as $key => $label ) : ?> |
|
23 | - <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 ); ?>"> |
|
24 | - <?php echo sanitize_text_field( $label ); ?> |
|
22 | + <?php foreach ($columns as $key => $label) : ?> |
|
23 | + <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); ?>"> |
|
24 | + <?php echo sanitize_text_field($label); ?> |
|
25 | 25 | </div> |
26 | 26 | <?php endforeach; ?> |
27 | 27 | </div> |
@@ -31,15 +31,15 @@ discard block |
||
31 | 31 | <?php |
32 | 32 | |
33 | 33 | // Display the item totals. |
34 | - foreach ( $invoice->get_items() as $item ) { |
|
35 | - wpinv_get_template( 'invoice/line-item.php', compact( 'invoice', 'item', 'columns' ) ); |
|
34 | + foreach ($invoice->get_items() as $item) { |
|
35 | + wpinv_get_template('invoice/line-item.php', compact('invoice', 'item', 'columns')); |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | // Display the cart totals. |
39 | - wpinv_get_template( 'invoice/line-totals.php', compact( 'invoice' ) ); |
|
39 | + wpinv_get_template('invoice/line-totals.php', compact('invoice')); |
|
40 | 40 | |
41 | 41 | ?> |
42 | 42 | |
43 | 43 | </div> |
44 | 44 | |
45 | -<?php do_action( 'getpaid_invoice_after_line_items', $invoice ); ?> |
|
45 | +<?php do_action('getpaid_invoice_after_line_items', $invoice); ?> |
@@ -7,12 +7,12 @@ |
||
7 | 7 | * @version 1.0.19 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
10 | +defined('ABSPATH') || exit; |
|
11 | 11 | |
12 | 12 | ?> |
13 | 13 | <div class="p-3"> |
14 | 14 | <h2 class="h1 text-dark"> |
15 | - <?php echo apply_filters( 'getpaid_invoice_type_label', ucfirst( $invoice->get_type() ), $invoice ); ?> |
|
15 | + <?php echo apply_filters('getpaid_invoice_type_label', ucfirst($invoice->get_type()), $invoice); ?> |
|
16 | 16 | </h2> |
17 | 17 | </div> |
18 | 18 |
@@ -7,15 +7,15 @@ |
||
7 | 7 | * @version 1.0.19 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
10 | +defined('ABSPATH') || exit; |
|
11 | 11 | |
12 | 12 | ?> |
13 | -<a target="_blank" class="logo-link text-dark" href="<?php echo esc_url( wpinv_get_business_website() ); ?>"> |
|
13 | +<a target="_blank" class="logo-link text-dark" href="<?php echo esc_url(wpinv_get_business_website()); ?>"> |
|
14 | 14 | |
15 | - <?php if ( $logo = wpinv_get_business_logo() ) { ?> |
|
16 | - <img class="logo" style="max-width:100%;" src="<?php echo esc_url( $logo ); ?>"> |
|
15 | + <?php if ($logo = wpinv_get_business_logo()) { ?> |
|
16 | + <img class="logo" style="max-width:100%;" src="<?php echo esc_url($logo); ?>"> |
|
17 | 17 | <?php } else { ?> |
18 | - <h1 class="pt-2"><?php echo esc_html( wpinv_get_business_name() ); ?></h1> |
|
18 | + <h1 class="pt-2"><?php echo esc_html(wpinv_get_business_name()); ?></h1> |
|
19 | 19 | <?php } ?> |
20 | 20 | |
21 | 21 | </a> |
@@ -7,54 +7,54 @@ discard block |
||
7 | 7 | * @version 1.0.19 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
10 | +defined('ABSPATH') || exit; |
|
11 | 11 | |
12 | 12 | // Fetch the invoice. |
13 | -$invoice = new WPInv_Invoice( $invoice ); |
|
13 | +$invoice = new WPInv_Invoice($invoice); |
|
14 | 14 | |
15 | 15 | // @deprecated |
16 | -do_action( 'wpinv_success_content_before', $invoice ); |
|
17 | -do_action( 'wpinv_before_receipt', $invoice ); |
|
16 | +do_action('wpinv_success_content_before', $invoice); |
|
17 | +do_action('wpinv_before_receipt', $invoice); |
|
18 | 18 | |
19 | 19 | |
20 | 20 | // Prepare header text. |
21 | -if ( $invoice->is_paid() ) { |
|
21 | +if ($invoice->is_paid()) { |
|
22 | 22 | |
23 | 23 | $alert = aui()->alert( |
24 | 24 | array( |
25 | 25 | 'type' => 'success', |
26 | - 'content' => __( 'Thank you for your payment!', 'invoicing' ), |
|
26 | + 'content' => __('Thank you for your payment!', 'invoicing'), |
|
27 | 27 | ) |
28 | 28 | ); |
29 | 29 | |
30 | -} else if ( $invoice->is_refunded() ) { |
|
30 | +} else if ($invoice->is_refunded()) { |
|
31 | 31 | |
32 | 32 | $alert = aui()->alert( |
33 | 33 | array( |
34 | 34 | 'type' => 'info', |
35 | - 'content' => __( 'This invoice was refunded.', 'invoicing' ), |
|
35 | + 'content' => __('This invoice was refunded.', 'invoicing'), |
|
36 | 36 | ) |
37 | 37 | ); |
38 | 38 | |
39 | -} else if ( $invoice->is_held() ) { |
|
39 | +} else if ($invoice->is_held()) { |
|
40 | 40 | |
41 | 41 | $alert = aui()->alert( |
42 | 42 | array( |
43 | 43 | 'type' => 'info', |
44 | - 'content' => __( 'This invoice will be processed as soon we verify your payment.', 'invoicing' ), |
|
44 | + 'content' => __('This invoice will be processed as soon we verify your payment.', 'invoicing'), |
|
45 | 45 | ) |
46 | 46 | ); |
47 | 47 | |
48 | -} else if ( $invoice->needs_payment() ) { |
|
48 | +} else if ($invoice->needs_payment()) { |
|
49 | 49 | |
50 | - if ( $invoice->is_due() ) { |
|
50 | + if ($invoice->is_due()) { |
|
51 | 51 | |
52 | 52 | $alert = aui()->alert( |
53 | 53 | array( |
54 | 54 | 'type' => 'danger', |
55 | 55 | 'content' => sprintf( |
56 | - __( 'This invoice was due on %.', 'invoicing' ), |
|
57 | - date_i18n( get_option( 'date_format' ), strtotime( $invoice->get_due_date() ) ) |
|
56 | + __('This invoice was due on %.', 'invoicing'), |
|
57 | + date_i18n(get_option('date_format'), strtotime($invoice->get_due_date())) |
|
58 | 58 | ), |
59 | 59 | ) |
60 | 60 | ); |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | $alert = aui()->alert( |
65 | 65 | array( |
66 | 66 | 'type' => 'warning', |
67 | - 'content' => __( 'This invoice needs payment.', 'invoicing' ), |
|
67 | + 'content' => __('This invoice needs payment.', 'invoicing'), |
|
68 | 68 | ) |
69 | 69 | ); |
70 | 70 | |
@@ -79,19 +79,19 @@ discard block |
||
79 | 79 | |
80 | 80 | 'pay' => array( |
81 | 81 | 'url' => $invoice->get_checkout_payment_url(), |
82 | - 'name' => __( 'Pay For Invoice', 'invoicing' ), |
|
82 | + 'name' => __('Pay For Invoice', 'invoicing'), |
|
83 | 83 | 'class' => 'btn-success', |
84 | 84 | ), |
85 | 85 | |
86 | 86 | 'view' => array( |
87 | 87 | 'url' => $invoice->get_view_url(), |
88 | - 'name' => __( 'View Invoice', 'invoicing' ), |
|
88 | + 'name' => __('View Invoice', 'invoicing'), |
|
89 | 89 | 'class' => 'btn-primary', |
90 | 90 | ), |
91 | 91 | |
92 | 92 | 'history' => array( |
93 | 93 | 'url' => wpinv_get_history_page_uri(), |
94 | - 'name' => __( 'Invoice History', 'invoicing' ), |
|
94 | + 'name' => __('Invoice History', 'invoicing'), |
|
95 | 95 | 'class' => 'btn-warning', |
96 | 96 | ), |
97 | 97 | |
@@ -100,12 +100,12 @@ discard block |
||
100 | 100 | |
101 | 101 | ); |
102 | 102 | |
103 | -if ( ( ! $invoice->needs_payment() || $invoice->is_held() ) && isset( $actions['pay'] ) ) { |
|
104 | - unset( $actions['pay'] ); |
|
103 | +if ((!$invoice->needs_payment() || $invoice->is_held()) && isset($actions['pay'])) { |
|
104 | + unset($actions['pay']); |
|
105 | 105 | } |
106 | 106 | |
107 | -if ( ! is_user_logged_in() && isset( $actions['history'] ) ) { |
|
108 | - unset( $actions['history'] ); |
|
107 | +if (!is_user_logged_in() && isset($actions['history'])) { |
|
108 | + unset($actions['history']); |
|
109 | 109 | } |
110 | 110 | |
111 | 111 | ?> |
@@ -114,19 +114,19 @@ discard block |
||
114 | 114 | |
115 | 115 | <?php |
116 | 116 | |
117 | - do_action( 'wpinv_receipt_start', $invoice ); |
|
117 | + do_action('wpinv_receipt_start', $invoice); |
|
118 | 118 | |
119 | - if ( ! empty( $actions ) ) { |
|
119 | + if (!empty($actions)) { |
|
120 | 120 | |
121 | 121 | echo '<div class="wpinv-receipt-actions text-right mt-1 mb-4">'; |
122 | 122 | |
123 | - foreach ( $actions as $key => $action ) { |
|
123 | + foreach ($actions as $key => $action) { |
|
124 | 124 | |
125 | - $key = sanitize_html_class( $key ); |
|
126 | - $class = empty( $action['class'] ) ? 'btn-dark' : sanitize_html_class( $action['class'] ); |
|
127 | - $url = empty( $action['url'] ) ? '#' : esc_url( $action['url'] ); |
|
128 | - $attrs = empty( $action['attrs'] ) ? '' : $action['attrs']; |
|
129 | - $anchor = sanitize_text_field( $action['name'] ); |
|
125 | + $key = sanitize_html_class($key); |
|
126 | + $class = empty($action['class']) ? 'btn-dark' : sanitize_html_class($action['class']); |
|
127 | + $url = empty($action['url']) ? '#' : esc_url($action['url']); |
|
128 | + $attrs = empty($action['attrs']) ? '' : $action['attrs']; |
|
129 | + $anchor = sanitize_text_field($action['name']); |
|
130 | 130 | |
131 | 131 | echo "<a href='$url' class='btn btn-sm ml-1 $class $key' $attrs>$anchor</a>"; |
132 | 132 | } |
@@ -142,20 +142,20 @@ discard block |
||
142 | 142 | <div class="wpinv-receipt-details"> |
143 | 143 | |
144 | 144 | <h4 class="wpinv-details-t mb-3 mt-3"> |
145 | - <?php echo apply_filters( 'wpinv_receipt_details_title', __( 'Invoice Details', 'invoicing' ), $invoice ); ?> |
|
145 | + <?php echo apply_filters('wpinv_receipt_details_title', __('Invoice Details', 'invoicing'), $invoice); ?> |
|
146 | 146 | </h4> |
147 | 147 | |
148 | - <?php getpaid_invoice_meta( $invoice ); ?> |
|
148 | + <?php getpaid_invoice_meta($invoice); ?> |
|
149 | 149 | |
150 | 150 | </div> |
151 | 151 | |
152 | 152 | |
153 | - <?php do_action( 'wpinv_receipt_end', $invoice ); ?> |
|
153 | + <?php do_action('wpinv_receipt_end', $invoice); ?> |
|
154 | 154 | |
155 | 155 | </div> |
156 | 156 | |
157 | 157 | <?php |
158 | 158 | |
159 | 159 | // @deprecated |
160 | -do_action( 'wpinv_success_content_after', $invoice ); |
|
161 | -do_action( 'wpinv_after_receipt', $invoice ); |
|
160 | +do_action('wpinv_success_content_after', $invoice); |
|
161 | +do_action('wpinv_after_receipt', $invoice); |
@@ -7,22 +7,22 @@ |
||
7 | 7 | * @version 1.0.19 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
10 | +defined('ABSPATH') || exit; |
|
11 | 11 | |
12 | 12 | // Print the email header. |
13 | -do_action( 'wpinv_email_header', $email_heading, $invoice, $email_type, $sent_to_admin ); |
|
13 | +do_action('wpinv_email_header', $email_heading, $invoice, $email_type, $sent_to_admin); |
|
14 | 14 | |
15 | 15 | // Generate the custom message body. |
16 | 16 | echo $message_body; |
17 | 17 | |
18 | 18 | // Print invoice details. |
19 | -do_action( 'wpinv_email_invoice_details', $invoice, $email_type, $sent_to_admin ); |
|
19 | +do_action('wpinv_email_invoice_details', $invoice, $email_type, $sent_to_admin); |
|
20 | 20 | |
21 | 21 | // Print invoice items. |
22 | -do_action( 'wpinv_email_invoice_items', $invoice, $email_type, $sent_to_admin ); |
|
22 | +do_action('wpinv_email_invoice_items', $invoice, $email_type, $sent_to_admin); |
|
23 | 23 | |
24 | 24 | // Print the billing details. |
25 | -do_action( 'wpinv_email_billing_details', $invoice, $email_type, $sent_to_admin ); |
|
25 | +do_action('wpinv_email_billing_details', $invoice, $email_type, $sent_to_admin); |
|
26 | 26 | |
27 | 27 | // Print the email footer. |
28 | -do_action( 'wpinv_email_footer', $invoice, $email_type, $sent_to_admin ); |
|
28 | +do_action('wpinv_email_footer', $invoice, $email_type, $sent_to_admin); |
@@ -7,22 +7,22 @@ |
||
7 | 7 | * @version 1.0.19 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
10 | +defined('ABSPATH') || exit; |
|
11 | 11 | |
12 | 12 | // Print the email header. |
13 | -do_action( 'wpinv_email_header', $email_heading, $invoice, $email_type, $sent_to_admin ); |
|
13 | +do_action('wpinv_email_header', $email_heading, $invoice, $email_type, $sent_to_admin); |
|
14 | 14 | |
15 | 15 | // Generate the custom message body. |
16 | 16 | echo $message_body; |
17 | 17 | |
18 | 18 | // Print invoice details. |
19 | -do_action( 'wpinv_email_invoice_details', $invoice, $email_type, $sent_to_admin ); |
|
19 | +do_action('wpinv_email_invoice_details', $invoice, $email_type, $sent_to_admin); |
|
20 | 20 | |
21 | 21 | // Print invoice items. |
22 | -do_action( 'wpinv_email_invoice_items', $invoice, $email_type, $sent_to_admin ); |
|
22 | +do_action('wpinv_email_invoice_items', $invoice, $email_type, $sent_to_admin); |
|
23 | 23 | |
24 | 24 | // Print the billing details. |
25 | -do_action( 'wpinv_email_billing_details', $invoice, $email_type, $sent_to_admin ); |
|
25 | +do_action('wpinv_email_billing_details', $invoice, $email_type, $sent_to_admin); |
|
26 | 26 | |
27 | 27 | // Print the email footer. |
28 | -do_action( 'wpinv_email_footer', $invoice, $email_type, $sent_to_admin ); |
|
28 | +do_action('wpinv_email_footer', $invoice, $email_type, $sent_to_admin); |
@@ -7,22 +7,22 @@ |
||
7 | 7 | * @version 1.0.19 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
10 | +defined('ABSPATH') || exit; |
|
11 | 11 | |
12 | 12 | // Print the email header. |
13 | -do_action( 'wpinv_email_header', $email_heading, $invoice, $email_type, $sent_to_admin ); |
|
13 | +do_action('wpinv_email_header', $email_heading, $invoice, $email_type, $sent_to_admin); |
|
14 | 14 | |
15 | 15 | // Generate the custom message body. |
16 | 16 | echo $message_body; |
17 | 17 | |
18 | 18 | // Print invoice details. |
19 | -do_action( 'wpinv_email_invoice_details', $invoice, $email_type, $sent_to_admin ); |
|
19 | +do_action('wpinv_email_invoice_details', $invoice, $email_type, $sent_to_admin); |
|
20 | 20 | |
21 | 21 | // Print invoice items. |
22 | -do_action( 'wpinv_email_invoice_items', $invoice, $email_type, $sent_to_admin ); |
|
22 | +do_action('wpinv_email_invoice_items', $invoice, $email_type, $sent_to_admin); |
|
23 | 23 | |
24 | 24 | // Print the billing details. |
25 | -do_action( 'wpinv_email_billing_details', $invoice, $email_type, $sent_to_admin ); |
|
25 | +do_action('wpinv_email_billing_details', $invoice, $email_type, $sent_to_admin); |
|
26 | 26 | |
27 | 27 | // Print the email footer. |
28 | -do_action( 'wpinv_email_footer', $invoice, $email_type, $sent_to_admin ); |
|
28 | +do_action('wpinv_email_footer', $invoice, $email_type, $sent_to_admin); |
@@ -7,22 +7,22 @@ |
||
7 | 7 | * @version 1.0.19 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
10 | +defined('ABSPATH') || exit; |
|
11 | 11 | |
12 | 12 | // Print the email header. |
13 | -do_action( 'wpinv_email_header', $email_heading, $invoice, $email_type, $sent_to_admin ); |
|
13 | +do_action('wpinv_email_header', $email_heading, $invoice, $email_type, $sent_to_admin); |
|
14 | 14 | |
15 | 15 | // Generate the custom message body. |
16 | 16 | echo $message_body; |
17 | 17 | |
18 | 18 | // Print invoice details. |
19 | -do_action( 'wpinv_email_invoice_details', $invoice, $email_type, $sent_to_admin ); |
|
19 | +do_action('wpinv_email_invoice_details', $invoice, $email_type, $sent_to_admin); |
|
20 | 20 | |
21 | 21 | // Print invoice items. |
22 | -do_action( 'wpinv_email_invoice_items', $invoice, $email_type, $sent_to_admin ); |
|
22 | +do_action('wpinv_email_invoice_items', $invoice, $email_type, $sent_to_admin); |
|
23 | 23 | |
24 | 24 | // Print the billing details. |
25 | -do_action( 'wpinv_email_billing_details', $invoice, $email_type, $sent_to_admin ); |
|
25 | +do_action('wpinv_email_billing_details', $invoice, $email_type, $sent_to_admin); |
|
26 | 26 | |
27 | 27 | // Print the email footer. |
28 | -do_action( 'wpinv_email_footer', $invoice, $email_type, $sent_to_admin ); |
|
28 | +do_action('wpinv_email_footer', $invoice, $email_type, $sent_to_admin); |
@@ -7,22 +7,22 @@ |
||
7 | 7 | * @version 1.0.19 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
10 | +defined('ABSPATH') || exit; |
|
11 | 11 | |
12 | 12 | // Print the email header. |
13 | -do_action( 'wpinv_email_header', $email_heading, $invoice, $email_type, $sent_to_admin ); |
|
13 | +do_action('wpinv_email_header', $email_heading, $invoice, $email_type, $sent_to_admin); |
|
14 | 14 | |
15 | 15 | // Generate the custom message body. |
16 | 16 | echo $message_body; |
17 | 17 | |
18 | 18 | // Print invoice details. |
19 | -do_action( 'wpinv_email_invoice_details', $invoice, $email_type, $sent_to_admin ); |
|
19 | +do_action('wpinv_email_invoice_details', $invoice, $email_type, $sent_to_admin); |
|
20 | 20 | |
21 | 21 | // Print invoice items. |
22 | -do_action( 'wpinv_email_invoice_items', $invoice, $email_type, $sent_to_admin ); |
|
22 | +do_action('wpinv_email_invoice_items', $invoice, $email_type, $sent_to_admin); |
|
23 | 23 | |
24 | 24 | // Print the billing details. |
25 | -do_action( 'wpinv_email_billing_details', $invoice, $email_type, $sent_to_admin ); |
|
25 | +do_action('wpinv_email_billing_details', $invoice, $email_type, $sent_to_admin); |
|
26 | 26 | |
27 | 27 | // Print the email footer. |
28 | -do_action( 'wpinv_email_footer', $invoice, $email_type, $sent_to_admin ); |
|
28 | +do_action('wpinv_email_footer', $invoice, $email_type, $sent_to_admin); |