Passed
Push — master ( 55fff1...2692d4 )
by Brian
16:18
created
assets/index.php 1 patch
Switch Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,2 +1,2 @@
 block discarded – undo
1
-<?php
1
+    <?php
2 2
 # Silence is golden.
3 3
\ No newline at end of file
Please login to merge, or discard this patch.
index.php 1 patch
Switch Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,2 +1,2 @@
 block discarded – undo
1
-<?php
1
+    <?php
2 2
 # Silence is golden.
3 3
\ No newline at end of file
Please login to merge, or discard this patch.
templates/emails/invoice-totals.php 1 patch
Switch Indentation   +39 added lines, -39 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,46 +43,46 @@  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
-                // Individual taxes.
52
-                if ( 0 === strpos( $key, 'tax__' ) ) {
53
-                    wpinv_the_price( $invoice->get_tax_total_by_name( str_replace( 'tax__', '', $key ) ), $invoice->get_currency() );
54
-                }
51
+                    // Individual taxes.
52
+                    if ( 0 === strpos( $key, 'tax__' ) ) {
53
+                        wpinv_the_price( $invoice->get_tax_total_by_name( str_replace( 'tax__', '', $key ) ), $invoice->get_currency() );
54
+                    }
55 55
 
56
-                if ( 'fee' == $key ) {
57
-                    wpinv_the_price( $invoice->get_total_fees(), $invoice->get_currency() );
58
-                }
56
+                    if ( 'fee' == $key ) {
57
+                        wpinv_the_price( $invoice->get_total_fees(), $invoice->get_currency() );
58
+                    }
59 59
 
60
-                // Total discount.
61
-                if ( 'discount' == $key ) {
62
-                    wpinv_the_price( $invoice->get_total_discount(), $invoice->get_currency() );
63
-                }
60
+                    // Total discount.
61
+                    if ( 'discount' == $key ) {
62
+                        wpinv_the_price( $invoice->get_total_discount(), $invoice->get_currency() );
63
+                    }
64 64
 
65
-                // Sub total.
66
-                if ( 'subtotal' == $key ) {
67
-                    wpinv_the_price( $invoice->get_subtotal(), $invoice->get_currency() );
68
-                }
65
+                    // Sub total.
66
+                    if ( 'subtotal' == $key ) {
67
+                        wpinv_the_price( $invoice->get_subtotal(), $invoice->get_currency() );
68
+                    }
69 69
 
70
-                // Total.
71
-                if ( 'total' == $key ) {
72
-                    wpinv_the_price( $invoice->get_total(), $invoice->get_currency() );
73
-                }
70
+                    // Total.
71
+                    if ( 'total' == $key ) {
72
+                        wpinv_the_price( $invoice->get_total(), $invoice->get_currency() );
73
+                    }
74 74
 
75
-                // Fires when printing a cart total in an email.
76
-                do_action( "getpaid_email_cart_totals_$key", $invoice );
75
+                    // Fires when printing a cart total in an email.
76
+                    do_action( "getpaid_email_cart_totals_$key", $invoice );
77 77
 
78
-            ?>
78
+                ?>
79 79
 
80 80
         </td>
81 81
 
82 82
     </tr>
83 83
 
84 84
 <?php endforeach; ?>
85
+    
86
+    <?php
85 87
 
86
-<?php
87
-
88
-    do_action( 'getpaid_after_email_line_totals', $invoice, $totals );
88
+        do_action( 'getpaid_after_email_line_totals', $invoice, $totals );
Please login to merge, or discard this patch.
templates/invoice/header-right-actions.php 1 patch
Switch Indentation   +34 added lines, -34 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 invoice header.
4 4
  *
@@ -8,56 +8,56 @@  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
-?>
13
+    ?>
14 14
 
15 15
     <div class="getpaid-header-right-actions">
16 16
 
17 17
         <?php
18 18
 
19
-            $actions   = array();
19
+                $actions   = array();
20 20
 
