@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php |
|
1 | + <?php |
|
2 | 2 | /** |
3 | 3 | * Template that generated the onhold invoice email. |
4 | 4 | * |
@@ -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 | -// Print the email header. |
|
13 | -do_action( 'wpinv_email_header', $email_heading, $invoice, $email_type, $sent_to_admin ); |
|
12 | + // Print the email header. |
|
13 | + do_action( 'wpinv_email_header', $email_heading, $invoice, $email_type, $sent_to_admin ); |
|
14 | 14 | |
15 | -// Generate the custom message body. |
|
16 | -echo wp_kses_post( $message_body ); |
|
15 | + // Generate the custom message body. |
|
16 | + echo wp_kses_post( $message_body ); |
|
17 | 17 | |
18 | -// Print invoice details. |
|
19 | -do_action( 'wpinv_email_invoice_details', $invoice, $email_type, $sent_to_admin ); |
|
18 | + // Print invoice details. |
|
19 | + do_action( 'wpinv_email_invoice_details', $invoice, $email_type, $sent_to_admin ); |
|
20 | 20 | |
21 | -// Print invoice items. |
|
22 | -do_action( 'wpinv_email_invoice_items', $invoice, $email_type, $sent_to_admin ); |
|
21 | + // Print invoice items. |
|
22 | + do_action( 'wpinv_email_invoice_items', $invoice, $email_type, $sent_to_admin ); |
|
23 | 23 | |
24 | -// Print the billing details. |
|
25 | -do_action( 'wpinv_email_billing_details', $invoice, $email_type, $sent_to_admin ); |
|
24 | + // Print the billing details. |
|
25 | + do_action( 'wpinv_email_billing_details', $invoice, $email_type, $sent_to_admin ); |
|
26 | 26 | |
27 | -// Print the email footer. |
|
28 | -do_action( 'wpinv_email_footer', $invoice, $email_type, $sent_to_admin ); |
|
27 | + // Print the email footer. |
|
28 | + do_action( 'wpinv_email_footer', $invoice, $email_type, $sent_to_admin ); |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php |
|
1 | + <?php |
|
2 | 2 | /** |
3 | 3 | * Template that prints the invoice page. |
4 | 4 | * |
@@ -7,14 +7,14 @@ discard block |
||
7 | 7 | * @version 1.0.19 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
10 | + defined( 'ABSPATH' ) || exit; |
|
11 | 11 | |
12 | -// Fetch the invoice. |
|
13 | -if ( empty( $invoice ) ) { |
|
14 | - $invoice = new WPInv_Invoice( $GLOBALS['post'] ); |
|
12 | + // Fetch the invoice. |
|
13 | + if ( empty( $invoice ) ) { |
|
14 | + $invoice = new WPInv_Invoice( $GLOBALS['post'] ); |
|
15 | 15 | } |
16 | 16 | |
17 | -?><!DOCTYPE html> |
|
17 | + ?><!DOCTYPE html> |
|
18 | 18 | |
19 | 19 | <html <?php language_attributes(); ?> class="bsui"> |
20 | 20 | |
@@ -39,24 +39,24 @@ discard block |
||
39 | 39 | |
40 | 40 | <?php |
41 | 41 | |
42 | - if ( ! $invoice->exists() || $invoice->is_draft() ) { |
|
43 | - $error = __( 'This invoice was deleted or is not visible.', 'invoicing' ); |
|
44 | - } else { |
|
45 | - |
|
46 | - $user_id = get_current_user_id(); |
|
47 | - if ( wpinv_require_login_to_checkout() && empty( $user_id ) ) { |
|
48 | - $error = __( 'You must be logged in to view this invoice.', 'invoicing' ); |
|
49 | - $error .= sprintf( |
|
50 | - ' <a href="%s">%s</a>', |
|
51 | - wp_login_url( $invoice->get_view_url() ), |
|
52 | - __( 'Login.', 'invoicing' ) |
|
53 | - ); |
|
54 | - } else { |
|
55 | - $error = __( 'This invoice is only viewable by clicking on the invoice link that was sent to you via email.', 'invoicing' ); |
|
56 | - } |
|
42 | + if ( ! $invoice->exists() || $invoice->is_draft() ) { |
|
43 | + $error = __( 'This invoice was deleted or is not visible.', 'invoicing' ); |
|
44 | + } else { |
|
45 | + |
|
46 | + $user_id = get_current_user_id(); |
|
47 | + if ( wpinv_require_login_to_checkout() && empty( $user_id ) ) { |
|
48 | + $error = __( 'You must be logged in to view this invoice.', 'invoicing' ); |
|
49 | + $error .= sprintf( |
|
50 | + ' <a href="%s">%s</a>', |
|
51 | + wp_login_url( $invoice->get_view_url() ), |
|
52 | + __( 'Login.', 'invoicing' ) |
|
53 | + ); |
|
54 | + } else { |
|
55 | + $error = __( 'This invoice is only viewable by clicking on the invoice link that was sent to you via email.', 'invoicing' ); |
|
56 | + } |
|
57 | 57 | } |
58 | 58 | |
59 | - ?> |
|
59 | + ?> |
|
60 | 60 | |
61 | 61 | <div class="container"> |
62 | 62 | <div class="alert alert-danger m-5" role="alert"> |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php |
|
1 | + <?php |
|
2 | 2 | /** |
3 | 3 | * Displays right side of the type of invoice. |
4 | 4 | * |
@@ -7,11 +7,11 @@ discard block |
||
7 | 7 | * @version 1.0.19 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
10 | + defined( 'ABSPATH' ) || exit; |
|
11 | 11 | |
12 | -?> |
|
13 | -<h2 class="h3 text-dark"> |
|
12 | + ?> |
|
13 | + <h2 class="h3 text-dark"> |
|
14 | 14 | <?php echo esc_html( apply_filters( 'getpaid_invoice_type_label', esc_html( ucfirst( $invoice->get_invoice_quote_type() ) ), $invoice ) ); ?> |
15 | -</h2> |
|
15 | + </h2> |
|
16 | 16 | |
17 | -<?php |
|
17 | + <?php |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php |
|
1 | + <?php |
|
2 | 2 | /** |
3 | 3 | * Displays the company address. |
4 | 4 | * |
@@ -7,19 +7,19 @@ discard block |
||
7 | 7 | * @version 1.0.19 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
10 | + defined( 'ABSPATH' ) || exit; |
|
11 | 11 | |
12 | -// Prepare the company name. |
|
13 | -$company_name = wpinv_get_option( 'vat_company_name' ); |
|
12 | + // Prepare the company name. |
|
13 | + $company_name = wpinv_get_option( 'vat_company_name' ); |
|
14 | 14 | |
15 | -if ( empty( $company_name ) ) { |
|
16 | - $company_name = wpinv_get_business_name(); |
|
15 | + if ( empty( $company_name ) ) { |
|
16 | + $company_name = wpinv_get_business_name(); |
|
17 | 17 | } |
18 | 18 | |
19 | -// Prepare the VAT number. |
|
20 | -$vat_number = wpinv_get_option( 'vat_number' ); |
|
19 | + // Prepare the VAT number. |
|
20 | + $vat_number = wpinv_get_option( 'vat_number' ); |
|
21 | 21 | |
22 | -?> |
|
22 | + ?> |
|
23 | 23 | <div class="getpaid-company-address form-group mb-3"> |
24 | 24 | |
25 | 25 | <div class="row"> |
@@ -39,21 +39,21 @@ discard block |
||
39 | 39 | </div> |
40 | 40 | |
41 | 41 | <?php if ( $address = wpinv_get_business_address() ) { ?> |
42 | - <?php echo wp_kses_post( $address ); ?> |
|
43 | - <?php } ?> |
|
44 | - |
|
42 | + <?php echo wp_kses_post( $address ); ?> |
|
43 | + <?php } ?> |
|
44 | + |
|
45 | 45 | <?php if ( $email_from = wpinv_mail_get_from_address() ) { ?> |
46 | - <div class="email_from"> |
|
46 | + <div class="email_from"> |
|
47 | 47 | <?php echo wp_sprintf( esc_html__( 'Email: %s', 'invoicing' ), esc_html( $email_from ) ); ?> |
48 | - </div> |
|
48 | + </div> |
|
49 | 49 | <?php } ?> |
50 | - |
|
50 | + |
|
51 | 51 | <?php if ( ! empty( $vat_number ) ) { ?> |
52 | - <div class="email_from"> |
|
52 | + <div class="email_from"> |
|
53 | 53 | <?php echo wp_sprintf( esc_html__( 'VAT Number: %s', 'invoicing' ), esc_html( $vat_number ) ); ?> |
54 | - </div> |
|
54 | + </div> |
|
55 | 55 | <?php } ?> |
56 | - |
|
56 | + |
|
57 | 57 | <?php do_action( 'getpaid_company_address_bottom' ); ?> |
58 | 58 | |
59 | 59 | </div> |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php |
|
1 | + <?php |
|
2 | 2 | /** |
3 | 3 | * Displays the invoice header. |
4 | 4 | * |
@@ -7,9 +7,9 @@ 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 | 14 | <div class="d-print-none border-bottom pt-3 pb-3 bg-white"> |
15 | 15 | <div class="container"> |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php |
|
1 | + <?php |
|
2 | 2 | /** |
3 | 3 | * Displays the invoice title, type etc. |
4 | 4 | * |
@@ -7,10 +7,10 @@ discard block |
||
7 | 7 | * @version 1.0.19 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
11 | - |
|
12 | -?> |
|
10 | + defined( 'ABSPATH' ) || exit; |
|
13 | 11 | |
12 | + ?> |
|
13 | + |
|
14 | 14 | <?php do_action( 'getpaid_before_invoice_details_top', $invoice ); ?> |
15 | 15 | |
16 | 16 | <div class="getpaid-invoice-details-top mb-5"> |
@@ -26,5 +26,5 @@ discard block |
||
26 | 26 | </div> |
27 | 27 | |
28 | 28 | <?php do_action( 'getpaid_after_invoice_details_top', $invoice ); ?> |
29 | - |
|
30 | -<?php |
|
29 | + |
|
30 | + <?php |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php |
|
1 | + <?php |
|
2 | 2 | /** |
3 | 3 | * Displays the billing address. |
4 | 4 | * |
@@ -7,15 +7,15 @@ discard block |
||
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() ); |
|
14 | -$phone = $invoice->get_phone(); |
|
15 | -$email = $invoice->get_email(); |
|
16 | -$vat_number = $invoice->get_vat_number(); |
|
17 | -$company_id = $invoice->get_company_id(); |
|
18 | -?> |
|
12 | + $invoice = new WPInv_Invoice( $invoice ); |
|
13 | + $address_row = wpinv_get_invoice_address_markup( $invoice->get_user_info() ); |
|
14 | + $phone = $invoice->get_phone(); |
|
15 | + $email = $invoice->get_email(); |
|
16 | + $vat_number = $invoice->get_vat_number(); |
|
17 | + $company_id = $invoice->get_company_id(); |
|
18 | + ?> |
|
19 | 19 | <div class="getpaid-billing-address form-group mb-3 text-break"> |
20 | 20 | |
21 | 21 | <div class="row"> |
@@ -29,39 +29,39 @@ discard block |
||
29 | 29 | <div class="invoice-billing-address-value col-10"> |
30 | 30 | |
31 | 31 | <?php do_action( 'getpaid_billing_address_top' ); ?> |
32 | - |
|
32 | + |
|
33 | 33 | <?php if ( ! empty( $address_row ) ) : ?> |
34 | - <div class="billing-address"> |
|
34 | + <div class="billing-address"> |
|
35 | 35 | <?php echo wp_kses_post( $address_row ); ?> |
36 | - </div> |
|
36 | + </div> |
|
37 | 37 | <?php endif; ?> |
38 | - |
|
38 | + |
|
39 | 39 | |
40 | 40 | <?php if ( ! empty( $phone ) ) : ?> |
41 | - <div class="billing-phone"> |
|
41 | + <div class="billing-phone"> |
|
42 | 42 | <?php echo wp_sprintf( esc_html__( 'Phone: %s', 'invoicing' ), esc_html( $phone ) ); ?> |
43 | - </div> |
|
43 | + </div> |
|
44 | 44 | <?php endif; ?> |
45 | - |
|
45 | + |
|
46 | 46 | |
47 | 47 | <?php if ( ! empty( $email ) ) : ?> |
48 | - <div class="billing-email"> |
|
48 | + <div class="billing-email"> |
|
49 | 49 | <?php echo wp_sprintf( esc_html__( 'Email: %s', 'invoicing' ), esc_html( $email ) ); ?> |
50 | - </div> |
|
50 | + </div> |
|
51 | 51 | <?php endif; ?> |
52 | - |
|
52 | + |
|
53 | 53 | <?php if ( ! empty( $vat_number ) ) : ?> |
54 | - <div class="vat-number"> |
|
54 | + <div class="vat-number"> |
|
55 | 55 | <?php echo wp_sprintf( esc_html__( 'Vat Number: %s', 'invoicing' ), esc_html( $vat_number ) ); ?> |
56 | - </div> |
|
56 | + </div> |
|
57 | 57 | <?php endif; ?> |
58 | - |
|
58 | + |
|
59 | 59 | <?php if ( ! empty( $company_id ) ) : ?> |
60 | - <div class="company-id"> |
|
60 | + <div class="company-id"> |
|
61 | 61 | <?php echo wp_sprintf( esc_html__( 'Company ID: %s', 'invoicing' ), esc_html( $company_id ) ); ?> |
62 | - </div> |
|
62 | + </div> |
|
63 | 63 | <?php endif; ?> |
64 | - |
|
64 | + |
|
65 | 65 | <?php do_action( 'getpaid_billing_address_bottom' ); ?> |
66 | 66 | |
67 | 67 | </div> |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php |
|
1 | + <?php |
|
2 | 2 | /** |
3 | 3 | * Displays the invoice footer. |
4 | 4 | * |
@@ -7,17 +7,17 @@ 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 | 14 | <div class="border-top pt-4 bg-white"> |
15 | 15 | <div class="container pr-0 pl-0"> |
16 | 16 | |
17 | 17 | <?php if ( $term_text = wpinv_get_terms_text() ) : ?> |
18 | - <div class="terms-text"> |
|
18 | + <div class="terms-text"> |
|
19 | 19 | <?php echo wp_kses_post( wpautop( $term_text ) ); ?> |
20 | - </div> |
|
20 | + </div> |
|
21 | 21 | <?php endif; ?> |
22 | 22 | |
23 | 23 | <div class="footer-text d-print-none"> |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php |
|
1 | + <?php |
|
2 | 2 | /** |
3 | 3 | * Displays the invoice meta data. |
4 | 4 | * |
@@ -7,23 +7,23 @@ discard block |
||
7 | 7 | * @version 1.0.19 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
11 | - |
|
12 | -$class = ! is_singular( 'page' ) ? 'px-1' : ''; |
|
13 | -?> |
|
10 | + defined( 'ABSPATH' ) || exit; |
|
14 | 11 | |
12 | + $class = ! is_singular( 'page' ) ? 'px-1' : ''; |
|
13 | + ?> |
|
14 | + |
|
15 | 15 | <?php do_action( 'getpaid_before_invoice_meta', $invoice ); ?> |
16 | - <div class="getpaid-invoice-meta-data"> |
|
16 | + <div class="getpaid-invoice-meta-data"> |
|
17 | 17 | |
18 | 18 | <?php do_action( 'getpaid_before_invoice_meta_table', $invoice ); ?> |
19 | 19 | <table class="table table-bordered"> |
20 | 20 | <tbody> |
21 | 21 | |
22 | 22 | <?php do_action( 'getpaid_before_invoice_meta_rows', $invoice ); ?> |
23 | - <?php foreach ( $meta as $key => $data ) : ?> |
|
24 | - |
|
23 | + <?php foreach ( $meta as $key => $data ) : ?> |
|
24 | + |
|
25 | 25 | <?php if ( ! empty( $data['value'] ) ) : ?> |
26 | - |
|
26 | + |
|
27 | 27 | <?php do_action( "getpaid_before_invoice_meta_$key", $invoice, $data ); ?> |
28 | 28 | |
29 | 29 | <tr class="getpaid-invoice-meta-<?php echo esc_attr( $key ); ?>"> |
@@ -39,11 +39,11 @@ discard block |
||
39 | 39 | </tr> |
40 | 40 | |
41 | 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> |
@@ -52,5 +52,5 @@ discard block |
||
52 | 52 | |
53 | 53 | </div> |
54 | 54 | <?php do_action( 'getpaid_after_invoice_meta', $invoice ); ?> |
55 | - |
|
56 | -<?php |
|
55 | + |
|
56 | + <?php |