Passed
Push — master ( 9ee829...6e3436 )
by Brian
04:40
created
templates/invoice/line-item.php 2 patches
Indentation   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -32,33 +32,33 @@  discard block
 block discarded – undo
32 32
                     // Item name.
33 33
                     if ( 'name' == $column ) {
34 34
 
35
-					// Display the name.
36
-					echo '<div class="mb-1">' . esc_html( $item->get_name() ) . '</div>';
35
+                    // Display the name.
36
+                    echo '<div class="mb-1">' . esc_html( $item->get_name() ) . '</div>';
37 37
 
38
-					// And an optional description.
39
-					$description = $item->get_description();
38
+                    // And an optional description.
39
+                    $description = $item->get_description();
40 40
 
41
-					if ( ! empty( $description ) ) {
42
-						echo "<small class='form-text text-muted pr-2 m-0'>" . wp_kses_post( $description ) . "</small>";
41
+                    if ( ! empty( $description ) ) {
42
+                        echo "<small class='form-text text-muted pr-2 m-0'>" . wp_kses_post( $description ) . "</small>";
43 43
                         }
44 44
 
45
-					// Fires before printing the line item actions.
46
-					do_action( 'getpaid_before_invoice_line_item_actions', $item, $invoice );
45
+                    // Fires before printing the line item actions.
46
+                    do_action( 'getpaid_before_invoice_line_item_actions', $item, $invoice );
47 47
 
48
-					$actions = apply_filters( 'getpaid-invoice-page-line-item-actions', array(), $item, $invoice );
48
+                    $actions = apply_filters( 'getpaid-invoice-page-line-item-actions', array(), $item, $invoice );
49 49
 
50
-					if ( ! empty( $actions ) ) {
50
+                    if ( ! empty( $actions ) ) {
51 51
 
52
-						$sanitized  = array();
53
-						foreach ( $actions as $key => $action ) {
54
-							$key         = sanitize_html_class( $key );
55
-							$action      = wp_kses_post( $action );
56
-							$sanitized[] = "<span class='$key'>$action</span>";
52
+                        $sanitized  = array();
53
+                        foreach ( $actions as $key => $action ) {
54
+                            $key         = sanitize_html_class( $key );
55
+                            $action      = wp_kses_post( $action );
56
+                            $sanitized[] = "<span class='$key'>$action</span>";
57 57
                             }
58 58
 
59
-						echo "<small class='form-text getpaid-line-item-actions'>";
60
-						echo wp_kses_post( implode( ' | ', $sanitized ) );
61
-						echo '</small>';
59
+                        echo "<small class='form-text getpaid-line-item-actions'>";
60
+                        echo wp_kses_post( implode( ' | ', $sanitized ) );
61
+                        echo '</small>';
62 62
 
63 63
                         }
64 64
 }
@@ -66,26 +66,26 @@  discard block
 block discarded – undo
66 66
                     // Item price.
67 67
                     if ( 'price' == $column ) {
68 68
 
69
-					// Display the item price (or recurring price if this is a renewal invoice)
70
-					$price = $invoice->is_renewal() ? $item->get_price() : $item->get_initial_price();
71
-					wpinv_the_price( $price, $invoice->get_currency() );
69
+                    // Display the item price (or recurring price if this is a renewal invoice)
70
+                    $price = $invoice->is_renewal() ? $item->get_price() : $item->get_initial_price();
71
+                    wpinv_the_price( $price, $invoice->get_currency() );
72 72
 
73 73
                     }
74 74
 
75 75
                     // Tax rate.
76 76
                     if ( 'tax_rate' == $column ) {
77
-					echo floatval( round( getpaid_get_invoice_tax_rate( $invoice, $item ), 2 ) ) . '%';
77
+                    echo floatval( round( getpaid_get_invoice_tax_rate( $invoice, $item ), 2 ) ) . '%';
78 78
                     }
79 79
 
80 80
                     // Item quantity.
81 81
                     if ( 'quantity' == $column ) {
82
-					echo (float) $item->get_quantity();
82
+                    echo (float) $item->get_quantity();
83 83
                     }
84 84
 
85 85
                     // Item sub total.
86 86
                     if ( 'subtotal' == $column ) {
87
-					$subtotal = $invoice->is_renewal() ? $item->get_recurring_sub_total() : $item->get_sub_total();
88
-					wpinv_the_price( $subtotal, $invoice->get_currency() );
87
+                    $subtotal = $invoice->is_renewal() ? $item->get_recurring_sub_total() : $item->get_sub_total();
88
+                    wpinv_the_price( $subtotal, $invoice->get_currency() );
89 89
                     }
90 90
 
91 91
                     // Fires when printing a line item column.
Please login to merge, or discard this patch.
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -10,89 +10,89 @@
 block discarded – undo
10 10
  * @var array $columns
11 11
  */
12 12
 
13
-defined( 'ABSPATH' ) || exit;
13
+defined('ABSPATH') || exit;
14 14
 
15
-do_action( 'getpaid_before_invoice_line_item', $invoice, $item );
15
+do_action('getpaid_before_invoice_line_item', $invoice, $item);
16 16
 
17 17
 ?>
18 18
 
19
-<div class='getpaid-invoice-item item-<?php echo (int) $item->get_id(); ?> item-type-<?php echo sanitize_html_class( $item->get_type() ); ?> border-bottom'>
19
+<div class='getpaid-invoice-item item-<?php echo (int) $item->get_id(); ?> item-type-<?php echo sanitize_html_class($item->get_type()); ?> border-bottom'>
20 20
 
21 21
     <div class="form-row">
22 22
 
23
-        <?php foreach ( array_keys( $columns ) as $column ) : ?>
23
+        <?php foreach (array_keys($columns) as $column) : ?>
24 24
 
25
-            <div class="<?php echo 'name' == $column ? 'col-12 col-sm-6' : 'col-12 col-sm'; ?> getpaid-invoice-item-<?php echo sanitize_html_class( $column ); ?>">
25
+            <div class="<?php echo 'name' == $column ? 'col-12 col-sm-6' : 'col-12 col-sm'; ?> getpaid-invoice-item-<?php echo sanitize_html_class($column); ?>">
26 26
 
27 27
                 <?php
28 28
 
29 29
                     // Fires before printing a line item column.
30
-                    do_action( "getpaid_invoice_line_item_before_$column", $item, $invoice );
30
+                    do_action("getpaid_invoice_line_item_before_$column", $item, $invoice);
31 31
 
32 32
                     // Item name.
33
-                    if ( 'name' == $column ) {
33
+                    if ('name' == $column) {
34 34
 
35 35
 					// Display the name.
36
-					echo '<div class="mb-1">' . esc_html( $item->get_name() ) . '</div>';
36
+					echo '<div class="mb-1">' . esc_html($item->get_name()) . '</div>';
37 37
 
38 38
 					// And an optional description.
39 39
 					$description = $item->get_description();
40 40
 
41
-					if ( ! empty( $description ) ) {
42
-						echo "<small class='form-text text-muted pr-2 m-0'>" . wp_kses_post( $description ) . "</small>";
41
+					if (!empty($description)) {
42
+						echo "<small class='form-text text-muted pr-2 m-0'>" . wp_kses_post($description) . "</small>";
43 43
                         }
44 44
 
45 45
 					// Fires before printing the line item actions.
46
-					do_action( 'getpaid_before_invoice_line_item_actions', $item, $invoice );
46
+					do_action('getpaid_before_invoice_line_item_actions', $item, $invoice);
47 47
 
48
-					$actions = apply_filters( 'getpaid-invoice-page-line-item-actions', array(), $item, $invoice );
48
+					$actions = apply_filters('getpaid-invoice-page-line-item-actions', array(), $item, $invoice);
49 49
 
50
-					if ( ! empty( $actions ) ) {
50
+					if (!empty($actions)) {
51 51
 
52
-						$sanitized  = array();
53
-						foreach ( $actions as $key => $action ) {
54
-							$key         = sanitize_html_class( $key );
55
-							$action      = wp_kses_post( $action );
52
+						$sanitized = array();
53
+						foreach ($actions as $key => $action) {
54
+							$key         = sanitize_html_class($key);
55
+							$action      = wp_kses_post($action);
56 56
 							$sanitized[] = "<span class='$key'>$action</span>";
57 57
                             }
58 58
 
59 59
 						echo "<small class='form-text getpaid-line-item-actions'>";
60
-						echo wp_kses_post( implode( ' | ', $sanitized ) );
60
+						echo wp_kses_post(implode(' | ', $sanitized));
61 61
 						echo '</small>';
62 62
 
63 63
                         }
64 64
 }
65 65
 
66 66
                     // Item price.
67
-                    if ( 'price' == $column ) {
67
+                    if ('price' == $column) {
68 68
 
69 69
 					// Display the item price (or recurring price if this is a renewal invoice)
70 70
 					$price = $invoice->is_renewal() ? $item->get_price() : $item->get_initial_price();
71
-					wpinv_the_price( $price, $invoice->get_currency() );
71
+					wpinv_the_price($price, $invoice->get_currency());
72 72
 
73 73
                     }
74 74
 
75 75
                     // Tax rate.
76
-                    if ( 'tax_rate' == $column ) {
77
-					echo floatval( round( getpaid_get_invoice_tax_rate( $invoice, $item ), 2 ) ) . '%';
76
+                    if ('tax_rate' == $column) {
77
+					echo floatval(round(getpaid_get_invoice_tax_rate($invoice, $item), 2)) . '%';
78 78
                     }
79 79
 
80 80
                     // Item quantity.
81
-                    if ( 'quantity' == $column ) {
81
+                    if ('quantity' == $column) {
82 82
 					echo (float) $item->get_quantity();
83 83
                     }
84 84
 
85 85
                     // Item sub total.
86
-                    if ( 'subtotal' == $column ) {
86
+                    if ('subtotal' == $column) {
87 87
 					$subtotal = $invoice->is_renewal() ? $item->get_recurring_sub_total() : $item->get_sub_total();
88
-					wpinv_the_price( $subtotal, $invoice->get_currency() );
88
+					wpinv_the_price($subtotal, $invoice->get_currency());
89 89
                     }
90 90
 
91 91
                     // Fires when printing a line item column.
92
-                    do_action( "getpaid_invoice_line_item_$column", $item, $invoice );
92
+                    do_action("getpaid_invoice_line_item_$column", $item, $invoice);
93 93
 
94 94
                     // Fires after printing a line item column.
95
-                    do_action( "getpaid_invoice_line_item_after_$column", $item, $invoice );
95
+                    do_action("getpaid_invoice_line_item_after_$column", $item, $invoice);
96 96
 
97 97
                 ?>
98 98
 
Please login to merge, or discard this patch.
templates/invoice/line-totals.php 2 patches
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -39,40 +39,40 @@
 block discarded – undo
39 39
                                 if ( 'tax' == $key ) {
40 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 53
                                 // Total Fee.
54 54
                                 if ( 'fee' == $key ) {
55
-								wpinv_the_price( $invoice->get_total_fees(), $invoice->get_currency() );
55
+                                wpinv_the_price( $invoice->get_total_fees(), $invoice->get_currency() );
56 56
                                 }
57 57
 
58 58
                                 // Total discount.
59 59
                                 if ( 'discount' == $key ) {
60
-								wpinv_the_price( $invoice->get_total_discount(), $invoice->get_currency() );
60
+                                wpinv_the_price( $invoice->get_total_discount(), $invoice->get_currency() );
61 61
                                 }
62 62
 
63 63
                                 // Shipping.
64 64
                                 if ( 'shipping' == $key ) {
65
-								wpinv_the_price( $invoice->get_shipping(), $invoice->get_currency() );
65
+                                wpinv_the_price( $invoice->get_shipping(), $invoice->get_currency() );
66 66
                                 }
67 67
 
68 68
                                 // Sub total.
69 69
                                 if ( 'subtotal' == $key ) {
70
-								wpinv_the_price( $invoice->get_subtotal(), $invoice->get_currency() );
70
+                                wpinv_the_price( $invoice->get_subtotal(), $invoice->get_currency() );
71 71
                                 }
72 72
 
73 73
                                 // Total.
74 74
                                 if ( 'total' == $key ) {
75
-								wpinv_the_price( $invoice->get_total(), $invoice->get_currency() );
75
+                                wpinv_the_price( $invoice->get_total(), $invoice->get_currency() );
76 76
                                 }
77 77
 
78 78
                                 // Fires when printing a cart total.
Please login to merge, or discard this patch.
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -9,26 +9,26 @@  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 14
 // Totals rows.
15
-$totals = getpaid_invoice_totals_rows( $invoice );
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">
23 23
 
24
-            <?php foreach ( $totals as $key => $label ) : ?>
24
+            <?php foreach ($totals as $key => $label) : ?>
25 25
 
26
-                <div class="getpaid-invoice-line-totals-col <?php echo sanitize_html_class( $key ); ?>">
26
+                <div class="getpaid-invoice-line-totals-col <?php echo sanitize_html_class($key); ?>">
27 27
 
28 28
                     <div class="form-row">
29 29
 
30 30
                         <div class="col-8 getpaid-invoice-line-totals-label">
31
-                            <?php echo esc_html( $label ); ?>
31
+                            <?php echo esc_html($label); ?>
32 32
                         </div>
33 33
 
34 34
                         <div class="col-4 getpaid-invoice-line-totals-value pl-0">
@@ -36,47 +36,47 @@  discard block
 block discarded – undo
36 36
                             <?php
37 37
 
38 38
                                 // Total tax.
39
-                                if ( 'tax' == $key ) {
40
-                                    wpinv_the_price( $invoice->get_total_tax(), $invoice->get_currency() );
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 44
 									$taxes = $invoice->get_total_tax();
45
-									if ( empty( $taxes ) && GetPaid_Payment_Form_Submission_Taxes::is_eu_transaction( $invoice->get_country() ) ) {
45
+									if (empty($taxes) && GetPaid_Payment_Form_Submission_Taxes::is_eu_transaction($invoice->get_country())) {
46 46
 										echo ' <em class="text-muted small">';
47
-										_x( '(Reverse charged)', 'This is a legal term for reverse charging tax in the EU', 'invoicing' );
47
+										_x('(Reverse charged)', 'This is a legal term for reverse charging tax in the EU', 'invoicing');
48 48
 										echo '</em>';
49 49
                                         }
50 50
 }
51 51
 }
52 52
 
53 53
                                 // Total Fee.
54
-                                if ( 'fee' == $key ) {
55
-								wpinv_the_price( $invoice->get_total_fees(), $invoice->get_currency() );
54
+                                if ('fee' == $key) {
55
+								wpinv_the_price($invoice->get_total_fees(), $invoice->get_currency());
56 56
                                 }
57 57
 
58 58
                                 // Total discount.
59
-                                if ( 'discount' == $key ) {
60
-								wpinv_the_price( $invoice->get_total_discount(), $invoice->get_currency() );
59
+                                if ('discount' == $key) {
60
+								wpinv_the_price($invoice->get_total_discount(), $invoice->get_currency());
61 61
                                 }
62 62
 
63 63
                                 // Shipping.
64
-                                if ( 'shipping' == $key ) {
65
-								wpinv_the_price( $invoice->get_shipping(), $invoice->get_currency() );
64
+                                if ('shipping' == $key) {
65
+								wpinv_the_price($invoice->get_shipping(), $invoice->get_currency());
66 66
                                 }
67 67
 
68 68
                                 // Sub total.
69
-                                if ( 'subtotal' == $key ) {
70
-								wpinv_the_price( $invoice->get_subtotal(), $invoice->get_currency() );
69
+                                if ('subtotal' == $key) {
70
+								wpinv_the_price($invoice->get_subtotal(), $invoice->get_currency());
71 71
                                 }
72 72
 
73 73
                                 // Total.
74
-                                if ( 'total' == $key ) {
75
-								wpinv_the_price( $invoice->get_total(), $invoice->get_currency() );
74
+                                if ('total' == $key) {
75
+								wpinv_the_price($invoice->get_total(), $invoice->get_currency());
76 76
                                 }
77 77
 
78 78
                                 // Fires when printing a cart total.
79
-                                do_action( "getpaid_invoice_cart_totals_$key", $invoice );
79
+                                do_action("getpaid_invoice_cart_totals_$key", $invoice);
80 80
 
81 81
                             ?>
82 82
 
@@ -90,4 +90,4 @@  discard block
 block discarded – undo
90 90
     </div>
91 91
 </div> <!-- end .getpaid-invoice-line-totals -->
92 92
 
93
-<?php do_action( 'getpaid_after_invoice_line_totals', $invoice, $totals ); ?>
93
+<?php do_action('getpaid_after_invoice_line_totals', $invoice, $totals); ?>
Please login to merge, or discard this patch.
templates/invoice/fee-item.php 2 patches
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -31,21 +31,21 @@  discard block
 block discarded – undo
31 31
                     // Item name.
32 32
                     if ( 'name' == $column ) {
33 33
 
34
-					// Display the name.
35
-					echo '<div class="mb-1">' . esc_html( $fee['name'] ) . '</div>';
34
+                    // Display the name.
35
+                    echo '<div class="mb-1">' . esc_html( $fee['name'] ) . '</div>';
36 36
 
37
-					// And an optional description.
38
-					$description = empty( $fee['description'] ) ? esc_html__( 'Fee', 'invoicing' ) : esc_html( $fee['description'] );
39
-					echo wp_kses_post( "<small class='form-text text-muted pr-2 m-0'>$description</small>" );
37
+                    // And an optional description.
38
+                    $description = empty( $fee['description'] ) ? esc_html__( 'Fee', 'invoicing' ) : esc_html( $fee['description'] );
39
+                    echo wp_kses_post( "<small class='form-text text-muted pr-2 m-0'>$description</small>" );
40 40
 
41 41
                     }
42 42
 
43 43
                     // Item price.
44 44
                     if ( 'price' == $column ) {
45 45
 
46
-					// Display the item price (or recurring price if this is a renewal invoice)
47
-					if ( $invoice->is_recurring() && $invoice->is_renewal() ) {
48
-						wpinv_the_price( $fee['recurring_fee'], $invoice->get_currency() );
46
+                    // Display the item price (or recurring price if this is a renewal invoice)
47
+                    if ( $invoice->is_recurring() && $invoice->is_renewal() ) {
48
+                        wpinv_the_price( $fee['recurring_fee'], $invoice->get_currency() );
49 49
                         } else {
50 50
                             wpinv_the_price( $fee['initial_fee'], $invoice->get_currency() );
51 51
                         }
@@ -53,20 +53,20 @@  discard block
 block discarded – undo
53 53
 
54 54
                     // Item quantity.
55 55
                     if ( 'quantity' == $column ) {
56
-					echo '&mdash;';
56
+                    echo '&mdash;';
57 57
                     }
58 58
 
59 59
                     // Item tax.
60 60
                     if ( 'tax_rate' == $column ) {
61
-					echo '&mdash;';
61
+                    echo '&mdash;';
62 62
                     }
63 63
 
64 64
                     // Item sub total.
65 65
                     if ( 'subtotal' == $column ) {
66 66
 
67
-					// Display the item price (or recurring price if this is a renewal invoice)
68
-					if ( $invoice->is_recurring() && $invoice->is_renewal() ) {
69
-						wpinv_the_price( $fee['recurring_fee'], $invoice->get_currency() );
67
+                    // Display the item price (or recurring price if this is a renewal invoice)
68
+                    if ( $invoice->is_recurring() && $invoice->is_renewal() ) {
69
+                        wpinv_the_price( $fee['recurring_fee'], $invoice->get_currency() );
70 70
                         } else {
71 71
                             wpinv_the_price( $fee['initial_fee'], $invoice->get_currency() );
72 72
                         }
Please login to merge, or discard this patch.
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -9,9 +9,9 @@  discard block
 block discarded – undo
9 9
  * @var array $fee
10 10
  */
11 11
 
12
-defined( 'ABSPATH' ) || exit;
12
+defined('ABSPATH') || exit;
13 13
 
14
-do_action( 'getpaid_before_invoice_fee_item', $invoice, $fee );
14
+do_action('getpaid_before_invoice_fee_item', $invoice, $fee);
15 15
 
16 16
 ?>
17 17
 
@@ -19,64 +19,64 @@  discard block
 block discarded – undo
19 19
 
20 20
     <div class="form-row">
21 21
 
22
-        <?php foreach ( array_keys( $columns ) as $column ) : ?>
22
+        <?php foreach (array_keys($columns) as $column) : ?>
23 23
 
24
-            <div class="<?php echo 'name' == $column ? 'col-12 col-sm-6' : 'col-12 col-sm'; ?> getpaid-invoice-item-<?php echo sanitize_html_class( $column ); ?>">
24
+            <div class="<?php echo 'name' == $column ? 'col-12 col-sm-6' : 'col-12 col-sm'; ?> getpaid-invoice-item-<?php echo sanitize_html_class($column); ?>">
25 25
 
26 26
                 <?php
27 27
 
28 28
                     // Fires before printing a fee item column.
29
-                    do_action( "getpaid_invoice_fee_item_before_$column", $fee, $invoice );
29
+                    do_action("getpaid_invoice_fee_item_before_$column", $fee, $invoice);
30 30
 
31 31
                     // Item name.
32
-                    if ( 'name' == $column ) {
32
+                    if ('name' == $column) {
33 33
 
34 34
 					// Display the name.
35
-					echo '<div class="mb-1">' . esc_html( $fee['name'] ) . '</div>';
35
+					echo '<div class="mb-1">' . esc_html($fee['name']) . '</div>';
36 36
 
37 37
 					// And an optional description.
38
-					$description = empty( $fee['description'] ) ? esc_html__( 'Fee', 'invoicing' ) : esc_html( $fee['description'] );
39
-					echo wp_kses_post( "<small class='form-text text-muted pr-2 m-0'>$description</small>" );
38
+					$description = empty($fee['description']) ? esc_html__('Fee', 'invoicing') : esc_html($fee['description']);
39
+					echo wp_kses_post("<small class='form-text text-muted pr-2 m-0'>$description</small>");
40 40
 
41 41
                     }
42 42
 
43 43
                     // Item price.
44
-                    if ( 'price' == $column ) {
44
+                    if ('price' == $column) {
45 45
 
46 46
 					// Display the item price (or recurring price if this is a renewal invoice)
47
-					if ( $invoice->is_recurring() && $invoice->is_renewal() ) {
48
-						wpinv_the_price( $fee['recurring_fee'], $invoice->get_currency() );
47
+					if ($invoice->is_recurring() && $invoice->is_renewal()) {
48
+						wpinv_the_price($fee['recurring_fee'], $invoice->get_currency());
49 49
                         } else {
50
-                            wpinv_the_price( $fee['initial_fee'], $invoice->get_currency() );
50
+                            wpinv_the_price($fee['initial_fee'], $invoice->get_currency());
51 51
                         }
52 52
 }
53 53
 
54 54
                     // Item quantity.
55
-                    if ( 'quantity' == $column ) {
55
+                    if ('quantity' == $column) {
56 56
 					echo '&mdash;';
57 57
                     }
58 58
 
59 59
                     // Item tax.
60
-                    if ( 'tax_rate' == $column ) {
60
+                    if ('tax_rate' == $column) {
61 61
 					echo '&mdash;';
62 62
                     }
63 63
 
64 64
                     // Item sub total.
65
-                    if ( 'subtotal' == $column ) {
65
+                    if ('subtotal' == $column) {
66 66
 
67 67
 					// Display the item price (or recurring price if this is a renewal invoice)
68
-					if ( $invoice->is_recurring() && $invoice->is_renewal() ) {
69
-						wpinv_the_price( $fee['recurring_fee'], $invoice->get_currency() );
68
+					if ($invoice->is_recurring() && $invoice->is_renewal()) {
69
+						wpinv_the_price($fee['recurring_fee'], $invoice->get_currency());
70 70
                         } else {
71
-                            wpinv_the_price( $fee['initial_fee'], $invoice->get_currency() );
71
+                            wpinv_the_price($fee['initial_fee'], $invoice->get_currency());
72 72
                         }
73 73
 }
74 74
 
75 75
                     // Fires when printing a fee item column.
76
-                    do_action( "getpaid_invoice_fee_item_$column", $fee, $invoice );
76
+                    do_action("getpaid_invoice_fee_item_$column", $fee, $invoice);
77 77
 
78 78
                     // Fires after printing a fee item column.
79
-                    do_action( "getpaid_invoice_fee_item_after_$column", $fee, $invoice );
79
+                    do_action("getpaid_invoice_fee_item_after_$column", $fee, $invoice);
80 80
 
81 81
                 ?>
82 82
 
Please login to merge, or discard this patch.
templates/invoice/company-address.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -7,17 +7,17 @@  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
 // Prepare the company name.
13
-$company_name = wpinv_get_option( 'vat_company_name' );
13
+$company_name = wpinv_get_option('vat_company_name');
14 14
 
15
-if ( empty( $company_name ) ) {
15
+if (empty($company_name)) {
16 16
     $company_name = wpinv_get_business_name();
17 17
 }
18 18
 
19 19
 // Prepare the VAT number.
20
-$vat_number = wpinv_get_option( 'vat_number' );
20
+$vat_number = wpinv_get_option('vat_number');
21 21
 
22 22
 ?>
23 23
     <div class="getpaid-company-address form-group">
@@ -25,36 +25,36 @@  discard block
 block discarded – undo
25 25
         <div class="row">
26 26
 
27 27
             <div class="invoice-company-address-label col-2">
28
-                <strong><?php esc_html_e( 'From:', 'invoicing' ); ?></strong>
28
+                <strong><?php esc_html_e('From:', 'invoicing'); ?></strong>
29 29
             </div>
30 30
 
31 31
             <div class="invoice-company-address-value col-10">
32 32
 
33
-                <?php do_action( 'getpaid_company_address_top' ); ?>
33
+                <?php do_action('getpaid_company_address_top'); ?>
34 34
 
35 35
                 <div class="name">
36
-                    <a target="_blank" class="text-dark" href="<?php echo esc_url( wpinv_get_business_website() ); ?>">
37
-                        <?php echo esc_html( $company_name ); ?>
36
+                    <a target="_blank" class="text-dark" href="<?php echo esc_url(wpinv_get_business_website()); ?>">
37
+                        <?php echo esc_html($company_name); ?>
38 38
                     </a>
39 39
                 </div>
40 40
 
41
-                <?php if ( $address = wpinv_get_business_address() ) { ?>
42
-                    <?php echo wp_kses_post( $address ); ?>
41
+                <?php if ($address = wpinv_get_business_address()) { ?>
42
+                    <?php echo wp_kses_post($address); ?>
43 43
                 <?php } ?>
44 44
 
45
-                <?php if ( $email_from = wpinv_mail_get_from_address() ) { ?>
45
+                <?php if ($email_from = wpinv_mail_get_from_address()) { ?>
46 46
                     <div class="email_from">
47
-                        <?php echo wp_sprintf( esc_html__( 'Email: %s', 'invoicing' ), esc_html( $email_from ) ); ?>
47
+                        <?php echo wp_sprintf(esc_html__('Email: %s', 'invoicing'), esc_html($email_from)); ?>
48 48
                     </div>
49 49
                 <?php } ?>
50 50
 
51
-                <?php if ( ! empty( $vat_number ) ) { ?>
51
+                <?php if (!empty($vat_number)) { ?>
52 52
                     <div class="email_from">
53
-                        <?php echo wp_sprintf( esc_html__( 'VAT Number: %s', 'invoicing' ), esc_html( $vat_number ) ); ?>
53
+                        <?php echo wp_sprintf(esc_html__('VAT Number: %s', 'invoicing'), esc_html($vat_number)); ?>
54 54
                     </div>
55 55
                 <?php } ?>
56 56
 
57
-                <?php do_action( 'getpaid_company_address_bottom' ); ?>
57
+                <?php do_action('getpaid_company_address_bottom'); ?>
58 58
 
59 59
             </div>
60 60
 
Please login to merge, or discard this patch.
templates/invoice-history.php 2 patches
Indentation   +73 added lines, -73 removed lines patch added patch discarded remove patch
@@ -42,92 +42,92 @@  discard block
 block discarded – undo
42 42
 					<tr class="wpinv-item wpinv-item-<?php echo sanitize_html_class( $invoice->get_status() ); ?>">
43 43
 						<?php
44 44
 
45
-							foreach ( wpinv_get_user_invoices_columns( $post_type ) as $column_id => $column_name ) :
45
+                            foreach ( wpinv_get_user_invoices_columns( $post_type ) as $column_id => $column_name ) :
46 46
 
47
-							$column_id = sanitize_html_class( $column_id );
48
-							$class     = empty( $column_name['class'] ) ? '' : sanitize_html_class( $column_name['class'] );
47
+                            $column_id = sanitize_html_class( $column_id );
48
+                            $class     = empty( $column_name['class'] ) ? '' : sanitize_html_class( $column_name['class'] );
49 49
 
50
-							echo "<td class='" . esc_attr( $column_id . $class ) . "'>";
51
-							switch ( $column_id ) {
50
+                            echo "<td class='" . esc_attr( $column_id . $class ) . "'>";
51
+                            switch ( $column_id ) {
52 52
 
53
-								case 'invoice-number':
54
-									echo wp_kses_post( wpinv_invoice_link( $invoice ) );
55
-									break;
53
+                                case 'invoice-number':
54
+                                    echo wp_kses_post( wpinv_invoice_link( $invoice ) );
55
+                                    break;
56 56
 
57
-								case 'created-date':
58
-									echo esc_html( getpaid_format_date_value( $invoice->get_date_created() ) );
59
-									break;
57
+                                case 'created-date':
58
+                                    echo esc_html( getpaid_format_date_value( $invoice->get_date_created() ) );
59
+                                    break;
60 60
 
61
-								case 'payment-date':
62
-									if ( $invoice->needs_payment() ) {
63
-										echo '&mdash;';
64
-										} else {
65
-										echo esc_html( getpaid_format_date_value( $invoice->get_date_completed() ) );
66
-										}
61
+                                case 'payment-date':
62
+                                    if ( $invoice->needs_payment() ) {
63
+                                        echo '&mdash;';
64
+                                        } else {
65
+                                        echo esc_html( getpaid_format_date_value( $invoice->get_date_completed() ) );
66
+                                        }
67 67
 
68
-									break;
68
+                                    break;
69 69
 
70
-								case 'invoice-status':
71
-									echo wp_kses_post( $invoice->get_status_label_html() );
70
+                                case 'invoice-status':
71
+                                    echo wp_kses_post( $invoice->get_status_label_html() );
72 72
 
73
-									break;
73
+                                    break;
74 74
 
75
-								case 'invoice-total':
76
-									wpinv_the_price( $invoice->get_total(), $invoice->get_currency() );
75
+                                case 'invoice-total':
76
+                                    wpinv_the_price( $invoice->get_total(), $invoice->get_currency() );
77 77
 
78
-									break;
78
+                                    break;
79 79
 
80
-								case 'invoice-actions':
81
-									$actions = array(
80
+                                case 'invoice-actions':
81
+                                    $actions = array(
82 82
 
83
-										'pay'   => array(
84
-											'url'   => $invoice->get_checkout_payment_url(),
85
-											'name'  => __( 'Pay Now', 'invoicing' ),
86
-											'class' => 'btn-success',
87
-										),
83
+                                        'pay'   => array(
84
+                                            'url'   => $invoice->get_checkout_payment_url(),
85
+                                            'name'  => __( 'Pay Now', 'invoicing' ),
86
+                                            'class' => 'btn-success',
87
+                                        ),
88 88
 
89
-										'print' => array(
90
-											'url'   => $invoice->get_view_url(),
91
-											'name'  => __( 'View', 'invoicing' ),
92
-											'class' => 'btn-secondary',
93
-											'attrs' => 'target="_blank"',
94
-										),
95
-									);
89
+                                        'print' => array(
90
+                                            'url'   => $invoice->get_view_url(),
91
+                                            'name'  => __( 'View', 'invoicing' ),
92
+                                            'class' => 'btn-secondary',
93
+                                            'attrs' => 'target="_blank"',
94
+                                        ),
95
+                                    );
96 96
 
97
-									if ( ! $invoice->needs_payment() ) {
98
-										unset( $actions['pay'] );
99
-										}
97
+                                    if ( ! $invoice->needs_payment() ) {
98
+                                        unset( $actions['pay'] );
99
+                                        }
100 100
 
101
-									if ( $invoice->needs_payment() ) {
102
-										$actions['delete'] = array(
103
-											'url'   => getpaid_get_authenticated_action_url( 'delete_invoice', add_query_arg( 'invoice_id', $invoice->get_id() ) ),
104
-											'name'  => __( 'Delete', 'invoicing' ),
105
-											'class' => 'btn-danger',
106
-										);
107
-										}
101
+                                    if ( $invoice->needs_payment() ) {
102
+                                        $actions['delete'] = array(
103
+                                            'url'   => getpaid_get_authenticated_action_url( 'delete_invoice', add_query_arg( 'invoice_id', $invoice->get_id() ) ),
104
+                                            'name'  => __( 'Delete', 'invoicing' ),
105
+                                            'class' => 'btn-danger',
106
+                                        );
107
+                                        }
108 108
 
109
-									$actions = apply_filters( 'wpinv_user_invoices_actions', $actions, $invoice, $post_type );
109
+                                    $actions = apply_filters( 'wpinv_user_invoices_actions', $actions, $invoice, $post_type );
110 110
 
111
-									foreach ( $actions as $key => $action ) {
112
-										$class = ! empty( $action['class'] ) ? sanitize_html_class( $action['class'] ) : '';
113
-										echo '<a href="' . esc_url( $action['url'] ) . '" class="btn btn-sm btn-block ' . esc_attr( $class . ' ' . sanitize_html_class( $key ) ) . '" ' . ( ! empty( $action['attrs'] ) ? esc_html( $action['attrs'] ) : '' ) . '>' . esc_attr( $action['name'] ) . '</a>';
114
-										}
111
+                                    foreach ( $actions as $key => $action ) {
112
+                                        $class = ! empty( $action['class'] ) ? sanitize_html_class( $action['class'] ) : '';
113
+                                        echo '<a href="' . esc_url( $action['url'] ) . '" class="btn btn-sm btn-block ' . esc_attr( $class . ' ' . sanitize_html_class( $key ) ) . '" ' . ( ! empty( $action['attrs'] ) ? esc_html( $action['attrs'] ) : '' ) . '>' . esc_attr( $action['name'] ) . '</a>';
114
+                                        }
115 115
 
116
-									break;
116
+                                    break;
117 117
 
118
-								default:
119
-									do_action( "wpinv_user_invoices_column_$column_id", $invoice );
120
-									break;
118
+                                default:
119
+                                    do_action( "wpinv_user_invoices_column_$column_id", $invoice );
120
+                                    break;
121 121
 
122 122
 
123
-								}
123
+                                }
124 124
 
125
-							do_action( "wpinv_user_invoices_column_after_$column_id", $invoice );
125
+                            do_action( "wpinv_user_invoices_column_after_$column_id", $invoice );
126 126
 
127
-							echo '</td>';
127
+                            echo '</td>';
128 128
 
129
-							endforeach;
130
-						?>
129
+                            endforeach;
130
+                        ?>
131 131
 					</tr>
132 132
 
133 133
 				<?php endforeach; ?>
@@ -141,18 +141,18 @@  discard block
 block discarded – undo
141 141
 	<?php if ( 1 < $invoices->max_num_pages ) : ?>
142 142
 		<div class="invoicing-Pagination">
143 143
 			<?php
144
-			$big = 999999;
145
-
146
-			echo wp_kses_post(
147
-				paginate_links(
148
-					array(
149
-						'base'   => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
150
-						'format' => '?paged=%#%',
151
-						'total'  => $invoices->max_num_pages,
152
-					)
153
-				)
144
+            $big = 999999;
145
+
146
+            echo wp_kses_post(
147
+                paginate_links(
148
+                    array(
149
+                        'base'   => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
150
+                        'format' => '?paged=%#%',
151
+                        'total'  => $invoices->max_num_pages,
152
+                    )
153
+                )
154 154
             );
155
-			?>
155
+            ?>
156 156
 		</div>
157 157
 	<?php endif; ?>
158 158
 
Please login to merge, or discard this patch.
Spacing   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -7,27 +7,27 @@  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
 // Current page.
13
-$current_page   = empty( $_GET['page'] ) ? 1 : absint( $_GET['page'] );
13
+$current_page = empty($_GET['page']) ? 1 : absint($_GET['page']);
14 14
 
15 15
 // Fires before displaying user invoices.
16
-do_action( 'wpinv_before_user_invoices', $invoices->invoices, $invoices->total, $invoices->max_num_pages, $post_type );
16
+do_action('wpinv_before_user_invoices', $invoices->invoices, $invoices->total, $invoices->max_num_pages, $post_type);
17 17
 
18 18
 ?>
19 19
 
20 20
 
21 21
 	<div class="table-responsive">
22
-		<table class="table table-bordered table-hover getpaid-user-invoices <?php echo sanitize_html_class( $post_type ); ?>">
22
+		<table class="table table-bordered table-hover getpaid-user-invoices <?php echo sanitize_html_class($post_type); ?>">
23 23
 
24 24
 
25 25
 			<thead>
26 26
 				<tr>
27 27
 
28
-					<?php foreach ( wpinv_get_user_invoices_columns( $post_type ) as $column_id => $column_name ) : ?>
29
-						<th class="<?php echo sanitize_html_class( $column_id ); ?> <?php echo ( ! empty( $column_name['class'] ) ? sanitize_html_class( $column_name['class'] ) : ''); ?> border-bottom-0">
30
-							<span class="nobr"><?php echo esc_html( $column_name['title'] ); ?></span>
28
+					<?php foreach (wpinv_get_user_invoices_columns($post_type) as $column_id => $column_name) : ?>
29
+						<th class="<?php echo sanitize_html_class($column_id); ?> <?php echo (!empty($column_name['class']) ? sanitize_html_class($column_name['class']) : ''); ?> border-bottom-0">
30
+							<span class="nobr"><?php echo esc_html($column_name['title']); ?></span>
31 31
 						</th>
32 32
 					<?php endforeach; ?>
33 33
 
@@ -37,43 +37,43 @@  discard block
 block discarded – undo
37 37
 
38 38
 
39 39
 			<tbody>
40
-				<?php foreach ( $invoices->invoices as $invoice ) : ?>
40
+				<?php foreach ($invoices->invoices as $invoice) : ?>
41 41
 
42
-					<tr class="wpinv-item wpinv-item-<?php echo sanitize_html_class( $invoice->get_status() ); ?>">
42
+					<tr class="wpinv-item wpinv-item-<?php echo sanitize_html_class($invoice->get_status()); ?>">
43 43
 						<?php
44 44
 
45
-							foreach ( wpinv_get_user_invoices_columns( $post_type ) as $column_id => $column_name ) :
45
+							foreach (wpinv_get_user_invoices_columns($post_type) as $column_id => $column_name) :
46 46
 
47
-							$column_id = sanitize_html_class( $column_id );
48
-							$class     = empty( $column_name['class'] ) ? '' : sanitize_html_class( $column_name['class'] );
47
+							$column_id = sanitize_html_class($column_id);
48
+							$class     = empty($column_name['class']) ? '' : sanitize_html_class($column_name['class']);
49 49
 
50
-							echo "<td class='" . esc_attr( $column_id . $class ) . "'>";
51
-							switch ( $column_id ) {
50
+							echo "<td class='" . esc_attr($column_id . $class) . "'>";
51
+							switch ($column_id) {
52 52
 
53 53
 								case 'invoice-number':
54
-									echo wp_kses_post( wpinv_invoice_link( $invoice ) );
54
+									echo wp_kses_post(wpinv_invoice_link($invoice));
55 55
 									break;
56 56
 
57 57
 								case 'created-date':
58
-									echo esc_html( getpaid_format_date_value( $invoice->get_date_created() ) );
58
+									echo esc_html(getpaid_format_date_value($invoice->get_date_created()));
59 59
 									break;
60 60
 
61 61
 								case 'payment-date':
62
-									if ( $invoice->needs_payment() ) {
62
+									if ($invoice->needs_payment()) {
63 63
 										echo '&mdash;';
64 64
 										} else {
65
-										echo esc_html( getpaid_format_date_value( $invoice->get_date_completed() ) );
65
+										echo esc_html(getpaid_format_date_value($invoice->get_date_completed()));
66 66
 										}
67 67
 
68 68
 									break;
69 69
 
70 70
 								case 'invoice-status':
71
-									echo wp_kses_post( $invoice->get_status_label_html() );
71
+									echo wp_kses_post($invoice->get_status_label_html());
72 72
 
73 73
 									break;
74 74
 
75 75
 								case 'invoice-total':
76
-									wpinv_the_price( $invoice->get_total(), $invoice->get_currency() );
76
+									wpinv_the_price($invoice->get_total(), $invoice->get_currency());
77 77
 
78 78
 									break;
79 79
 
@@ -82,47 +82,47 @@  discard block
 block discarded – undo
82 82
 
83 83
 										'pay'   => array(
84 84
 											'url'   => $invoice->get_checkout_payment_url(),
85
-											'name'  => __( 'Pay Now', 'invoicing' ),
85
+											'name'  => __('Pay Now', 'invoicing'),
86 86
 											'class' => 'btn-success',
87 87
 										),
88 88
 
89 89
 										'print' => array(
90 90
 											'url'   => $invoice->get_view_url(),
91
-											'name'  => __( 'View', 'invoicing' ),
91
+											'name'  => __('View', 'invoicing'),
92 92
 											'class' => 'btn-secondary',
93 93
 											'attrs' => 'target="_blank"',
94 94
 										),
95 95
 									);
96 96
 
97
-									if ( ! $invoice->needs_payment() ) {
98
-										unset( $actions['pay'] );
97
+									if (!$invoice->needs_payment()) {
98
+										unset($actions['pay']);
99 99
 										}
100 100
 
101
-									if ( $invoice->needs_payment() ) {
101
+									if ($invoice->needs_payment()) {
102 102
 										$actions['delete'] = array(
103
-											'url'   => getpaid_get_authenticated_action_url( 'delete_invoice', add_query_arg( 'invoice_id', $invoice->get_id() ) ),
104
-											'name'  => __( 'Delete', 'invoicing' ),
103
+											'url'   => getpaid_get_authenticated_action_url('delete_invoice', add_query_arg('invoice_id', $invoice->get_id())),
104
+											'name'  => __('Delete', 'invoicing'),
105 105
 											'class' => 'btn-danger',
106 106
 										);
107 107
 										}
108 108
 
109
-									$actions = apply_filters( 'wpinv_user_invoices_actions', $actions, $invoice, $post_type );
109
+									$actions = apply_filters('wpinv_user_invoices_actions', $actions, $invoice, $post_type);
110 110
 
111
-									foreach ( $actions as $key => $action ) {
112
-										$class = ! empty( $action['class'] ) ? sanitize_html_class( $action['class'] ) : '';
113
-										echo '<a href="' . esc_url( $action['url'] ) . '" class="btn btn-sm btn-block ' . esc_attr( $class . ' ' . sanitize_html_class( $key ) ) . '" ' . ( ! empty( $action['attrs'] ) ? esc_html( $action['attrs'] ) : '' ) . '>' . esc_attr( $action['name'] ) . '</a>';
111
+									foreach ($actions as $key => $action) {
112
+										$class = !empty($action['class']) ? sanitize_html_class($action['class']) : '';
113
+										echo '<a href="' . esc_url($action['url']) . '" class="btn btn-sm btn-block ' . esc_attr($class . ' ' . sanitize_html_class($key)) . '" ' . (!empty($action['attrs']) ? esc_html($action['attrs']) : '') . '>' . esc_attr($action['name']) . '</a>';
114 114
 										}
115 115
 
116 116
 									break;
117 117
 
118 118
 								default:
119
-									do_action( "wpinv_user_invoices_column_$column_id", $invoice );
119
+									do_action("wpinv_user_invoices_column_$column_id", $invoice);
120 120
 									break;
121 121
 
122 122
 
123 123
 								}
124 124
 
125
-							do_action( "wpinv_user_invoices_column_after_$column_id", $invoice );
125
+							do_action("wpinv_user_invoices_column_after_$column_id", $invoice);
126 126
 
127 127
 							echo '</td>';
128 128
 
@@ -136,9 +136,9 @@  discard block
 block discarded – undo
136 136
 		</table>
137 137
 	</div>
138 138
 
139
-	<?php do_action( 'wpinv_before_user_invoices_pagination' ); ?>
139
+	<?php do_action('wpinv_before_user_invoices_pagination'); ?>
140 140
 
141
-	<?php if ( 1 < $invoices->max_num_pages ) : ?>
141
+	<?php if (1 < $invoices->max_num_pages) : ?>
142 142
 		<div class="invoicing-Pagination">
143 143
 			<?php
144 144
 			$big = 999999;
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 			echo wp_kses_post(
147 147
 				paginate_links(
148 148
 					array(
149
-						'base'   => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
149
+						'base'   => str_replace($big, '%#%', esc_url(get_pagenum_link($big))),
150 150
 						'format' => '?paged=%#%',
151 151
 						'total'  => $invoices->max_num_pages,
152 152
 					)
@@ -156,4 +156,4 @@  discard block
 block discarded – undo
156 156
 		</div>
157 157
 	<?php endif; ?>
158 158
 
159
-<?php do_action( 'wpinv_after_user_invoices', $invoices->invoices, $invoices->total, $invoices->max_num_pages, $post_type ); ?>
159
+<?php do_action('wpinv_after_user_invoices', $invoices->invoices, $invoices->total, $invoices->max_num_pages, $post_type); ?>
Please login to merge, or discard this patch.
templates/payment-forms/elements/gateway_select.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -64,8 +64,8 @@
 block discarded – undo
64 64
                         $description = wpinv_get_gateway_description( $gateway );
65 65
 
66 66
                         if ( wpinv_is_test_mode( $gateway ) ) {
67
-						$sandbox_notice = apply_filters( "getpaid_{$gateway}_sandbox_notice", __( 'SANDBOX ENABLED: No real payments will occur.', 'invoicing' ) );
68
-						$description = "$description $sandbox_notice";
67
+                        $sandbox_notice = apply_filters( "getpaid_{$gateway}_sandbox_notice", __( 'SANDBOX ENABLED: No real payments will occur.', 'invoicing' ) );
68
+                        $description = "$description $sandbox_notice";
69 69
                         }
70 70
 
71 71
                         echo wp_kses_post( wpautop( $description ) );
Please login to merge, or discard this patch.
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -7,45 +7,45 @@  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
 // The payment methods select title.
13
-if ( empty( $text ) ) {
14
-    $text = __( 'Select Payment Method', 'invoicing' );
13
+if (empty($text)) {
14
+    $text = __('Select Payment Method', 'invoicing');
15 15
 }
16 16
 
17 17
 // An array of active payment methods.
18
-$gateways = wpinv_get_enabled_payment_gateways( true );
18
+$gateways = wpinv_get_enabled_payment_gateways(true);
19 19
 
20 20
 // The current invoice id.
21 21
 $invoice_id     = 0;
22 22
 $chosen_gateway = wpinv_get_default_gateway();
23 23
 
24
-if ( ! empty( $form->invoice ) ) {
24
+if (!empty($form->invoice)) {
25 25
     $invoice_id = $form->invoice->get_id();
26 26
     $chosen_gateway = $form->invoice->get_gateway();
27 27
 }
28 28
 
29 29
 ?>
30 30
 
31
-    <?php do_action( 'getpaid_before_payment_form_gateway_select', $form ); ?>
31
+    <?php do_action('getpaid_before_payment_form_gateway_select', $form); ?>
32 32
     <div class="mt-4 mb-4 getpaid-gateways">
33 33
 
34
-        <?php do_action( 'wpinv_payment_mode_top', $invoice_id, $chosen_gateway, $gateways, $form ); ?>
34
+        <?php do_action('wpinv_payment_mode_top', $invoice_id, $chosen_gateway, $gateways, $form); ?>
35 35
 
36 36
         <div class="getpaid-select-gateway-title-div">
37
-            <h6><?php echo esc_html( $text ); ?></h6>
37
+            <h6><?php echo esc_html($text); ?></h6>
38 38
         </div>
39 39
 
40 40
         <div class="getpaid-available-gateways-div">
41 41
 
42
-            <?php foreach ( array_keys( $gateways ) as $gateway ) : ?>
42
+            <?php foreach (array_keys($gateways) as $gateway) : ?>
43 43
 
44
-                <div class="pt-1 pb-1 getpaid-gateway getpaid-gateway-<?php echo sanitize_html_class( $gateway ); ?>" data-checkout-label='<?php echo esc_attr( apply_filters( "getpaid_gateway_{$gateway}_checkout_button_label", '' ) ); ?>'>
44
+                <div class="pt-1 pb-1 getpaid-gateway getpaid-gateway-<?php echo sanitize_html_class($gateway); ?>" data-checkout-label='<?php echo esc_attr(apply_filters("getpaid_gateway_{$gateway}_checkout_button_label", '')); ?>'>
45 45
 
46 46
                     <label class="d-block w-100 getpaid-gateway-radio">
47
-                        <input type="radio" value="<?php echo esc_attr( $gateway ); ?>" <?php checked( $gateway, $chosen_gateway ); ?> name="wpi-gateway">
48
-                        <span><?php echo esc_html( wpinv_get_gateway_checkout_label( $gateway ) ); ?></span>
47
+                        <input type="radio" value="<?php echo esc_attr($gateway); ?>" <?php checked($gateway, $chosen_gateway); ?> name="wpi-gateway">
48
+                        <span><?php echo esc_html(wpinv_get_gateway_checkout_label($gateway)); ?></span>
49 49
                     </label>
50 50
 
51 51
                 </div>
@@ -56,22 +56,22 @@  discard block
 block discarded – undo
56 56
 
57 57
         <div class="getpaid-gateway-descriptions-div">
58 58
 
59
-            <?php foreach ( array_keys( $gateways ) as $gateway ) : ?>
59
+            <?php foreach (array_keys($gateways) as $gateway) : ?>
60 60
 
61
-                <div class="my-2 p-3 bg-light border getpaid-gateway-description getpaid-description-<?php echo sanitize_html_class( $gateway ); ?>" style="display: none;">
61
+                <div class="my-2 p-3 bg-light border getpaid-gateway-description getpaid-description-<?php echo sanitize_html_class($gateway); ?>" style="display: none;">
62 62
                     <?php
63 63
 
64
-                        $description = wpinv_get_gateway_description( $gateway );
64
+                        $description = wpinv_get_gateway_description($gateway);
65 65
 
66
-                        if ( wpinv_is_test_mode( $gateway ) ) {
67
-						$sandbox_notice = apply_filters( "getpaid_{$gateway}_sandbox_notice", __( 'SANDBOX ENABLED: No real payments will occur.', 'invoicing' ) );
66
+                        if (wpinv_is_test_mode($gateway)) {
67
+						$sandbox_notice = apply_filters("getpaid_{$gateway}_sandbox_notice", __('SANDBOX ENABLED: No real payments will occur.', 'invoicing'));
68 68
 						$description = "$description $sandbox_notice";
69 69
                         }
70 70
 
71
-                        echo wp_kses_post( wpautop( $description ) );
71
+                        echo wp_kses_post(wpautop($description));
72 72
 
73
-                        do_action( 'wpinv_' . $gateway . '_checkout_fields', $invoice_id );
74
-                        do_action( 'wpinv_' . $gateway . '_cc_form', $invoice_id, $form );
73
+                        do_action('wpinv_' . $gateway . '_checkout_fields', $invoice_id);
74
+                        do_action('wpinv_' . $gateway . '_cc_form', $invoice_id, $form);
75 75
 
76 76
                     ?>
77 77
                 </div>
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
             <?php
85 85
                 aui()->alert(
86 86
                     array(
87
-                        'content' => __( 'None of the available payment gateways support purchasing recurring items.', 'invoicing' ),
87
+                        'content' => __('None of the available payment gateways support purchasing recurring items.', 'invoicing'),
88 88
                         'type'    => 'danger',
89 89
                     ),
90 90
                     true
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
             <?php
97 97
                 aui()->alert(
98 98
                     array(
99
-                        'content' => __( 'None of the available payment gateways support purchasing multiple subscriptions in a single order.', 'invoicing' ),
99
+                        'content' => __('None of the available payment gateways support purchasing multiple subscriptions in a single order.', 'invoicing'),
100 100
                         'type'    => 'danger',
101 101
                     ),
102 102
                     true
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
             <?php
109 109
                 aui()->alert(
110 110
                     array(
111
-                        'content' => __( 'None of the available payment gateways support purchasing multiple subscriptions with different billing schedules in a single order.', 'invoicing' ),
111
+                        'content' => __('None of the available payment gateways support purchasing multiple subscriptions with different billing schedules in a single order.', 'invoicing'),
112 112
                         'type'    => 'danger',
113 113
                     ),
114 114
                     true
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
             <?php
121 121
                 aui()->alert(
122 122
                     array(
123
-                        'content' => __( 'There is no active payment gateway available to process your request.', 'invoicing' ),
123
+                        'content' => __('There is no active payment gateway available to process your request.', 'invoicing'),
124 124
                         'type'    => 'danger',
125 125
                     ),
126 126
                     true
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
             ?>
129 129
         </div>
130 130
 
131
-        <?php do_action( 'wpinv_payment_mode_bottom', $invoice_id, $chosen_gateway, $gateways, $form ); ?>
131
+        <?php do_action('wpinv_payment_mode_bottom', $invoice_id, $chosen_gateway, $gateways, $form); ?>
132 132
 
133 133
     </div>
134
-    <?php do_action( 'getpaid_after_payment_form_gateway_select', $form ); ?>
134
+    <?php do_action('getpaid_after_payment_form_gateway_select', $form); ?>
Please login to merge, or discard this patch.
templates/payment-forms/elements/paragraph.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -7,8 +7,8 @@
 block discarded – undo
7 7
  * @version 1.0.19
8 8
  */
9 9
 
10
-defined( 'ABSPATH' ) || exit;
10
+defined('ABSPATH') || exit;
11 11
 
12
-if ( ! empty( $element['text'] ) ) {
13
-    echo '<p>' . wp_kses_post( trim( $element['text'] ) ) . '</p>';
12
+if (!empty($element['text'])) {
13
+    echo '<p>' . wp_kses_post(trim($element['text'])) . '</p>';
14 14
 }
Please login to merge, or discard this patch.
templates/payment-forms/elements/heading.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -7,11 +7,11 @@
 block discarded – undo
7 7
  * @version 1.0.19
8 8
  */
9 9
 
10
-defined( 'ABSPATH' ) || exit;
10
+defined('ABSPATH') || exit;
11 11
 
12
-$heading_tag  = isset( $element['level'] ) ? trim( sanitize_key( $element['level'] ) ) : 'h3';
13
-$text = isset( $element['text'] ) ? trim( $element['text'] ) : '';
12
+$heading_tag = isset($element['level']) ? trim(sanitize_key($element['level'])) : 'h3';
13
+$text = isset($element['text']) ? trim($element['text']) : '';
14 14
 
15
-if ( ! empty( $text ) ) {
16
-    echo wp_kses_post( "<$heading_tag>$text</$heading_tag>" );
15
+if (!empty($text)) {
16
+    echo wp_kses_post("<$heading_tag>$text</$heading_tag>");
17 17
 }
Please login to merge, or discard this patch.
templates/payment-forms/elements/price_select.php 1 patch
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -7,35 +7,35 @@  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
 // Ensure that we have options.
13
-if ( empty( $options ) ) {
13
+if (empty($options)) {
14 14
     return;
15 15
 }
16 16
 
17 17
 // Prepare price options.
18
-$options = getpaid_convert_price_string_to_options( $options );
19
-$keys    = array_keys( $options );
20
-$value   = empty( $options ) ? '' : $keys[0];
18
+$options = getpaid_convert_price_string_to_options($options);
19
+$keys    = array_keys($options);
20
+$value   = empty($options) ? '' : $keys[0];
21 21
 
22 22
 // Prepare id.
23
-$id = esc_attr( $id );
23
+$id = esc_attr($id);
24 24
 
25
-$select_type = empty( $select_type ) ? 'select' : $select_type;
25
+$select_type = empty($select_type) ? 'select' : $select_type;
26 26
 
27 27
 // Item select;
28
-if ( $select_type == 'select' ) {
28
+if ($select_type == 'select') {
29 29
     aui()->select(
30 30
         array(
31 31
             'name'        => $id,
32
-            'id'          => $id . uniqid( '_' ),
33
-            'placeholder' => empty( $placeholder ) ? '' : esc_attr( $placeholder ),
32
+            'id'          => $id . uniqid('_'),
33
+            'placeholder' => empty($placeholder) ? '' : esc_attr($placeholder),
34 34
             'value'       => $value,
35
-            'label'       => empty( $label ) ? '' : esc_html( $label ),
35
+            'label'       => empty($label) ? '' : esc_html($label),
36 36
             'label_type'  => 'vertical',
37 37
             'class'       => 'getpaid-price-select-dropdown getpaid-refresh-on-change',
38
-            'help_text'   => empty( $description ) ? '' : wp_kses_post( $description ),
38
+            'help_text'   => empty($description) ? '' : wp_kses_post($description),
39 39
             'options'     => $options,
40 40
         ),
41 41
         true
@@ -44,18 +44,18 @@  discard block
 block discarded – undo
44 44
 }
45 45
 
46 46
 // Item radios;
47
-if ( $select_type == 'radios' ) {
47
+if ($select_type == 'radios') {
48 48
     aui()->radio(
49 49
         array(
50
-            'name'       => esc_attr( $id ),
51
-            'id'         => esc_attr( $id ) . uniqid( '_' ),
52
-            'label'      => empty( $label ) ? '' : esc_html( $label ),
50
+            'name'       => esc_attr($id),
51
+            'id'         => esc_attr($id) . uniqid('_'),
52
+            'label'      => empty($label) ? '' : esc_html($label),
53 53
             'label_type' => 'vertical',
54 54
             'class'      => 'getpaid-price-select-radio getpaid-refresh-on-change w-100',
55 55
             'value'      => $value,
56 56
             'inline'     => false,
57 57
             'options'    => $options,
58
-            'help_text'  => empty( $description ) ? '' : wp_kses_post( $description ),
58
+            'help_text'  => empty($description) ? '' : wp_kses_post($description),
59 59
         ),
60 60
         true
61 61
     );
@@ -64,32 +64,32 @@  discard block
 block discarded – undo
64 64
 
65 65
 
66 66
 // Display the label.
67
-if ( ! empty( $label ) ) {
68
-    echo '<label>' . esc_html( $label ) . '</label>';
67
+if (!empty($label)) {
68
+    echo '<label>' . esc_html($label) . '</label>';
69 69
 }
70 70
 
71 71
 // Item buttons;
72
-if ( $select_type == 'buttons' || $select_type == 'circles' ) {
72
+if ($select_type == 'buttons' || $select_type == 'circles') {
73 73
 
74 74
     $class = 'getpaid-price-buttons';
75 75
 
76
-    if ( $select_type == 'circles' ) {
76
+    if ($select_type == 'circles') {
77 77
         $class .= ' getpaid-price-circles';
78 78
     }
79
-    echo "<div class='" . esc_attr( $class ) . "'>";
79
+    echo "<div class='" . esc_attr($class) . "'>";
80 80
 
81
-    foreach ( $options as $price => $label ) {
82
-        $_id = $id . uniqid( '_' );
81
+    foreach ($options as $price => $label) {
82
+        $_id = $id . uniqid('_');
83 83
 
84 84
         $class = 'rounded';
85 85
 
86
-        if ( $select_type == 'circles' ) {
86
+        if ($select_type == 'circles') {
87 87
             $class = '';
88 88
         }
89 89
         echo "
90 90
             <span class='d-inline-block'>
91
-                <input type='radio' class='getpaid-price-select-button getpaid-refresh-on-change w-auto' id='" . esc_attr( $_id ) . "' value='" . esc_attr( $price ) . "' name='" . esc_attr( $id ) . "' " . checked( $price, $value, false ) . " />
92
-                <label for='" . esc_attr( $_id ) . "' class='" . esc_attr( $class ) . "'><span>" . esc_html( $label ) . '</span></label>
91
+                <input type='radio' class='getpaid-price-select-button getpaid-refresh-on-change w-auto' id='" . esc_attr($_id) . "' value='" . esc_attr($price) . "' name='" . esc_attr($id) . "' " . checked($price, $value, false) . " />
92
+                <label for='" . esc_attr($_id) . "' class='" . esc_attr($class) . "'><span>" . esc_html($label) . '</span></label>
93 93
             </span>
94 94
             ';
95 95
     }
@@ -99,14 +99,14 @@  discard block
 block discarded – undo
99 99
 }
100 100
 
101 101
 // Item checkboxes;
102
-if ( $select_type == 'checkboxes' ) {
102
+if ($select_type == 'checkboxes') {
103 103
     echo '<div class="form-group">';
104 104
 
105
-    foreach ( $options as $price => $label ) {
105
+    foreach ($options as $price => $label) {
106 106
         echo "
107 107
             <label class='d-block'>
108
-                <input type='checkbox' class='getpaid-price-select-checkbox getpaid-refresh-on-change w-auto' name='" . esc_attr( $id ) . "[]' value='" . esc_attr( $price ) . "' " . checked( $price, $value, false ) . ' />
109
-                <span>' . esc_html( $label ) . '</span>
108
+                <input type='checkbox' class='getpaid-price-select-checkbox getpaid-refresh-on-change w-auto' name='" . esc_attr($id) . "[]' value='" . esc_attr($price) . "' " . checked($price, $value, false) . ' />
109
+                <span>' . esc_html($label) . '</span>
110 110
             </label>
111 111
             ';
112 112
     }
@@ -115,6 +115,6 @@  discard block
 block discarded – undo
115 115
 
116 116
 }
117 117
 
118
-if ( ! empty( $description ) ) {
119
-    echo "<small class='form-text text-muted'>" . wp_kses_post( $description ) . '</small>';
118
+if (!empty($description)) {
119
+    echo "<small class='form-text text-muted'>" . wp_kses_post($description) . '</small>';
120 120
 }
Please login to merge, or discard this patch.