Passed
Push — master ( ffa28a...1dfee0 )
by Brian
04:50
created
templates/payment-forms/cart-totals.php 1 patch
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -11,26 +11,26 @@  discard block
 block discarded – undo
11 11
 
12 12
 // Totals rows.
13 13
 $totals = apply_filters(
14
-	'getpaid_payment_form_cart_table_totals',
15
-	array(
16
-		'subtotal' => __( 'Subtotal', 'invoicing' ),
17
-		'tax'      => __( 'Tax', 'invoicing' ),
18
-		'fees'     => __( 'Fee', 'invoicing' ),
19
-		'discount' => __( 'Discount', 'invoicing' ),
20
-		'total'    => __( 'Total', 'invoicing' ),
21
-	),
22
-	$form
14
+    'getpaid_payment_form_cart_table_totals',
15
+    array(
16
+        'subtotal' => __( 'Subtotal', 'invoicing' ),
17
+        'tax'      => __( 'Tax', 'invoicing' ),
18
+        'fees'     => __( 'Fee', 'invoicing' ),
19
+        'discount' => __( 'Discount', 'invoicing' ),
20
+        'total'    => __( 'Total', 'invoicing' ),
21
+    ),
22
+    $form
23 23
 );
24 24
 
25 25
 $currency = $form->get_currency();
26 26
 $country  = wpinv_get_default_country();
27 27
 
28 28
 if ( ! empty( $form->invoice ) ) {
29
-	$country  = $form->invoice->get_country();
29
+    $country  = $form->invoice->get_country();
30 30
 }
31 31
 
32 32
 if ( ! wpinv_use_taxes() && isset( $totals['tax'] ) ) {
33
-	unset( $totals['tax'] );
33
+    unset( $totals['tax'] );
34 34
 }
35 35
 
36 36
 do_action( 'getpaid_before_payment_form_cart_totals', $form, $totals );
@@ -61,13 +61,13 @@  discard block
 block discarded – undo
61 61
 
62 62
 							<?php
63 63
 
64
-								// Total tax.
65
-								if ( in_array( $key, array( 'tax', 'discount', 'subtotal', 'total', 'fees' ) ) ) {
66
-									echo wpinv_price( 0, $currency );
67
-								}
64
+                                // Total tax.
65
+                                if ( in_array( $key, array( 'tax', 'discount', 'subtotal', 'total', 'fees' ) ) ) {
66
+                                    echo wpinv_price( 0, $currency );
67
+                                }
68 68
 
69
-								do_action( "getpaid_payment_form_cart_totals_$key", $form );
70
-							?>
69
+                                do_action( "getpaid_payment_form_cart_totals_$key", $form );
70
+                            ?>
71 71
 
72 72
 						</div>
73 73
 
Please login to merge, or discard this patch.
templates/payment-forms/cart-item.php 1 patch
Indentation   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -24,48 +24,48 @@  discard block
 block discarded – undo
24 24
 
25 25
 				<?php
26 26
 
27
-					// Fires before printing a line item column.
28
-					do_action( "getpaid_form_cart_item_before_$key", $item, $form );
27
+                    // Fires before printing a line item column.
28
+                    do_action( "getpaid_form_cart_item_before_$key", $item, $form );
29 29
 
30
-					// Item name.
31
-					if ( 'name' == $key ) {
30
+                    // Item name.
31
+                    if ( 'name' == $key ) {
32 32
 
33
-						// Display the name.
34
-						echo '<div class="mb-1">' . sanitize_text_field( $item->get_name() ) . '</div>';
33
+                        // Display the name.
34
+                        echo '<div class="mb-1">' . sanitize_text_field( $item->get_name() ) . '</div>';
35 35
 
36
-						// And an optional description.
36
+                        // And an optional description.
37 37
                         $description = $item->get_description();
38 38
 
39 39
                         if ( ! empty( $description ) ) {
40 40
                             $description = wp_kses_post( $description );
41 41
                             echo "<small class='form-text text-muted pr-2 m-0'>$description</small>";
42
-						}
42
+                        }
43 43
 
44
-						// Price help text.
44
+                        // Price help text.
45 45
                         $description = getpaid_item_recurring_price_help_text( $item, $currency );
46 46
                         if ( $description ) {
47 47
                             echo "<small class='form-text text-muted pr-2 m-0'>$description</small>";
48
-						}
48
+                        }
49 49
 