21
-            echo sprintf(
22
-                '<a href="javascript:void(0)" class="btn btn-sm m-1 d-inline-block btn-secondary text-white invoice-action-print d-none d-lg-inline-block" onclick="window.print();">%s</a>',
23
-                sprintf(
24
-                    esc_html__( 'Print %s', 'invoicing' ),
25
-                    esc_html( ucfirst( $invoice->get_invoice_quote_type() ) )
26
-                )
27
-            );
28
-
29
-            if ( is_user_logged_in() ) {
30
-
31
-                $actions[] = sprintf(
32
-                    '<a href="%s" class="btn btn-sm btn-secondary text-white m-1 d-inline-block invoice-action-history">%s</a>',
33
-                    esc_url( wpinv_get_history_page_uri( $invoice->get_post_type() ) ),
21
+                echo sprintf(
22
+                    '<a href="javascript:void(0)" class="btn btn-sm m-1 d-inline-block btn-secondary text-white invoice-action-print d-none d-lg-inline-block" onclick="window.print();">%s</a>',
34 23
                     sprintf(
35
-                        __( '%s History', 'invoicing' ),
24
+                        esc_html__( 'Print %s', 'invoicing' ),
36 25
                         esc_html( ucfirst( $invoice->get_invoice_quote_type() ) )
37 26
                     )
38 27
                 );
39 28
 
40
-            }
29
+                if ( is_user_logged_in() ) {
41 30
 
42
-            if ( wpinv_current_user_can_manage_invoicing() ) {
31
+                    $actions[] = sprintf(
32
+                        '<a href="%s" class="btn btn-sm btn-secondary text-white m-1 d-inline-block invoice-action-history">%s</a>',
33
+                        esc_url( wpinv_get_history_page_uri( $invoice->get_post_type() ) ),
34
+                        sprintf(
35
+                            __( '%s History', 'invoicing' ),
36
+                            esc_html( ucfirst( $invoice->get_invoice_quote_type() ) )
37
+                        )
38
+                    );
43 39
 
44
-                $actions[] = sprintf(
45
-                    '<a href="%s" class="btn btn-sm btn-secondary text-white m-1 d-inline-block invoice-action-edit">%s</a>',
46
-                    esc_url( get_edit_post_link( $invoice->get_id() ) ),
47
-                    sprintf(
48
-                        __( 'Edit %s', 'invoicing' ),
49
-                        esc_html( ucfirst( $invoice->get_invoice_quote_type() ) )
50
-                    )
51
-                );
40
+                }
41
+
42
+                if ( wpinv_current_user_can_manage_invoicing() ) {
52 43
 
53
-            }
44
+                    $actions[] = sprintf(
45
+                        '<a href="%s" class="btn btn-sm btn-secondary text-white m-1 d-inline-block invoice-action-edit">%s</a>',
46
+                        esc_url( get_edit_post_link( $invoice->get_id() ) ),
47
+                        sprintf(
48
+                            __( 'Edit %s', 'invoicing' ),
49
+                            esc_html( ucfirst( $invoice->get_invoice_quote_type() ) )
50
+                        )
51
+                    );
54 52
 
55
-            $actions = apply_filters( 'getpaid_invoice_header_right_actions_array', $actions, $invoice );
56
-            echo wp_kses_post( implode( '', $actions ) );
53
+                }
57 54
 
58
-        ?>
55
+                $actions = apply_filters( 'getpaid_invoice_header_right_actions_array', $actions, $invoice );
56
+                echo wp_kses_post( implode( '', $actions ) );
59 57
 
58
+            ?>
59
+    
60 60
         <?php do_action( 'wpinv_invoice_display_right_actions', $invoice ); ?>
61
-    </div>
61
+        </div>
62 62
 
63
-<?php
63
+    <?php
Please login to merge, or discard this patch.
templates/invoice/line-totals.php 1 patch
Switch Indentation   +49 added lines, -49 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
 /**
4 4
  * Displays invoice cart totals
@@ -9,14 +9,14 @@  discard block
 block discarded – undo
9 9
  * @var WPInv_Invoice $invoice
10 10
  */
11 11
 
12
-defined( 'ABSPATH' ) || exit;
12
+    defined( 'ABSPATH' ) || exit;
13 13
 
14
-// Totals rows.
15
-$totals = getpaid_invoice_totals_rows( $invoice );
14
+    // Totals rows.
15
+    $totals = getpaid_invoice_totals_rows( $invoice );
16 16
 
17
-do_action( 'getpaid_before_invoice_line_totals', $invoice, $totals );
17
+    do_action( 'getpaid_before_invoice_line_totals', $invoice, $totals );
18 18
 
19
-?>
19
+    ?>
20 20
 <div class='getpaid-invoice-line-totals'>
21 21
     <div class="row">
22 22
         <div class="col-12 offset-sm-6 col-sm-6 border-sm-left pl-sm-0">
@@ -35,65 +35,65 @@  discard block
 block discarded – undo
35 35
 
36 36
                             <?php
37 37
 
38
-                                // Total tax.
39
-                                if ( 'tax' === $key ) {
40
-                                    wpinv_the_price( $invoice->get_total_tax(), $invoice->get_currency() );
38
+                                    // Total tax.
39
+                                    if ( 'tax' === $key ) {
40
+                                        wpinv_the_price( $invoice->get_total_tax(), $invoice->get_currency() );
41 41
 
42
-                                    if ( wpinv_use_taxes() && ! $invoice->get_disable_taxes() ) {
42
+                                        if ( wpinv_use_taxes() && ! $invoice->get_disable_taxes() ) {
43 43
 
44
-                                        $taxes = $invoice->get_total_tax();
45
-                                        if ( empty( $taxes ) && GetPaid_Payment_Form_Submission_Taxes::is_eu_transaction( $invoice->get_country() ) ) {
46
-                                            echo ' <em class="text-muted small">';
47
-                                            _x( '(Reverse charged)', 'This is a legal term for reverse charging tax in the EU', 'invoicing' );
48
-                                            echo '</em>';
44
+                                            $taxes = $invoice->get_total_tax();
45
+                                            if ( empty( $taxes ) && GetPaid_Payment_Form_Submission_Taxes::is_eu_transaction( $invoice->get_country() ) ) {
46
+                                                echo ' <em class="text-muted small">';
47
+                                                _x( '(Reverse charged)', 'This is a legal term for reverse charging tax in the EU', 'invoicing' );
48
+                                                echo '</em>';
49
+                                            }
49 50
                                         }
50 51
                                     }
51
-                                }
52 52
 
53
-                                // Check if field starts with tax__.
54
-                                if ( 0 === strpos( $key, 'tax__' ) ) {
55
-                                    $tax_amount = $invoice->get_tax_total_by_name( str_replace( 'tax__', '', $key ) );
56
-                                    wpinv_the_price( $tax_amount, $invoice->get_currency() );
53
+                                    // Check if field starts with tax__.
54
+                                    if ( 0 === strpos( $key, 'tax__' ) ) {
55
+                                        $tax_amount = $invoice->get_tax_total_by_name( str_replace( 'tax__', '', $key ) );
56
+                                        wpinv_the_price( $tax_amount, $invoice->get_currency() );
57 57
 
58
-                                    if ( wpinv_use_taxes() && ! $invoice->get_disable_taxes() ) {
58
+                                        if ( wpinv_use_taxes() && ! $invoice->get_disable_taxes() ) {
59 59
 
60
-                                        if ( empty( $tax_amount ) && GetPaid_Payment_Form_Submission_Taxes::is_eu_transaction( $invoice->get_country() ) ) {
61
-                                            echo ' <em class="text-muted small">';
62
-                                            _x( '(Reverse charged)', 'This is a legal term for reverse charging tax in the EU', 'invoicing' );
63
-                                            echo '</em>';
60
+                                            if ( empty( $tax_amount ) && GetPaid_Payment_Form_Submission_Taxes::is_eu_transaction( $invoice->get_country() ) ) {
61
+                                                echo ' <em class="text-muted small">';
62
+                                                _x( '(Reverse charged)', 'This is a legal term for reverse charging tax in the EU', 'invoicing' );
63
+                                                echo '</em>';
64
+                                            }
64 65
                                         }
65 66
                                     }
66
-                                }
67 67
 
68
-                                // Total Fee.
69
-                                if ( 'fee' === $key ) {
70
-								wpinv_the_price( $invoice->get_total_fees(), $invoice->get_currency() );
71
-                                }
68
+                                    // Total Fee.
69
+                                    if ( 'fee' === $key ) {
70
+								    wpinv_the_price( $invoice->get_total_fees(), $invoice->get_currency() );
71
+                                    }
72 72
 
73
-                                // Total discount.
74
-                                if ( 'discount' === $key ) {
75
-								wpinv_the_price( $invoice->get_total_discount(), $invoice->get_currency() );
76
-                                }
73
+                                    // Total discount.
74
+                                    if ( 'discount' === $key ) {
75
+								    wpinv_the_price( $invoice->get_total_discount(), $invoice->get_currency() );
76
+                                    }
77 77
 
78
-                                // Shipping.
79
-                                if ( 'shipping' === $key ) {
80
-								wpinv_the_price( $invoice->get_shipping(), $invoice->get_currency() );
81
-                                }
78
+                                    // Shipping.
79
+                                    if ( 'shipping' === $key ) {
80
+								    wpinv_the_price( $invoice->get_shipping(), $invoice->get_currency() );
81
+                                    }
82 82
 
83
-                                // Sub total.
84
-                                if ( 'subtotal' === $key ) {
85
-								wpinv_the_price( $invoice->get_subtotal(), $invoice->get_currency() );
86
-                                }
83
+                                    // Sub total.
84
+                                    if ( 'subtotal' === $key ) {
85
+								    wpinv_the_price( $invoice->get_subtotal(), $invoice->get_currency() );
86
+                                    }
87 87
 
88
-                                // Total.
89
-                                if ( 'total' === $key ) {
90
-								wpinv_the_price( $invoice->get_total(), $invoice->get_currency() );
91
-                                }
88
+                                    // Total.
89
+                                    if ( 'total' === $key ) {
90
+								    wpinv_the_price( $invoice->get_total(), $invoice->get_currency() );
91
+                                    }
92 92
 
93
-                                // Fires when printing a cart total.
94
-                                do_action( "getpaid_invoice_cart_totals_$key", $invoice );
93
+                                    // Fires when printing a cart total.
94
+                                    do_action( "getpaid_invoice_cart_totals_$key", $invoice );
95 95
 
96
-                            ?>
96
+                                ?>
97 97
 
98 98
                         </div>
99 99
                     </div>
Please login to merge, or discard this patch.
templates/payment-forms/elements/discount.php 1 patch
Switch Indentation   +12 added lines, -12 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 a discount field in payment form
4 4
  *
@@ -8,25 +8,25 @@  discard block
 block discarded – undo
8 8
  * @var GetPaid_Payment_Form $form The current payment form
9 9
  */
10 10
 
11
-defined( 'ABSPATH' ) || exit;
11
+    defined( 'ABSPATH' ) || exit;
12 12
 
13
-if ( ! getpaid_has_published_discount() ) {
14
-    return;
13
+    if ( ! getpaid_has_published_discount() ) {
14
+        return;
15 15
 }
16 16
 
17
-if ( ! empty( $description ) ) {
18
-    $description = "<small class='form-text text-muted'>$description</small>";
17
+    if ( ! empty( $description ) ) {
18
+        $description = "<small class='form-text text-muted'>$description</small>";
19 19
 } else {
20
-    $description = '';
20
+        $description = '';
21 21
 }
22 22
 
23
-$discount_code = '';
24
-if ( ! empty( $form->invoice ) ) {
25
-    $discount_code = $form->invoice->get_discount_code();
23
+    $discount_code = '';
24
+    if ( ! empty( $form->invoice ) ) {
25
+        $discount_code = $form->invoice->get_discount_code();
26 26
 }
27 27
 
28
-$class = empty( $class ) ? 'btn-secondary' : sanitize_html_class( $class );
29
-?>
28
+    $class = empty( $class ) ? 'btn-secondary' : sanitize_html_class( $class );
29
+    ?>
30 30
 
31 31
 <div class="form-group mb-3">
32 32
     <div class="getpaid-discount-field  border rounded p-3">
Please login to merge, or discard this patch.
templates/invoice/invoice.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 an invoice.
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
 
@@ -17,28 +17,28 @@  discard block
 block discarded – undo
17 17
 
18 18
         <?php
19 19
 
20
-            // Fires when printing the header.
21
-            do_action( 'getpaid_invoice_header', $invoice );
20
+                // Fires when printing the header.
21
+                do_action( 'getpaid_invoice_header', $invoice );
22 22
 
23
-            // Print the opening wrapper.
24
-            echo '<div class="container bg-white getpaid-print-no-border border mt-4 mb-4 p-4 position-relative flex-grow-1">';
23
+                // Print the opening wrapper.
24
+                echo '<div class="container bg-white getpaid-print-no-border border mt-4 mb-4 p-4 position-relative flex-grow-1">';
25 25
 
26
-            // Print notifications.
27
-            wpinv_print_errors();
26
+                // Print notifications.
27
+                wpinv_print_errors();
28 28
 
29
-            // Fires when printing the invoice details.
30
-            do_action( 'getpaid_invoice_details', $invoice );
29
+                // Fires when printing the invoice details.
30
+                do_action( 'getpaid_invoice_details', $invoice );
31 31
 
32
-            // Fires when printing the invoice line items.
33
-            do_action( 'getpaid_invoice_line_items', $invoice );
32
+                // Fires when printing the invoice line items.
33
+                do_action( 'getpaid_invoice_line_items', $invoice );
34 34
 
35
-            // Print the closing wrapper.
36
-            echo '</div>';
35
+                // Print the closing wrapper.
36
+                echo '</div>';
37 37
 
38
-            // Fires when printing the invoice footer.
39
-            do_action( 'getpaid_invoice_footer', $invoice );
38
+                // Fires when printing the invoice footer.
39
+                do_action( 'getpaid_invoice_footer', $invoice );
40 40
 
41
-        ?>
41
+            ?>
42 42
 
43 43
     </div>
44 44
 </div>
Please login to merge, or discard this patch.