Passed
Pull Request — master (#785)
by
unknown
14:17
created
templates/payment-forms/elements/alert.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 an alert in payment form
4 4
  *
@@ -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
-if ( empty( $text ) ) {
13
-    return;
12
+    if ( empty( $text ) ) {
13
+        return;
14 14
 }
15 15
 
16
-aui()->alert(
17
-    array(
18
-        'content'     => wp_kses_post( $text ),
19
-        'dismissible' => ! empty( $dismissible ),
20
-        'type'        => empty( $class ) ? 'info' : str_replace( 'alert-', '', $class ),
21
-    ),
22
-    true
23
-);
16
+    aui()->alert(
17
+        array(
18
+            'content'     => wp_kses_post( $text ),
19
+            'dismissible' => ! empty( $dismissible ),
20
+            'type'        => empty( $class ) ? 'info' : str_replace( 'alert-', '', $class ),
21
+        ),
22
+        true
23
+    );
Please login to merge, or discard this patch.
templates/payment-forms/elements/separator.php 1 patch
Switch Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php
1
+    <?php
2 2
 /**
3 3
  * Displays a separator in payment form
4 4
  *
@@ -7,6 +7,6 @@  discard block
 block discarded – undo
7 7
  * @version 1.0.19
8 8
  */
9 9
 
10
-defined( 'ABSPATH' ) || exit;
11
-?>
12
-<hr class="featurette-divider" />
10
+    defined( 'ABSPATH' ) || exit;
11
+    ?>
12
+    <hr class="featurette-divider" />
Please login to merge, or discard this patch.
templates/payment-forms/elements/email.php 1 patch
Switch Indentation   +21 added lines, -21 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 email input in payment form
4 4
  *
@@ -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
-$label = empty( $label ) ? '' : wp_kses_post( $label );
13
-$label_class = sanitize_key( preg_replace( '/[^A-Za-z0-9_-]/', '-', $label ) );
12
+    $label = empty( $label ) ? '' : wp_kses_post( $label );
13
+    $label_class = sanitize_key( preg_replace( '/[^A-Za-z0-9_-]/', '-', $label ) );
14 14
 
15
-if ( ! empty( $required ) ) {
16
-    $label .= "<span class='text-danger'> *</span>";
15
+    if ( ! empty( $required ) ) {
16
+        $label .= "<span class='text-danger'> *</span>";
17 17
 }
18 18
 
19
-aui()->input(
20
-    array(
21
-        'name'        => esc_attr( $id ),
22
-        'id'          => esc_attr( $element_id ),
23
-        'placeholder' => empty( $placeholder ) ? '' : esc_attr( $placeholder ),
24
-        'required'    => ! empty( $required ),
25
-        'label'       => $label,
26
-        'label_type'  => 'vertical',
27
-        'help_text'   => empty( $description ) ? '' : wp_kses_post( $description ),
28
-        'type'        => 'email',
29
-        'class'       => $label_class,
30
-        'value'       => $query_value,
31
-    ),
32
-    true
33
-);
19
+    aui()->input(
20
+        array(
21
+            'name'        => esc_attr( $id ),
22
+            'id'          => esc_attr( $element_id ),
23
+            'placeholder' => empty( $placeholder ) ? '' : esc_attr( $placeholder ),
24
+            'required'    => ! empty( $required ),
25
+            'label'       => $label,
26
+            'label_type'  => 'vertical',
27
+            'help_text'   => empty( $description ) ? '' : wp_kses_post( $description ),
28
+            'type'        => 'email',
29
+            'class'       => $label_class,
30
+            'value'       => $query_value,
31
+        ),
32
+        true
33
+    );
Please login to merge, or discard this patch.
templates/payment-forms/variations/checkbox.php 1 patch
Switch Indentation   +27 added lines, -27 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 checkbox item-select box in a payment form
4 4
  *
@@ -7,40 +7,40 @@  discard block
 block discarded – undo
7 7
  * @version 1.0.19
8 8
  */
9 9
 
10
-defined( 'ABSPATH' ) || exit;
10
+    defined( 'ABSPATH' ) || exit;
11 11
 
12
-// Prepare the selectable items.
13
-$selectable = array();
14
-foreach ( $form->get_items() as $item ) {
15
-    if ( ! $item->is_required ) {
16
-        $selectable[ $item->get_id() ] = $item->get_name() . ' &mdash; ' . wpinv_price( $item->get_initial_price() );
17
-    }
12
+    // Prepare the selectable items.
13
+    $selectable = array();
14
+    foreach ( $form->get_items() as $item ) {
15
+        if ( ! $item->is_required ) {
16
+            $selectable[ $item->get_id() ] = $item->get_name() . ' &mdash; ' . wpinv_price( $item->get_initial_price() );
17
+        }
18 18
 }
19 19
 
20
-if ( empty( $selectable ) ) {
21
-    return;
20
+    if ( empty( $selectable ) ) {
21
+        return;
22 22
 }
23 23
 
24
-echo '<div class="getpaid-payment-form-items-checkbox form-group mb-3">';
24
+    echo '<div class="getpaid-payment-form-items-checkbox form-group mb-3">';
25 25
 
26
-foreach ( $selectable as $item_id => $item_name ) {
26
+    foreach ( $selectable as $item_id => $item_name ) {
27 27
 
28
-    $is_checked = get_post_meta( $item_id, 'selected_by_default', true );
28
+        $is_checked = get_post_meta( $item_id, 'selected_by_default', true );
29 29
 
30
-    aui()->input(
31
-        array(
32
-            'type'    => 'checkbox',
33
-            'name'    => 'getpaid-payment-form-selected-item',
34
-            'id'      => 'getpaid-payment-form-selected-item' . uniqid( '_' ) . $item_id,
35
-            'label'   => $item_name,
36
-            'value'   => $item_id,
37
-            'no_wrap' => true,
38
-            'class'   => 'w-auto',
39
-            'checked' => '1' == $is_checked,
40
-        ),
41
-        true
42
-    );
30
+        aui()->input(
31
+            array(
32
+                'type'    => 'checkbox',
33
+                'name'    => 'getpaid-payment-form-selected-item',
34
+                'id'      => 'getpaid-payment-form-selected-item' . uniqid( '_' ) . $item_id,
35
+                'label'   => $item_name,
36
+                'value'   => $item_id,
37
+                'no_wrap' => true,
38
+                'class'   => 'w-auto',
39
+                'checked' => '1' == $is_checked,
40
+            ),
41
+            true
42
+        );
43 43
 
44 44
 }
45 45
 
46
-echo '</div>';
46
+    echo '</div>';
Please login to merge, or discard this patch.
templates/payment-forms/variations/select.php 1 patch
Switch Indentation   +25 added lines, -25 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 item-select box in a payment form
4 4
  *
@@ -7,34 +7,34 @@  discard block
 block discarded – undo
7 7
  * @version 1.0.19
8 8
  */
9 9
 
10
-defined( 'ABSPATH' ) || exit;
10
+    defined( 'ABSPATH' ) || exit;
11 11
 
12
-// Prepare the selectable items.
13
-$selectable = array();
14
-foreach ( $form->get_items() as $item ) {
15
-    if ( ! $item->is_required ) {
16
-        $selectable[ $item->get_id() ] = strip_tags( $item->get_name() . ' &mdash; ' . wpinv_price( $item->get_initial_price() ) );
17
-    }
12
+    // Prepare the selectable items.
13
+    $selectable = array();
14
+    foreach ( $form->get_items() as $item ) {
15
+        if ( ! $item->is_required ) {
16
+            $selectable[ $item->get_id() ] = strip_tags( $item->get_name() . ' &mdash; ' . wpinv_price( $item->get_initial_price() ) );
17
+        }
18 18
 }
19 19
 
20
-if ( empty( $selectable ) ) {
21
-    return;
20
+    if ( empty( $selectable ) ) {
21
+        return;
22 22
 }
23 23
 
24
-echo '<div class="getpaid-payment-form-items-select form-group mb-3">';
24
+    echo '<div class="getpaid-payment-form-items-select form-group mb-3">';
25 25
 
26
-// Display the selectable items.
27
-aui()->select(
28
-    array(
29
-        'name'       => 'getpaid-payment-form-selected-item',
30
-        'id'         => 'getpaid-payment-form-selected-item' . uniqid( '_' ),
31
-        'required'   => true,
32
-        'label'      => __( 'Select Item', 'invoicing' ),
33
-        'label_type' => 'vertical',
34
-        'inline'     => false,
35
-        'options'    => $selectable,
36
-    ),
37
-    true
38
-);
26
+    // Display the selectable items.
27
+    aui()->select(
28
+        array(
29
+            'name'       => 'getpaid-payment-form-selected-item',
30
+            'id'         => 'getpaid-payment-form-selected-item' . uniqid( '_' ),
31
+            'required'   => true,
32
+            'label'      => __( 'Select Item', 'invoicing' ),
33
+            'label_type' => 'vertical',
34
+            'inline'     => false,
35
+            'options'    => $selectable,
36
+        ),
37
+        true
38
+    );
39 39
 
40
-echo '</div>';
40
+    echo '</div>';
Please login to merge, or discard this patch.
templates/payment-forms/variations/radio.php 1 patch
Switch Indentation   +26 added lines, -26 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 radio item-select box in a payment form
4 4
  *
@@ -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
-// Prepare the selectable items.
13
-$selectable = array();
14
-foreach ( $form->get_items() as $item ) {
15
-    if ( ! $item->is_required ) {
16
-        $selectable[ $item->get_id() ] = $item->get_name() . ' &mdash; ' . wpinv_price( $item->get_initial_price() );
17
-    }
12
+    // Prepare the selectable items.
13
+    $selectable = array();
14
+    foreach ( $form->get_items() as $item ) {
15
+        if ( ! $item->is_required ) {
16
+            $selectable[ $item->get_id() ] = $item->get_name() . ' &mdash; ' . wpinv_price( $item->get_initial_price() );
17
+        }
18 18
 }
19 19
 
20
-if ( empty( $selectable ) ) {
21
-    return;
20
+    if ( empty( $selectable ) ) {
21
+        return;
22 22
 }
23 23
 
24
-echo '<div class="getpaid-payment-form-items-radio form-group mb-3">';
24
+    echo '<div class="getpaid-payment-form-items-radio form-group mb-3">';
25 25
 
26
-// Display the selectable items.
27
-aui()->radio(
28
-    array(
29
-        'name'       => 'getpaid-payment-form-selected-item',
30
-        'id'         => 'getpaid-payment-form-selected-item' . uniqid( '_' ),
31
-        'required'   => true,
32
-        'label'      => __( 'Select Item', 'invoicing' ),
33
-        'label_type' => 'vertical',
34
-        'class'      => 'w-auto',
35
-        'inline'     => false,
36
-        'options'    => $selectable,
37
-    ),
38
-    true
39
-);
26
+    // Display the selectable items.
27
+    aui()->radio(
28
+        array(
29
+            'name'       => 'getpaid-payment-form-selected-item',
30
+            'id'         => 'getpaid-payment-form-selected-item' . uniqid( '_' ),
31
+            'required'   => true,
32
+            'label'      => __( 'Select Item', 'invoicing' ),
33
+            'label_type' => 'vertical',
34
+            'class'      => 'w-auto',
35
+            'inline'     => false,
36
+            'options'    => $selectable,
37
+        ),
38
+        true
39
+    );
40 40
 
41
-echo '</div>';
41
+    echo '</div>';
Please login to merge, or discard this patch.
templates/payment-forms/cart-totals.php 1 patch
Switch Indentation   +32 added lines, -32 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 cart totals in a payment form
4 4
  *
@@ -7,35 +7,35 @@  discard block
 block discarded – undo
7 7
  * @version 1.0.19
8 8
  */
9 9
 
10
-defined( 'ABSPATH' ) || exit;
11
-
12
-// Totals rows.
13
-$cart_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
23
-);
24
-
25
-$currency = $form->get_currency();
26
-$country  = wpinv_get_default_country();
27
-
28
-if ( ! empty( $form->invoice ) ) {
29
-	$country  = $form->invoice->get_country();
10
+    defined( 'ABSPATH' ) || exit;
11
+
12
+    // Totals rows.
13
+    $cart_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
23
+    );
24
+
25
+    $currency = $form->get_currency();
26
+    $country  = wpinv_get_default_country();
27
+
28
+    if ( ! empty( $form->invoice ) ) {
29
+	    $country  = $form->invoice->get_country();
30 30
 }
31 31
 
32
-if ( ! wpinv_use_taxes() && isset( $cart_totals['tax'] ) ) {
33
-	unset( $cart_totals['tax'] );
32
+    if ( ! wpinv_use_taxes() && isset( $cart_totals['tax'] ) ) {
33
+	    unset( $cart_totals['tax'] );
34 34
 }
35 35
 
36
-do_action( 'getpaid_before_payment_form_cart_totals', $form, $cart_totals );
36
+    do_action( 'getpaid_before_payment_form_cart_totals', $form, $cart_totals );
37 37
 
38
-?>
38
+    ?>
39 39
 <style>
40 40
 	@media screen and (min-width: 576px) {
41 41
 		.bsui .border-sm-left {
@@ -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' ), true ) ) {
66
-									wpinv_the_price( 0, $currency );
67
-								}
64
+								    // Total tax.
65
+								    if ( in_array( $key, array( 'tax', 'discount', 'subtotal', 'total', 'fees' ), true ) ) {
66
+									    wpinv_the_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
 
@@ -82,4 +82,4 @@  discard block
 block discarded – undo
82 82
 </div>
83 83
 
84 84
 <?php
85
-do_action( 'getpaid_payment_form_cart_totals', $form, $cart_totals );
85
+    do_action( 'getpaid_payment_form_cart_totals', $form, $cart_totals );
Please login to merge, or discard this patch.
templates/invoice-receipt.php 1 patch
Switch Indentation   +99 added lines, -99 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php
1
+    <?php
2 2
 /**
3 3
  * Template that prints the invoice receipt page.
4 4
  *
@@ -7,153 +7,153 @@  discard block
 block discarded – undo
7 7
  * @version 1.0.19
8 8
  */
9 9
 
10
-defined( 'ABSPATH' ) || exit;
11
-
12
-// Fetch the invoice.
13
-$invoice = new WPInv_Invoice( $invoice );
14
-
15
-// @deprecated
16
-do_action( 'wpinv_success_content_before', $invoice );
17
-do_action( 'wpinv_before_receipt', $invoice );
10
+    defined( 'ABSPATH' ) || exit;
18 11
 
19
-wpinv_print_errors();
12
+    // Fetch the invoice.
13
+    $invoice = new WPInv_Invoice( $invoice );
20 14
 
21
-// Prepare header text.
22
-if ( $invoice->is_paid() ) {
15
+    // @deprecated
16
+    do_action( 'wpinv_success_content_before', $invoice );
17
+    do_action( 'wpinv_before_receipt', $invoice );
23 18
 
24
-    $alert = aui()->alert(
25
-        array(
26
-            'type'    => 'success',
27
-            'content' => __( 'Thank you for your payment!', 'invoicing' ),
28
-        )
29
-    );
30
-
31
-} elseif ( $invoice->is_refunded() ) {
32
-
33
-    $alert = aui()->alert(
34
-        array(
35
-            'type'    => 'info',
36
-            'content' => __( 'This invoice was refunded.', 'invoicing' ),
37
-        )
38
-    );
39
-
40
-} elseif ( $invoice->is_held() ) {
41
-
42
-    $alert = aui()->alert(
43
-        array(
44
-            'type'    => 'info',
45
-            'content' => __( 'This invoice will be processed as soon we verify your payment.', 'invoicing' ),
46
-        )
47
-    );
48
-
49
-} elseif ( $invoice->needs_payment() ) {
19
+    wpinv_print_errors();
50 20
 
51
-    if ( ! empty( $_GET['token'] ) ) {
21
+    // Prepare header text.
22
+    if ( $invoice->is_paid() ) {
52 23
 
53 24
         $alert = aui()->alert(
54 25
             array(
55
-                'type'    => 'info',
56
-                'content' => __( "Sometimes it takes a few minutes for us to verify your payment. We'll notify you as soon as we've verified the payment.", 'invoicing' ),
26
+                'type'    => 'success',
27
+                'content' => __( 'Thank you for your payment!', 'invoicing' ),
57 28
             )
58 29
         );
59 30
 
60
-    } elseif ( $invoice->is_due() ) {
31
+} elseif ( $invoice->is_refunded() ) {
61 32
 
62 33
         $alert = aui()->alert(
63 34
             array(
64
-                'type'    => 'danger',
65
-                'content' => sprintf(
66
-                    __( 'This invoice was due on %.', 'invoicing' ),
67
-                    getpaid_format_date_value( $invoice->get_due_date() )
68
-                ),
35
+                'type'    => 'info',
36
+                'content' => __( 'This invoice was refunded.', 'invoicing' ),
69 37
             )
70 38
         );
71 39
 
72
-    } else {
40
+} elseif ( $invoice->is_held() ) {
73 41
 
74 42
         $alert = aui()->alert(
75 43
             array(
76
-                'type'    => 'warning',
77
-                'content' => __( 'This invoice needs payment.', 'invoicing' ),
44
+                'type'    => 'info',
45
+                'content' => __( 'This invoice will be processed as soon we verify your payment.', 'invoicing' ),
78 46
             )
79 47
         );
80 48
 
81
-    }
49
+} elseif ( $invoice->needs_payment() ) {
50
+
51
+        if ( ! empty( $_GET['token'] ) ) {
52
+
53
+            $alert = aui()->alert(
54
+                array(
55
+                    'type'    => 'info',
56
+                    'content' => __( "Sometimes it takes a few minutes for us to verify your payment. We'll notify you as soon as we've verified the payment.", 'invoicing' ),
57
+                )
58
+            );
59
+
60
+        } elseif ( $invoice->is_due() ) {
61
+
62
+            $alert = aui()->alert(
63
+                array(
64
+                    'type'    => 'danger',
65
+                    'content' => sprintf(
66
+                        __( 'This invoice was due on %.', 'invoicing' ),
67
+                        getpaid_format_date_value( $invoice->get_due_date() )
68
+                    ),
69
+                )
70
+            );
71
+
72
+        } else {
73
+
74
+            $alert = aui()->alert(
75
+                array(
76
+                    'type'    => 'warning',
77
+                    'content' => __( 'This invoice needs payment.', 'invoicing' ),
78
+                )
79
+            );
80
+
81
+        }
82 82
 }
83 83
 
84
-// Invoice actions.
85
-$invoice_actions = apply_filters(
86
-    'wpinv_invoice_receipt_actions',
87
-    array(
84
+    // Invoice actions.
85
+    $invoice_actions = apply_filters(
86
+        'wpinv_invoice_receipt_actions',
87
+        array(
88
+
89
+            'pay'     => array(
90
+                'url'   => $invoice->get_checkout_payment_url(),
91
+                'name'  => __( 'Pay For Invoice', 'invoicing' ),
92
+                'class' => 'btn-success',
93
+            ),
88 94
 
89
-        'pay'     => array(
90
-            'url'   => $invoice->get_checkout_payment_url(),
91
-            'name'  => __( 'Pay For Invoice', 'invoicing' ),
92
-            'class' => 'btn-success',
93
-        ),
95
+            'view'    => array(
96
+                'url'   => $invoice->get_view_url(),
97
+                'name'  => __( 'View Invoice', 'invoicing' ),
98
+                'class' => 'btn-primary',
99
+            ),
94 100
 
95
-        'view'    => array(
96
-            'url'   => $invoice->get_view_url(),
97
-            'name'  => __( 'View Invoice', 'invoicing' ),
98
-            'class' => 'btn-primary',
99
-        ),
101
+            'history' => array(
102
+                'url'   => wpinv_get_history_page_uri(),
103
+                'name'  => __( 'Invoice History', 'invoicing' ),
104
+                'class' => 'btn-warning',
105
+            ),
100 106
 
101
-        'history' => array(
102
-            'url'   => wpinv_get_history_page_uri(),
103
-            'name'  => __( 'Invoice History', 'invoicing' ),
104
-            'class' => 'btn-warning',
105 107
         ),
108
+        $invoice
109
+    );
106 110
 
107
-    ),
108
-    $invoice
109
-);
110
-
111
-if ( ( ! $invoice->needs_payment() || $invoice->is_held() ) && isset( $invoice_actions['pay'] ) ) {
112
-    unset( $invoice_actions['pay'] );
111
+    if ( ( ! $invoice->needs_payment() || $invoice->is_held() ) && isset( $invoice_actions['pay'] ) ) {
112
+        unset( $invoice_actions['pay'] );
113 113
 }
114 114
 
115
-if ( ! is_user_logged_in() && isset( $invoice_actions['history'] ) ) {
116
-    unset( $invoice_actions['history'] );
115
+    if ( ! is_user_logged_in() && isset( $invoice_actions['history'] ) ) {
116
+        unset( $invoice_actions['history'] );
117 117
 }
118 118
 
119
-?>
119
+    ?>
120 120
 
121 121
     <div class="wpinv-receipt">
122 122
 
123 123
         <?php
124 124
 
125
-            do_action( 'wpinv_receipt_start', $invoice );
125
+                do_action( 'wpinv_receipt_start', $invoice );
126 126
 
127
-            if ( ! empty( $invoice_actions ) ) {
127
+                if ( ! empty( $invoice_actions ) ) {
128 128
 
129
-			echo '<div class="wpinv-receipt-actions text-right mt-1 mb-4">';
129
+			    echo '<div class="wpinv-receipt-actions text-right mt-1 mb-4">';
130 130
 
131
-			foreach ( $invoice_actions as $key => $invoice_action ) {
131
+			    foreach ( $invoice_actions as $key => $invoice_action ) {
132 132
 
133
-				$key    = sanitize_html_class( $key );
134
-				$class  = empty( $invoice_action['class'] ) ? 'btn-dark' : sanitize_html_class( $invoice_action['class'] );
135
-				$url    = empty( $invoice_action['url'] ) ? '#' : esc_url( $invoice_action['url'] );
136
-				$attrs  = empty( $invoice_action['attrs'] ) ? '' : $invoice_action['attrs'];
137
-				$anchor = esc_html( $invoice_action['name'] );
133
+				    $key    = sanitize_html_class( $key );
134
+				    $class  = empty( $invoice_action['class'] ) ? 'btn-dark' : sanitize_html_class( $invoice_action['class'] );
135
+				    $url    = empty( $invoice_action['url'] ) ? '#' : esc_url( $invoice_action['url'] );
136
+				    $attrs  = empty( $invoice_action['attrs'] ) ? '' : $invoice_action['attrs'];
137
+				    $anchor = esc_html( $invoice_action['name'] );
138 138
 
139
-				echo wp_kses_post( "<a href='$url' class='btn btn-sm ml-1 $class $key' $attrs>$anchor</a>" );
140
-                }
139
+				    echo wp_kses_post( "<a href='$url' class='btn btn-sm ml-1 $class $key' $attrs>$anchor</a>" );
140
+                    }
141 141
 
142
-			echo '</div>';
142
+			    echo '</div>';
143 143
 
144
-            }
144
+                }
145 145
 
146
-            if ( ! empty( $alert ) ) {
147
-			echo wp_kses_post( $alert );
148
-            }
146
+                if ( ! empty( $alert ) ) {
147
+			    echo wp_kses_post( $alert );
148
+                }
149 149
 
150
-        ?>
150
+            ?>
151 151
 
152 152
         <div class="wpinv-receipt-details">
153 153
 
154 154
             <h4 class="wpinv-details-t mb-3 mt-3">
155 155
                 <?php echo esc_html( apply_filters( 'wpinv_receipt_details_title', __( 'Invoice Details', 'invoicing' ), $invoice ) ); ?>
156
-            </h4>
156
+                </h4>
157 157
 
158 158
             <?php getpaid_invoice_meta( $invoice ); ?>
159 159
 
@@ -165,6 +165,6 @@  discard block
 block discarded – undo
165 165
 
166 166
 <?php
167 167
 
168
-// @deprecated
169
-do_action( 'wpinv_success_content_after', $invoice );
170
-do_action( 'wpinv_after_receipt', $invoice );
168
+    // @deprecated
169
+    do_action( 'wpinv_success_content_after', $invoice );
170
+    do_action( 'wpinv_after_receipt', $invoice );
Please login to merge, or discard this patch.
templates/emails/wpinv-email-subscription_complete.php 1 patch
Switch Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php
1
+    <?php
2 2
 /**
3 3
  * Template that generates the completed subscription email.
4 4
  *
@@ -8,18 +8,18 @@  discard block
 block discarded – undo
8 8
  * @var WPInv_Subscription $object
9 9
  */
10 10
 
11
-defined( 'ABSPATH' ) || exit;
11
+    defined( 'ABSPATH' ) || exit;
12 12
 
13
-$invoice = $object->get_parent_payment();
13
+    $invoice = $object->get_parent_payment();
14 14
 
15
-// Print the email header.
16
-do_action( 'wpinv_email_header', $email_heading, $invoice, $email_type, $sent_to_admin );
15
+    // Print the email header.
16
+    do_action( 'wpinv_email_header', $email_heading, $invoice, $email_type, $sent_to_admin );
17 17
 
18
-// Generate the custom message body.
19
-echo wp_kses_post( $message_body );
18
+    // Generate the custom message body.
19
+    echo wp_kses_post( $message_body );
20 20
 
21
-// Print the billing details.
22
-do_action( 'wpinv_email_billing_details', $invoice, $email_type, $sent_to_admin );
21
+    // Print the billing details.
22
+    do_action( 'wpinv_email_billing_details', $invoice, $email_type, $sent_to_admin );
23 23
 
24
-// Print the email footer.
25
-do_action( 'wpinv_email_footer', $invoice, $email_type, $sent_to_admin );
24
+    // Print the email footer.
25
+    do_action( 'wpinv_email_footer', $invoice, $email_type, $sent_to_admin );
Please login to merge, or discard this patch.