50
-					}
50
+                    }
51 51
 
52
-					// Item price.
53
-					if ( 'price' == $key ) {
52
+                    // Item price.
53
+                    if ( 'price' == $key ) {
54 54
 
55
-						// Set the currency position.
56
-						$position = wpinv_currency_position();
55
+                        // Set the currency position.
56
+                        $position = wpinv_currency_position();
57 57
 
58
-						if ( $position == 'left_space' ) {
59
-							$position = 'left';
60
-						}
58
+                        if ( $position == 'left_space' ) {
59
+                            $position = 'left';
60
+                        }
61 61
 
62
-						if ( $position == 'right_space' ) {
63
-							$position = 'right';
64
-						}
62
+                        if ( $position == 'right_space' ) {
63
+                            $position = 'right';
64
+                        }
65 65
 
66
-						if ( $item->user_can_set_their_price() ) {
67
-							$price = max( (float) $item->get_price(), (float) $item->get_minimum_price() );
68
-							?>
66
+                        if ( $item->user_can_set_their_price() ) {
67
+                            $price = max( (float) $item->get_price(), (float) $item->get_minimum_price() );
68
+                            ?>
69 69
 								<div class="input-group input-group-sm">
70 70
 									<?php if( 'left' == $position ) : ?>
71 71
 										<div class="input-group-prepend">
@@ -81,37 +81,37 @@  discard block
 block discarded – undo
81 81
 									<?php endif; ?>
82 82
 								</div>
83 83
 							<?php
84
-						} else {
85
-							echo wpinv_price( $item->get_price(), $currency );
86
-							?>
84
+                        } else {
85
+                            echo wpinv_price( $item->get_price(), $currency );
86
+                            ?>
87 87
 								<input name='getpaid-items[<?php echo (int) $item->get_id(); ?>][price]' type='hidden' class='getpaid-item-price-input' value='<?php echo esc_attr( $item->get_price() ); ?>'>
88 88
 							<?php
89
-						}
90
-					}
89
+                        }
90
+                    }
91 91
 
92
-					// Item quantity.
93
-					if ( 'quantity' == $key ) {
92
+                    // Item quantity.
93
+                    if ( 'quantity' == $key ) {
94 94
 
95
-						if ( $item->allows_quantities() ) {
96
-							?>
95
+                        if ( $item->allows_quantities() ) {
96
+                            ?>
97 97
 								<input name='getpaid-items[<?php echo (int) $item->get_id(); ?>][quantity]' type='number' class='getpaid-item-quantity-input p-1 align-middle font-weight-normal shadow-none m-0 rounded-0 text-center border' value='<?php echo (int) $item->get_qantity(); ?>' min='1' required>
98 98
 							<?php
99
-						} else {
100
-							echo (int) $item->get_qantity();
101
-							echo '&nbsp;&nbsp;&nbsp;';
102
-							?>
99
+                        } else {
100
+                            echo (int) $item->get_qantity();
101
+                            echo '&nbsp;&nbsp;&nbsp;';
102
+                            ?>
103 103
 								<input type='hidden' name='getpaid-items[<?php echo (int) $item->get_id(); ?>][quantity]' class='getpaid-item-quantity-input' value='<?php echo (int) $item->get_qantity(); ?>'>
104 104
 							<?php
105
-						}
106
-					}
105
+                        }
106
+                    }
107 107
 
108
-					// Item sub total.
109
-					if ( 'subtotal' == $key ) {
110
-						echo wpinv_price( $item->get_sub_total(), $currency );
111
-					}
108
+                    // Item sub total.
109
+                    if ( 'subtotal' == $key ) {
110
+                        echo wpinv_price( $item->get_sub_total(), $currency );
111
+                    }
112 112
 
113
-					do_action( "getpaid_payment_form_cart_item_$key", $item, $form );
114
-				?>
113
+                    do_action( "getpaid_payment_form_cart_item_$key", $item, $form );
114
+                ?>
115 115
 
116 116
 			</div>
117 117
 
Please login to merge, or discard this patch.