Passed
Push — master ( f411ba...4d2fb8 )
by Brian
05:15
created
templates/emails/wpinv-email-processing_invoice.php 1 patch
Switch Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php
1
+    <?php
2 2
 /**
3 3
  * Template that generated the processing invoice email.
4 4
  *
@@ -7,22 +7,22 @@  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
-// 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 );
Please login to merge, or discard this patch.
templates/emails/wpinv-email-subscription_trial.php 1 patch
Switch Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php
1
+    <?php
2 2
 /**
3 3
  * Template that generates the trialling subscription email.
4 4
  *
@@ -8,18 +8,18 @@  discard block
 block discarded – undo
8 8
  * @var WPInv_Subscription $object
9 9
  */
10 10
 
11
-defined( 'ABSPATH' ) || exit;
11
+    defined( 'ABSPATH' ) || exit;
12 12
 
13
-$invoice = $object->get_parent_payment();
13
+    $invoice = $object->get_parent_payment();
14 14
 
15
-// Print the email header.
16
-do_action( 'wpinv_email_header', $email_heading, $invoice, $email_type, $sent_to_admin );
15
+    // Print the email header.
16
+    do_action( 'wpinv_email_header', $email_heading, $invoice, $email_type, $sent_to_admin );
17 17
 
18
-// Generate the custom message body.
19
-echo wp_kses_post( $message_body );
18
+    // Generate the custom message body.
19
+    echo wp_kses_post( $message_body );
20 20
 
21
-// Print the billing details.
22
-do_action( 'wpinv_email_billing_details', $invoice, $email_type, $sent_to_admin );
21
+    // Print the billing details.
22
+    do_action( 'wpinv_email_billing_details', $invoice, $email_type, $sent_to_admin );
23 23
 
