@@ -7,7 +7,7 @@ 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 | |
@@ -18,22 +18,22 @@ discard block |
||
18 | 18 | <?php |
19 | 19 | |
20 | 20 | // Fires when printing the header. |
21 | - do_action( 'getpaid_invoice_header', $invoice ); |
|
21 | + do_action('getpaid_invoice_header', $invoice); |
|
22 | 22 | |
23 | 23 | // Print the opening wrapper. |
24 | 24 | echo '<div class="container bg-white border mt-4 mb-4 p-4 position-relative flex-grow-1">'; |
25 | 25 | |
26 | 26 | // Fires when printing the invoice details. |
27 | - do_action( 'getpaid_invoice_details', $invoice ); |
|
27 | + do_action('getpaid_invoice_details', $invoice); |
|
28 | 28 | |
29 | 29 | // Fires when printing the invoice line items. |
30 | - do_action( 'getpaid_invoice_line_items', $invoice ); |
|
30 | + do_action('getpaid_invoice_line_items', $invoice); |
|
31 | 31 | |
32 | 32 | // Print the closing wrapper. |
33 | 33 | echo '</div>'; |
34 | 34 | |
35 | 35 | // Fires when printing the invoice footer. |
36 | - do_action( 'getpaid_invoice_footer', $invoice ); |
|
36 | + do_action('getpaid_invoice_footer', $invoice); |
|
37 | 37 | |
38 | 38 | ?> |
39 | 39 |
@@ -7,16 +7,16 @@ 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 | - <?php if ( $term_text = wpinv_get_terms_text() ) : ?> |
|
17 | + <?php if ($term_text = wpinv_get_terms_text()) : ?> |
|
18 | 18 | <div class="terms-text"> |
19 | - <?php echo wpautop( $term_text ); ?> |
|
19 | + <?php echo wpautop($term_text); ?> |
|
20 | 20 | </div> |
21 | 21 | <?php endif; ?> |
22 | 22 | |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | </div> |
26 | 26 | |
27 | 27 | <div class="print-only"> |
28 | - <?php _e( 'Page ', 'invoicing' ) ?> {PAGENO}/{nbpg} |
|
28 | + <?php _e('Page ', 'invoicing') ?> {PAGENO}/{nbpg} |
|
29 | 29 | </div> |
30 | 30 | |
31 | 31 | </div> |
@@ -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 | -$watermark = wpinv_watermark( $invoice->get_id() ) |
|
12 | +$watermark = wpinv_watermark($invoice->get_id()) |
|
13 | 13 | |
14 | 14 | ?> |
15 | 15 | |
16 | - <?php do_action( 'getpaid_before_invoice_details_top', $invoice ); ?> |
|
16 | + <?php do_action('getpaid_before_invoice_details_top', $invoice); ?> |
|
17 | 17 | |
18 | - <?php if ( ! empty( $watermark ) ) : ?> |
|
18 | + <?php if (!empty($watermark)) : ?> |
|
19 | 19 | |
20 | 20 | <div class="getpaid-watermark no-print"> |
21 | - <p><?php echo sanitize_text_field( $watermark ) ?></p> |
|
21 | + <p><?php echo sanitize_text_field($watermark) ?></p> |
|
22 | 22 | </div> |
23 | 23 | |
24 | 24 | <?php endif; ?> |
@@ -26,15 +26,15 @@ discard block |
||
26 | 26 | <div class="getpaid-invoice-details-top mt-3 mb-3"> |
27 | 27 | <div class="row"> |
28 | 28 | <div class="col-12 col-sm-6 text-left"> |
29 | - <?php do_action( 'getpaid_invoice_details_top_left', $invoice ); ?> |
|
29 | + <?php do_action('getpaid_invoice_details_top_left', $invoice); ?> |
|
30 | 30 | </div> |
31 | 31 | |
32 | 32 | <div class="col-12 col-sm-6 text-right"> |
33 | - <?php do_action( 'getpaid_invoice_details_top_right', $invoice ); ?> |
|
33 | + <?php do_action('getpaid_invoice_details_top_right', $invoice); ?> |
|
34 | 34 | </div> |
35 | 35 | </div> |
36 | 36 | </div> |
37 | 37 | |
38 | - <?php do_action( 'getpaid_after_invoice_details_top', $invoice ); ?> |
|
38 | + <?php do_action('getpaid_after_invoice_details_top', $invoice); ?> |
|
39 | 39 | |
40 | 40 | <?php |
@@ -7,10 +7,10 @@ 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() ); |
|
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 | |
@@ -21,36 +21,36 @@ discard block |
||
21 | 21 | |
22 | 22 | |
23 | 23 | <div class="invoice-billing-address-label col-2"> |
24 | - <strong><?php _e( 'To:', 'invoicing' ) ?></strong> |
|
24 | + <strong><?php _e('To:', 'invoicing') ?></strong> |
|
25 | 25 | </div> |
26 | 26 | |
27 | 27 | |
28 | 28 | <div class="invoice-billing-address-value col-10"> |
29 | 29 | |
30 | - <?php do_action( 'getpaid_billing_address_top' ); ?> |
|
30 | + <?php do_action('getpaid_billing_address_top'); ?> |
|
31 | 31 | |
32 | - <?php if ( ! empty( $address_row ) ) : ?> |
|
32 | + <?php if (!empty($address_row)) : ?> |
|
33 | 33 | <div class="billing-address"> |
34 | 34 | <?php echo $address_row; ?> |
35 | 35 | </div> |
36 | 36 | <?php endif; ?> |
37 | 37 | |
38 | 38 | |
39 | - <?php if ( ! empty( $phone ) ) : ?> |
|
39 | + <?php if (!empty($phone)) : ?> |
|
40 | 40 | <div class="billing-phone"> |
41 | - <?php echo wp_sprintf( __( 'Phone: %s', 'invoicing' ), esc_html( $phone ) ); ?> |
|
41 | + <?php echo wp_sprintf(__('Phone: %s', 'invoicing'), esc_html($phone)); ?> |
|
42 | 42 | </div> |
43 | 43 | <?php endif; ?> |
44 | 44 | |
45 | 45 | |
46 | - <?php if ( ! empty( $email ) ) : ?> |
|
46 | + <?php if (!empty($email)) : ?> |
|
47 | 47 | <div class="billing-email"> |
48 | - <?php echo wp_sprintf( __( 'Email: %s', 'invoicing' ), sanitize_email( $email ) ); ?> |
|
48 | + <?php echo wp_sprintf(__('Email: %s', 'invoicing'), sanitize_email($email)); ?> |
|
49 | 49 | </div> |
50 | 50 | <?php endif; ?> |
51 | 51 | |
52 | 52 | |
53 | - <?php do_action( 'getpaid_billing_address_bottom' ); ?> |
|
53 | + <?php do_action('getpaid_billing_address_bottom'); ?> |
|
54 | 54 | |
55 | 55 | </div> |
56 | 56 |
@@ -7,7 +7,7 @@ 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 | |
@@ -16,11 +16,11 @@ discard block |
||
16 | 16 | <div class="row"> |
17 | 17 | |
18 | 18 | <div class="col-12 col-sm-6 text-left pl-0"> |
19 | - <?php do_action( 'getpaid_invoice_header_left', $invoice );?> |
|
19 | + <?php do_action('getpaid_invoice_header_left', $invoice); ?> |
|
20 | 20 | </div> |
21 | 21 | |
22 | 22 | <div class="col-12 col-sm-6 text-right pr-0"> |
23 | - <?php do_action( 'getpaid_invoice_header_right', $invoice );?> |
|
23 | + <?php do_action('getpaid_invoice_header_right', $invoice); ?> |
|
24 | 24 | </div> |
25 | 25 | |
26 | 26 | </div> |
@@ -7,26 +7,26 @@ |
||
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_invoice_details_main', $invoice ); ?> |
|
14 | + <?php do_action('getpaid_before_invoice_details_main', $invoice); ?> |
|
15 | 15 | |
16 | 16 | <div class="getpaid-invoice-details mt-3 mb-3"> |
17 | 17 | <div class="row"> |
18 | 18 | |
19 | 19 | <div class="col-12 col-sm-6"> |
20 | - <?php do_action( 'getpaid_invoice_details_left', $invoice ); ?> |
|
20 | + <?php do_action('getpaid_invoice_details_left', $invoice); ?> |
|
21 | 21 | </div> |
22 | 22 | |
23 | 23 | <div class="col-12 col-sm-6"> |
24 | - <?php do_action( 'getpaid_invoice_details_right', $invoice ); ?> |
|
24 | + <?php do_action('getpaid_invoice_details_right', $invoice); ?> |
|
25 | 25 | </div> |
26 | 26 | |
27 | 27 | </div> |
28 | 28 | </div> |
29 | 29 | |
30 | - <?php do_action( 'getpaid_after_invoice_details_main', $invoice ); ?> |
|
30 | + <?php do_action('getpaid_after_invoice_details_main', $invoice); ?> |
|
31 | 31 | |
32 | 32 | <?php |
@@ -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 | 12 | // Fetch the invoice. |
13 | -$invoice = new WPInv_Invoice( $GLOBALS['post'] ); |
|
13 | +$invoice = new WPInv_Invoice($GLOBALS['post']); |
|
14 | 14 | |
15 | 15 | // Abort if it does not exist. |
16 | -if ( $invoice->get_id() == 0 ) { |
|
16 | +if ($invoice->get_id() == 0) { |
|
17 | 17 | exit; |
18 | 18 | } |
19 | 19 | |
20 | 20 | // Fires before printing an invoice. |
21 | -do_action( 'wpinv_invoice_print_before_display', $invoice ); |
|
21 | +do_action('wpinv_invoice_print_before_display', $invoice); |
|
22 | 22 | |
23 | 23 | ?><!DOCTYPE html> |
24 | 24 | |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | |
28 | 28 | <head> |
29 | 29 | |
30 | - <meta charset="<?php bloginfo( 'charset' ); ?>"> |
|
30 | + <meta charset="<?php bloginfo('charset'); ?>"> |
|
31 | 31 | <meta name="viewport" content="width=device-width, initial-scale=1.0" > |
32 | 32 | |
33 | 33 | <meta name="robots" content="noindex,nofollow"> |
@@ -36,15 +36,15 @@ discard block |
||
36 | 36 | |
37 | 37 | <title><?php wp_title() ?></title> |
38 | 38 | |
39 | - <?php do_action( 'wpinv_invoice_print_head', $invoice ); ?> |
|
39 | + <?php do_action('wpinv_invoice_print_head', $invoice); ?> |
|
40 | 40 | |
41 | 41 | </head> |
42 | 42 | |
43 | 43 | |
44 | 44 | <body class="body wpinv wpinv-print"> |
45 | 45 | |
46 | - <?php do_action( 'getpaid_invoice', $invoice ); ?> |
|
47 | - <?php do_action( 'wpinv_invoice_print_body_end', $invoice ); ?> |
|
46 | + <?php do_action('getpaid_invoice', $invoice); ?> |
|
47 | + <?php do_action('wpinv_invoice_print_body_end', $invoice); ?> |
|
48 | 48 | |
49 | 49 | </body> |
50 | 50 |
@@ -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 | // Make sure that the form is active. |
13 | -if ( ! $form->is_active() ) { |
|
13 | +if (!$form->is_active()) { |
|
14 | 14 | echo aui()->alert( |
15 | 15 | array( |
16 | 16 | 'type' => 'warning', |
17 | - 'content' => __( 'This payment form is no longer active', 'invoicing' ), |
|
17 | + 'content' => __('This payment form is no longer active', 'invoicing'), |
|
18 | 18 | ) |
19 | 19 | ); |
20 | 20 | return; |
21 | 21 | } |
22 | 22 | |
23 | 23 | // Fires before displaying a payment form. |
24 | -do_action( 'getpaid_before_payment_form', $form ); |
|
24 | +do_action('getpaid_before_payment_form', $form); |
|
25 | 25 | |
26 | 26 | ?> |
27 | 27 | |
@@ -31,44 +31,44 @@ discard block |
||
31 | 31 | <?php |
32 | 32 | |
33 | 33 | // Fires when printing the top of a payment form. |
34 | - do_action( 'getpaid_payment_form_top', $form ); |
|
34 | + do_action('getpaid_payment_form_top', $form); |
|
35 | 35 | |
36 | 36 | // Add the vat validation nonce. |
37 | - wp_nonce_field( 'vat_validation', '_wpi_nonce' ); |
|
37 | + wp_nonce_field('vat_validation', '_wpi_nonce'); |
|
38 | 38 | |
39 | 39 | // And the optional invoice id. |
40 | - if ( ! empty( $form->invoice ) ) { |
|
41 | - echo getpaid_hidden_field( 'invoice_id', $form->invoice->get_id() ); |
|
40 | + if (!empty($form->invoice)) { |
|
41 | + echo getpaid_hidden_field('invoice_id', $form->invoice->get_id()); |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | // We also want to include the form id. |
45 | - echo getpaid_hidden_field( 'form_id', $form->get_id() ); |
|
45 | + echo getpaid_hidden_field('form_id', $form->get_id()); |
|
46 | 46 | |
47 | 47 | // And an indication that this is a payment form submission. |
48 | - echo getpaid_hidden_field( 'getpaid_payment_form_submission', '1' ); |
|
48 | + echo getpaid_hidden_field('getpaid_payment_form_submission', '1'); |
|
49 | 49 | |
50 | 50 | // Fires before displaying payment form elements. |
51 | - do_action( 'getpaid_payment_form_before_elements', $form ); |
|
51 | + do_action('getpaid_payment_form_before_elements', $form); |
|
52 | 52 | |
53 | 53 | // Display the elements. |
54 | - foreach ( $form->get_elements() as $element ) { |
|
55 | - if ( isset( $element['type'] ) ) { |
|
56 | - do_action( 'getpaid_payment_form_element', $element, $form ); |
|
57 | - do_action( "getpaid_payment_form_element_{$element['type']}_template", $element, $form ); |
|
54 | + foreach ($form->get_elements() as $element) { |
|
55 | + if (isset($element['type'])) { |
|
56 | + do_action('getpaid_payment_form_element', $element, $form); |
|
57 | + do_action("getpaid_payment_form_element_{$element['type']}_template", $element, $form); |
|
58 | 58 | } |
59 | 59 | } |
60 | 60 | |
61 | 61 | // Fires after displaying payment form elements. |
62 | - do_action( 'getpaid_payment_form_after_elements', $form ); |
|
62 | + do_action('getpaid_payment_form_after_elements', $form); |
|
63 | 63 | |
64 | 64 | echo "<div class='getpaid-payment-form-errors alert alert-danger d-none'></div>"; |
65 | 65 | |
66 | - if ( wpinv_current_user_can_manage_invoicing() ) { |
|
66 | + if (wpinv_current_user_can_manage_invoicing()) { |
|
67 | 67 | |
68 | 68 | edit_post_link( |
69 | - __( 'Edit this form.', 'invoicing' ), |
|
69 | + __('Edit this form.', 'invoicing'), |
|
70 | 70 | '<small class="form-text text-muted">', |
71 | - ' ' . __( 'This is only visible to website administators.', 'invoicing' ) . '</small>', |
|
71 | + ' ' . __('This is only visible to website administators.', 'invoicing') . '</small>', |
|
72 | 72 | $form->get_id(), |
73 | 73 | 'text-danger' |
74 | 74 | ); |
@@ -82,4 +82,4 @@ discard block |
||
82 | 82 | <?php |
83 | 83 | |
84 | 84 | // Fires after displaying a payment form. |
85 | -do_action( 'getpaid_after_payment_form', $form ); |
|
85 | +do_action('getpaid_after_payment_form', $form); |
@@ -7,13 +7,13 @@ |
||
7 | 7 | * @version 1.0.19 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
10 | +defined('ABSPATH') || exit; |
|
11 | 11 | |
12 | -if ( empty( $text ) ) { |
|
13 | - $text = __( 'Total to pay:', 'invoicing' ); |
|
12 | +if (empty($text)) { |
|
13 | + $text = __('Total to pay:', 'invoicing'); |
|
14 | 14 | } |
15 | 15 | ?> |
16 | 16 | <div class="form-group mt-4"> |
17 | - <strong><?php echo sanitize_text_field( $text ); ?></strong> |
|
17 | + <strong><?php echo sanitize_text_field($text); ?></strong> |
|
18 | 18 | <span class="getpaid-checkout-total-payable"></span> |
19 | 19 | </div> |