@@ -1,2 +1,2 @@ |
||
1 | -<?php |
|
1 | + <?php |
|
2 | 2 | # Silence is golden. |
3 | 3 | \ No newline at end of file |
@@ -1,2 +1,2 @@ |
||
1 | -<?php |
|
1 | + <?php |
|
2 | 2 | # Silence is golden. |
3 | 3 | \ No newline at end of file |
@@ -1,2 +1,2 @@ |
||
1 | -<?php |
|
1 | + <?php |
|
2 | 2 | # Silence is golden. |
3 | 3 | \ No newline at end of file |
@@ -1,2 +1,2 @@ |
||
1 | -<?php |
|
1 | + <?php |
|
2 | 2 | # Silence is golden. |
3 | 3 | \ No newline at end of file |
@@ -1,2 +1,2 @@ |
||
1 | -<?php |
|
1 | + <?php |
|
2 | 2 | # Silence is golden. |
3 | 3 | \ No newline at end of file |
@@ -1,2 +1,2 @@ |
||
1 | -<?php |
|
1 | + <?php |
|
2 | 2 | # Silence is golden. |
3 | 3 | \ No newline at end of file |
@@ -1,2 +1,2 @@ |
||
1 | -<?php |
|
1 | + <?php |
|
2 | 2 | # Silence is golden. |
3 | 3 | \ No newline at end of file |
@@ -1,2 +1,2 @@ |
||
1 | -<?php |
|
1 | + <?php |
|
2 | 2 | # Silence is golden. |
3 | 3 | \ No newline at end of file |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php |
|
1 | + <?php |
|
2 | 2 | /** |
3 | 3 | * Displays invoice totals in emails. |
4 | 4 | * |
@@ -8,17 +8,17 @@ discard block |
||
8 | 8 | * @var WPInv_Invoice $invoice |
9 | 9 | */ |
10 | 10 | |
11 | -defined( 'ABSPATH' ) || exit; |
|
11 | + defined( 'ABSPATH' ) || exit; |
|
12 | 12 | |
13 | -// Totals rows. |
|
14 | -$totals = getpaid_invoice_totals_rows( $invoice ); |
|
13 | + // Totals rows. |
|
14 | + $totals = getpaid_invoice_totals_rows( $invoice ); |
|
15 | 15 | |
16 | -do_action( 'getpaid_before_email_line_totals', $invoice, $totals ); |
|
16 | + do_action( 'getpaid_before_email_line_totals', $invoice, $totals ); |
|
17 | 17 | |
18 | -?> |
|
18 | + ?> |
|
19 | + |
|
19 | 20 | |
20 | - |
|
21 | -<?php if ( has_action( 'wpinv_email_footer_buttons' ) ) : ?> |
|
21 | + <?php if ( has_action( 'wpinv_email_footer_buttons' ) ) : ?> |
|
22 | 22 | |
23 | 23 | <tr class="wpinv_cart_footer_row"> |
24 | 24 | |
@@ -29,9 +29,9 @@ discard block |
||
29 | 29 | </tr> |
30 | 30 | |
31 | 31 | <?php endif; ?> |
32 | + |
|
32 | 33 | |
33 | - |
|
34 | -<?php foreach ( $totals as $key => $label ) : ?> |
|
34 | + <?php foreach ( $totals as $key => $label ) : ?> |
|
35 | 35 | |
36 | 36 | <tr class="wpinv_cart_footer_row wpinv_cart_<?php echo esc_html( $key ); ?>_row"> |
37 | 37 | |
@@ -43,46 +43,46 @@ discard block |
||
43 | 43 | |
44 | 44 | <?php |
45 | 45 | |
46 | - // Total tax. |
|
47 | - if ( 'tax' == $key ) { |
|
48 | - wpinv_the_price( $invoice->get_total_tax(), $invoice->get_currency() ); |
|
49 | - } |
|
46 | + // Total tax. |
|
47 | + if ( 'tax' == $key ) { |
|
48 | + wpinv_the_price( $invoice->get_total_tax(), $invoice->get_currency() ); |
|
49 | + } |
|
50 | 50 | |
51 | - // Individual taxes. |
|
52 | - if ( 0 === strpos( $key, 'tax__' ) ) { |
|
53 | - wpinv_the_price( $invoice->get_tax_total_by_name( str_replace( 'tax__', '', $key ) ), $invoice->get_currency() ); |
|
54 | - } |
|
51 | + // Individual taxes. |
|
52 | + if ( 0 === strpos( $key, 'tax__' ) ) { |
|
53 | + wpinv_the_price( $invoice->get_tax_total_by_name( str_replace( 'tax__', '', $key ) ), $invoice->get_currency() ); |
|
54 | + } |
|
55 | 55 | |
56 | - if ( 'fee' == $key ) { |
|
57 | - wpinv_the_price( $invoice->get_total_fees(), $invoice->get_currency() ); |
|
58 | - } |
|
56 | + if ( 'fee' == $key ) { |
|
57 | + wpinv_the_price( $invoice->get_total_fees(), $invoice->get_currency() ); |
|
58 | + } |
|
59 | 59 | |
60 | - // Total discount. |
|
61 | - if ( 'discount' == $key ) { |
|
62 | - wpinv_the_price( $invoice->get_total_discount(), $invoice->get_currency() ); |
|
63 | - } |
|
60 | + // Total discount. |
|
61 | + if ( 'discount' == $key ) { |
|
62 | + wpinv_the_price( $invoice->get_total_discount(), $invoice->get_currency() ); |
|
63 | + } |
|
64 | 64 | |
65 | - // Sub total. |
|
66 | - if ( 'subtotal' == $key ) { |
|
67 | - wpinv_the_price( $invoice->get_subtotal(), $invoice->get_currency() ); |
|
68 | - } |
|
65 | + // Sub total. |
|
66 | + if ( 'subtotal' == $key ) { |
|
67 | + wpinv_the_price( $invoice->get_subtotal(), $invoice->get_currency() ); |
|
68 | + } |
|
69 | 69 | |
70 | - // Total. |
|
71 | - if ( 'total' == $key ) { |
|
72 | - wpinv_the_price( $invoice->get_total(), $invoice->get_currency() ); |
|
73 | - } |
|
70 | + // Total. |
|
71 | + if ( 'total' == $key ) { |
|
72 | + wpinv_the_price( $invoice->get_total(), $invoice->get_currency() ); |
|
73 | + } |
|
74 | 74 | |
75 | - // Fires when printing a cart total in an email. |
|
76 | - do_action( "getpaid_email_cart_totals_$key", $invoice ); |
|
75 | + // Fires when printing a cart total in an email. |
|
76 | + do_action( "getpaid_email_cart_totals_$key", $invoice ); |
|
77 | 77 | |
78 | - ?> |
|
78 | + ?> |
|
79 | 79 | |
80 | 80 | </td> |
81 | 81 | |
82 | 82 | </tr> |
83 | 83 | |
84 | 84 | <?php endforeach; ?> |
85 | + |
|
86 | + <?php |
|
85 | 87 | |
86 | -<?php |
|
87 | - |
|
88 | - do_action( 'getpaid_after_email_line_totals', $invoice, $totals ); |
|
88 | + do_action( 'getpaid_after_email_line_totals', $invoice, $totals ); |