24
-// Print the email footer.
25
-do_action( 'wpinv_email_footer', $invoice, $email_type, $sent_to_admin );
24
+    // Print the email footer.
25
+    do_action( 'wpinv_email_footer', $invoice, $email_type, $sent_to_admin );
Please login to merge, or discard this patch.
templates/emails/invoice-totals.php 1 patch
Switch Indentation   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php
1
+    <?php
2 2
 /**
3 3
  * Displays invoice totals in emails.
4 4
  *
@@ -8,17 +8,17 @@  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
-// Totals rows.
14
-$totals = getpaid_invoice_totals_rows( $invoice );
13
+    // Totals rows.
14
+    $totals = getpaid_invoice_totals_rows( $invoice );
15 15
 
16
-do_action( 'getpaid_before_email_line_totals', $invoice, $totals );
16
+    do_action( 'getpaid_before_email_line_totals', $invoice, $totals );
17 17
 
18
-?>
18
+    ?>
19
+    
19 20
 
20
-
21
-<?php if ( has_action( 'wpinv_email_footer_buttons' ) ) : ?>
21
+    <?php if ( has_action( 'wpinv_email_footer_buttons' ) ) : ?>
22 22
 
23 23
     <tr class="wpinv_cart_footer_row">
24 24
 
@@ -29,9 +29,9 @@  discard block
 block discarded – undo
29 29
     </tr>
30 30
 
31 31
 <?php endif; ?>
32
+    
32 33
 
33
-
34
-<?php foreach ( $totals as $key => $label ) : ?>
34
+    <?php foreach ( $totals as $key => $label ) : ?>
35 35
 
36 36
     <tr class="wpinv_cart_footer_row wpinv_cart_<?php echo esc_html( $key ); ?>_row">
37 37
 
@@ -43,41 +43,41 @@  discard block
 block discarded – undo
43 43
 
44 44
             <?php
45 45
 
46
-                // Total tax.
47
-                if ( 'tax' == $key ) {
48
-                    wpinv_the_price( $invoice->get_total_tax(), $invoice->get_currency() );
49
-                }
46
+                    // Total tax.
47
+                    if ( 'tax' == $key ) {
48
+                        wpinv_the_price( $invoice->get_total_tax(), $invoice->get_currency() );
49
+                    }
50 50
 
51
-                if ( 'fee' == $key ) {
52
-                    wpinv_the_price( $invoice->get_total_fees(), $invoice->get_currency() );
53
-                }
51
+                    if ( 'fee' == $key ) {
52
+                        wpinv_the_price( $invoice->get_total_fees(), $invoice->get_currency() );
53
+                    }
54 54
 
55
-                // Total discount.
56
-                if ( 'discount' == $key ) {
57
-                    wpinv_the_price( $invoice->get_total_discount(), $invoice->get_currency() );
58
-                }
55
+                    // Total discount.
56
+                    if ( 'discount' == $key ) {
57
+                        wpinv_the_price( $invoice->get_total_discount(), $invoice->get_currency() );
58
+                    }
59 59
 
60
-                // Sub total.
61
-                if ( 'subtotal' == $key ) {
62
-                    wpinv_the_price( $invoice->get_subtotal(), $invoice->get_currency() );
63
-                }
60
+                    // Sub total.
61
+                    if ( 'subtotal' == $key ) {
62
+                        wpinv_the_price( $invoice->get_subtotal(), $invoice->get_currency() );
63
+                    }
64 64
 
65
-                // Total.
66
-                if ( 'total' == $key ) {
67
-                    wpinv_the_price( $invoice->get_total(), $invoice->get_currency() );
68
-                }
65
+                    // Total.
66
+                    if ( 'total' == $key ) {
67
+                        wpinv_the_price( $invoice->get_total(), $invoice->get_currency() );
68
+                    }
69 69
 
70
-                // Fires when printing a cart total in an email.
71
-                do_action( "getpaid_email_cart_totals_$key", $invoice );
70
+                    // Fires when printing a cart total in an email.
71
+                    do_action( "getpaid_email_cart_totals_$key", $invoice );
72 72
 
73
-            ?>
73
+                ?>
74 74
 
75 75
         </td>
76 76
 
77 77
     </tr>
78 78
 
79 79
 <?php endforeach; ?>
80
+    
81
+    <?php
80 82
 
81
-<?php
82
-
83
-    do_action( 'getpaid_after_email_line_totals', $invoice, $totals );
83
+        do_action( 'getpaid_after_email_line_totals', $invoice, $totals );
Please login to merge, or discard this patch.
templates/emails/wpinv-email-user_invoice.php 1 patch
Switch Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php
1
+    <?php
2 2
 /**
3 3
  * Template that generates the user invoice email.
4 4
  *
@@ -7,22 +7,22 @@  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
-// 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 );
Please login to merge, or discard this patch.
templates/emails/wpinv-email-onhold_invoice.php 1 patch
Switch Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php
1
+    <?php
2 2
 /**
3 3
  * Template that generated the onhold invoice email.
4 4
  *
@@ -7,22 +7,22 @@  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
-// 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 );
Please login to merge, or discard this patch.
templates/frontend-footer.php 1 patch
Switch Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php
1
+    <?php
2 2
 /**
3 3
  * Template that prints additional code in the footer when viewing a blog on the frontend..
4 4
  *
@@ -7,9 +7,9 @@  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
+    ?>
13 13
 
14 14
 <div class="bsui">
15 15
 	<div  id="getpaid-payment-modal" class="modal" tabindex="-1" role="dialog">
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 				<div class="modal-body">
19 19
 					<button type="button" class=" btn-close p-2 getpaid-payment-modal-close d-sm-none" data-dismiss="modal" aria-label="<?php esc_attr__( 'Close', 'invoicing' ); ?>">
20 20
 						<?php if ( empty( $GLOBALS['aui_bs5'] ) ) : ?>
21
-                            <span aria-hidden="true">×</span>
21
+                                <span aria-hidden="true">×</span>
22 22
                         <?php endif; ?>
23 23
 					</button>
24 24
 					<div class="modal-body-wrapper"></div>
Please login to merge, or discard this patch.
templates/wpinv-invalid-access.php 1 patch
Switch Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php
1
+    <?php
2 2
 /**
3 3
  * Template that prints the invoice page.
4 4
  *
@@ -7,14 +7,14 @@  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
-// 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
 block discarded – undo
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">
Please login to merge, or discard this patch.
templates/invoice/invoice-type.php 1 patch
Switch Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php
1
+    <?php
2 2
 /**
3 3
  * Displays right side of the type of invoice.
4 4
  *
@@ -7,11 +7,11 @@  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
-?>
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
Please login to merge, or discard this patch.
templates/invoice/company-address.php 1 patch
Switch Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php
1
+    <?php
2 2
 /**
3 3
  * Displays the company address.
4 4
  *
@@ -7,19 +7,19 @@  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
-// 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
 block discarded – undo
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>
Please login to merge, or discard this patch.