@@ -31,21 +31,21 @@ discard block |
||
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 |
||
53 | 53 | |
54 | 54 | // Item quantity. |
55 | 55 | if ( 'quantity' == $column ) { |
56 | - echo '—'; |
|
56 | + echo '—'; |
|
57 | 57 | } |
58 | 58 | |
59 | 59 | // Item tax. |
60 | 60 | if ( 'tax_rate' == $column ) { |
61 | - echo '—'; |
|
61 | + echo '—'; |
|
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 | } |
@@ -9,9 +9,9 @@ discard block |
||
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 |
||
19 | 19 | |
20 | 20 | <div class="form-row 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 esc_attr( $column ); ?>"> |
|
24 | + <div class="<?php echo 'name' == $column ? 'col-12 col-sm-6' : 'col-12 col-sm'; ?> getpaid-invoice-item-<?php echo esc_attr($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 '—'; |
57 | 57 | } |
58 | 58 | |
59 | 59 | // Item tax. |
60 | - if ( 'tax_rate' == $column ) { |
|
60 | + if ('tax_rate' == $column) { |
|
61 | 61 | echo '—'; |
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 |
@@ -64,8 +64,8 @@ |
||
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 ) ); |
@@ -7,45 +7,45 @@ discard block |
||
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 esc_attr( $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 esc_attr($gateway); ?>" data-checkout-label='<?php echo esc_attr(apply_filters("getpaid_gateway_{$gateway}_checkout_button_label", '')); ?>'> |
|
45 | 45 | |
46 | 46 | <label class="form-label 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 |
||
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 esc_attr( $gateway ); ?>" style="display: none;"> |
|
61 | + <div class="my-2 p-3 bg-light border getpaid-gateway-description getpaid-description-<?php echo esc_attr($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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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); ?> |
@@ -7,8 +7,8 @@ |
||
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 | } |
@@ -7,11 +7,11 @@ |
||
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 | } |
@@ -1,11 +1,11 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | // don't load directly |
3 | -if ( ! defined( 'ABSPATH' ) ) { |
|
4 | - die( '-1' ); |
|
3 | +if (!defined('ABSPATH')) { |
|
4 | + die('-1'); |
|
5 | 5 | } |
6 | 6 | |
7 | -$email_footer = apply_filters( 'wpinv_email_footer_text', wpinv_get_option( 'email_footer_text', get_bloginfo( 'name', 'display' ) . ' - ' . __( 'Powered by GetPaid', 'invoicing' ) ) ); |
|
8 | -$email_footer = $email_footer ? wp_kses_post( wpautop( wptexturize( $email_footer ) ) ) : ''; |
|
7 | +$email_footer = apply_filters('wpinv_email_footer_text', wpinv_get_option('email_footer_text', get_bloginfo('name', 'display') . ' - ' . __('Powered by GetPaid', 'invoicing'))); |
|
8 | +$email_footer = $email_footer ? wp_kses_post(wpautop(wptexturize($email_footer))) : ''; |
|
9 | 9 | ?> |
10 | 10 | </div> |
11 | 11 | </td> |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | <table border="0" cellpadding="10" cellspacing="0" width="100%"> |
28 | 28 | <tr> |
29 | 29 | <td colspan="2" valign="middle" id="credit"> |
30 | - <?php echo wp_kses_post( $email_footer ); ?> |
|
30 | + <?php echo wp_kses_post($email_footer); ?> |
|
31 | 31 | </td> |
32 | 32 | </tr> |
33 | 33 | </table> |
@@ -30,40 +30,40 @@ |
||
30 | 30 | // Item name. |
31 | 31 | if ( 'name' == $column ) { |
32 | 32 | |
33 | - // Display the name. |
|
34 | - echo '<div class="wpinv_email_cart_item_title">' . esc_html( $item->get_name() ) . '</div>'; |
|
33 | + // Display the name. |
|
34 | + echo '<div class="wpinv_email_cart_item_title">' . esc_html( $item->get_name() ) . '</div>'; |
|
35 | 35 | |
36 | - // And an optional description. |
|
37 | - $description = $item->get_description(); |
|
36 | + // And an optional description. |
|
37 | + $description = $item->get_description(); |
|
38 | 38 | |
39 | - if ( ! empty( $description ) ) { |
|
40 | - echo "<p class='small'>" . wp_kses_post( $description ) . "</p>"; |
|
39 | + if ( ! empty( $description ) ) { |
|
40 | + echo "<p class='small'>" . wp_kses_post( $description ) . "</p>"; |
|
41 | 41 | } |
42 | 42 | } |
43 | 43 | |
44 | 44 | // Item price. |
45 | 45 | if ( 'price' == $column ) { |
46 | 46 | |
47 | - // Display the item price (or recurring price if this is a renewal invoice) |
|
48 | - $price = $invoice->is_renewal() ? $item->get_price() : $item->get_initial_price(); |
|
49 | - wpinv_the_price( $price, $invoice->get_currency() ); |
|
47 | + // Display the item price (or recurring price if this is a renewal invoice) |
|
48 | + $price = $invoice->is_renewal() ? $item->get_price() : $item->get_initial_price(); |
|
49 | + wpinv_the_price( $price, $invoice->get_currency() ); |
|
50 | 50 | |
51 | 51 | } |
52 | 52 | |
53 | 53 | // Item quantity. |
54 | 54 | if ( 'quantity' == $column ) { |
55 | - echo (float) $item->get_quantity(); |
|
55 | + echo (float) $item->get_quantity(); |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | // Tax rate. |
59 | 59 | if ( 'tax_rate' == $column ) { |
60 | - echo floatval( round( getpaid_get_invoice_tax_rate( $invoice, $item ), 2 ) ) . '%'; |
|
60 | + echo floatval( round( getpaid_get_invoice_tax_rate( $invoice, $item ), 2 ) ) . '%'; |
|
61 | 61 | } |
62 | 62 | |
63 | 63 | // Item sub total. |
64 | 64 | if ( 'subtotal' == $column ) { |
65 | - $subtotal = $invoice->is_renewal() ? $item->get_recurring_sub_total() : $item->get_sub_total(); |
|
66 | - wpinv_the_price( $subtotal, $invoice->get_currency() ); |
|
65 | + $subtotal = $invoice->is_renewal() ? $item->get_recurring_sub_total() : $item->get_sub_total(); |
|
66 | + wpinv_the_price( $subtotal, $invoice->get_currency() ); |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | // Fires when printing a line item column. |
@@ -10,64 +10,64 @@ discard block |
||
10 | 10 | * @var array $columns |
11 | 11 | */ |
12 | 12 | |
13 | -defined( 'ABSPATH' ) || exit; |
|
13 | +defined('ABSPATH') || exit; |
|
14 | 14 | |
15 | 15 | ?> |
16 | 16 | |
17 | -<?php do_action( 'getpaid_before_email_line_item', $invoice, $item ); ?> |
|
17 | +<?php do_action('getpaid_before_email_line_item', $invoice, $item); ?> |
|
18 | 18 | |
19 | -<tr class="wpinv_cart_item item-type-<?php echo esc_attr( $item->get_type() ); ?>"> |
|
19 | +<tr class="wpinv_cart_item item-type-<?php echo esc_attr($item->get_type()); ?>"> |
|
20 | 20 | |
21 | - <?php foreach ( array_keys( $columns ) as $column ) : ?> |
|
21 | + <?php foreach (array_keys($columns) as $column) : ?> |
|
22 | 22 | |
23 | - <td class="<?php echo 'name' == $column ? 'text-left' : 'text-right'; ?> wpinv_cart_item_<?php echo esc_attr( $column ); ?>"> |
|
23 | + <td class="<?php echo 'name' == $column ? 'text-left' : 'text-right'; ?> wpinv_cart_item_<?php echo esc_attr($column); ?>"> |
|
24 | 24 | |
25 | 25 | <?php |
26 | 26 | |
27 | 27 | // Fires before printing a line item column. |
28 | - do_action( "getpaid_email_line_item_before_$column", $item, $invoice ); |
|
28 | + do_action("getpaid_email_line_item_before_$column", $item, $invoice); |
|
29 | 29 | |
30 | 30 | // Item name. |
31 | - if ( 'name' == $column ) { |
|
31 | + if ('name' == $column) { |
|
32 | 32 | |
33 | 33 | // Display the name. |
34 | - echo '<div class="wpinv_email_cart_item_title">' . esc_html( $item->get_name() ) . '</div>'; |
|
34 | + echo '<div class="wpinv_email_cart_item_title">' . esc_html($item->get_name()) . '</div>'; |
|
35 | 35 | |
36 | 36 | // And an optional description. |
37 | 37 | $description = $item->get_description(); |
38 | 38 | |
39 | - if ( ! empty( $description ) ) { |
|
40 | - echo "<p class='small'>" . wp_kses_post( $description ) . "</p>"; |
|
39 | + if (!empty($description)) { |
|
40 | + echo "<p class='small'>" . wp_kses_post($description) . "</p>"; |
|
41 | 41 | } |
42 | 42 | } |
43 | 43 | |
44 | 44 | // Item price. |
45 | - if ( 'price' == $column ) { |
|
45 | + if ('price' == $column) { |
|
46 | 46 | |
47 | 47 | // Display the item price (or recurring price if this is a renewal invoice) |
48 | 48 | $price = $invoice->is_renewal() ? $item->get_price() : $item->get_initial_price(); |
49 | - wpinv_the_price( $price, $invoice->get_currency() ); |
|
49 | + wpinv_the_price($price, $invoice->get_currency()); |
|
50 | 50 | |
51 | 51 | } |
52 | 52 | |
53 | 53 | // Item quantity. |
54 | - if ( 'quantity' == $column ) { |
|
54 | + if ('quantity' == $column) { |
|
55 | 55 | echo (float) $item->get_quantity(); |
56 | 56 | } |
57 | 57 | |
58 | 58 | // Tax rate. |
59 | - if ( 'tax_rate' == $column ) { |
|
60 | - echo floatval( round( getpaid_get_invoice_tax_rate( $invoice, $item ), 2 ) ) . '%'; |
|
59 | + if ('tax_rate' == $column) { |
|
60 | + echo floatval(round(getpaid_get_invoice_tax_rate($invoice, $item), 2)) . '%'; |
|
61 | 61 | } |
62 | 62 | |
63 | 63 | // Item sub total. |
64 | - if ( 'subtotal' == $column ) { |
|
64 | + if ('subtotal' == $column) { |
|
65 | 65 | $subtotal = $invoice->is_renewal() ? $item->get_recurring_sub_total() : $item->get_sub_total(); |
66 | - wpinv_the_price( $subtotal, $invoice->get_currency() ); |
|
66 | + wpinv_the_price($subtotal, $invoice->get_currency()); |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | // Fires when printing a line item column. |
70 | - do_action( "getpaid_email_line_item_$column", $item, $invoice ); |
|
70 | + do_action("getpaid_email_line_item_$column", $item, $invoice); |
|
71 | 71 | |
72 | 72 | ?> |
73 | 73 | |
@@ -77,4 +77,4 @@ discard block |
||
77 | 77 | |
78 | 78 | </tr> |
79 | 79 | |
80 | -<?php do_action( 'getpaid_after_email_line_item', $invoice, $item ); ?> |
|
80 | +<?php do_action('getpaid_after_email_line_item', $invoice, $item); ?> |
@@ -7,21 +7,21 @@ |
||
7 | 7 | * @version 1.0.19 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
10 | +defined('ABSPATH') || exit; |
|
11 | 11 | |
12 | -do_action( 'wpinv_email_header', $email_heading, $invoice, $email_type, $sent_to_admin ); |
|
12 | +do_action('wpinv_email_header', $email_heading, $invoice, $email_type, $sent_to_admin); |
|
13 | 13 | |
14 | -do_action( 'wpinv_email_before_note_details', $invoice, $email_type, $sent_to_admin, $customer_note ); |
|
14 | +do_action('wpinv_email_before_note_details', $invoice, $email_type, $sent_to_admin, $customer_note); |
|
15 | 15 | |
16 | 16 | // Generate the custom message body. |
17 | -echo wp_kses_post( wptexturize( str_replace( '{customer_note}', $customer_note, $message_body ) ) ); |
|
17 | +echo wp_kses_post(wptexturize(str_replace('{customer_note}', $customer_note, $message_body))); |
|
18 | 18 | |
19 | -do_action( 'wpinv_email_invoice_details', $invoice, $email_type, $sent_to_admin ); |
|
19 | +do_action('wpinv_email_invoice_details', $invoice, $email_type, $sent_to_admin); |
|
20 | 20 | |
21 | -do_action( 'wpinv_email_invoice_items', $invoice, $email_type, $sent_to_admin ); |
|
21 | +do_action('wpinv_email_invoice_items', $invoice, $email_type, $sent_to_admin); |
|
22 | 22 | |
23 | -do_action( 'wpinv_email_billing_details', $invoice, $email_type, $sent_to_admin ); |
|
23 | +do_action('wpinv_email_billing_details', $invoice, $email_type, $sent_to_admin); |
|
24 | 24 | |
25 | -do_action( 'wpinv_email_after_note_details', $invoice, $email_type, $sent_to_admin, $customer_note ); |
|
25 | +do_action('wpinv_email_after_note_details', $invoice, $email_type, $sent_to_admin, $customer_note); |
|
26 | 26 | |
27 | -do_action( 'wpinv_email_footer', $invoice, $email_type, $sent_to_admin ); |
|
27 | +do_action('wpinv_email_footer', $invoice, $email_type, $sent_to_admin); |
@@ -30,21 +30,21 @@ discard block |
||
30 | 30 | // Item name. |
31 | 31 | if ( 'name' == $column ) { |
32 | 32 | |
33 | - // Display the name. |
|
34 | - echo '<div class="wpinv_email_cart_item_title">' . esc_html( $fee['name'] ) . '</div>'; |
|
33 | + // Display the name. |
|
34 | + echo '<div class="wpinv_email_cart_item_title">' . esc_html( $fee['name'] ) . '</div>'; |
|
35 | 35 | |
36 | - // And an optional description. |
|
37 | - $description = empty( $fee['description'] ) ? esc_html__( 'Fee', 'invoicing' ) : esc_html( $fee['description'] ); |
|
38 | - echo wp_kses_post( "<p class='small'>$description</p>" ); |
|
36 | + // And an optional description. |
|
37 | + $description = empty( $fee['description'] ) ? esc_html__( 'Fee', 'invoicing' ) : esc_html( $fee['description'] ); |
|
38 | + echo wp_kses_post( "<p class='small'>$description</p>" ); |
|
39 | 39 | |
40 | 40 | } |
41 | 41 | |
42 | 42 | // Item price. |
43 | 43 | if ( 'price' == $column ) { |
44 | 44 | |
45 | - // Display the item price (or recurring price if this is a renewal invoice) |
|
46 | - if ( $invoice->is_recurring() && $invoice->is_renewal() ) { |
|
47 | - wpinv_the_price( $fee['recurring_fee'], $invoice->get_currency() ); |
|
45 | + // Display the item price (or recurring price if this is a renewal invoice) |
|
46 | + if ( $invoice->is_recurring() && $invoice->is_renewal() ) { |
|
47 | + wpinv_the_price( $fee['recurring_fee'], $invoice->get_currency() ); |
|
48 | 48 | } else { |
49 | 49 | wpinv_the_price( $fee['initial_fee'], $invoice->get_currency() ); |
50 | 50 | } |
@@ -52,18 +52,18 @@ discard block |
||
52 | 52 | |
53 | 53 | // Item quantity. |
54 | 54 | if ( 'quantity' == $column ) { |
55 | - echo '—'; |
|
55 | + echo '—'; |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | // Item tax. |
59 | 59 | if ( 'tax_rate' == $column ) { |
60 | - echo '—'; |
|
60 | + echo '—'; |
|
61 | 61 | } |
62 | 62 | |
63 | 63 | // Item sub total. |
64 | 64 | if ( 'subtotal' == $column ) { |
65 | - if ( $invoice->is_recurring() && $invoice->is_renewal() ) { |
|
66 | - wpinv_the_price( $fee['recurring_fee'], $invoice->get_currency() ); |
|
65 | + if ( $invoice->is_recurring() && $invoice->is_renewal() ) { |
|
66 | + wpinv_the_price( $fee['recurring_fee'], $invoice->get_currency() ); |
|
67 | 67 | } else { |
68 | 68 | wpinv_the_price( $fee['initial_fee'], $invoice->get_currency() ); |
69 | 69 | } |
@@ -10,67 +10,67 @@ discard block |
||
10 | 10 | * @var array $columns |
11 | 11 | */ |
12 | 12 | |
13 | -defined( 'ABSPATH' ) || exit; |
|
13 | +defined('ABSPATH') || exit; |
|
14 | 14 | |
15 | 15 | ?> |
16 | 16 | |
17 | -<?php do_action( 'getpaid_before_email_fee_item', $invoice, $fee ); ?> |
|
17 | +<?php do_action('getpaid_before_email_fee_item', $invoice, $fee); ?> |
|
18 | 18 | |
19 | 19 | <tr class="wpinv_cart_item item-fee"> |
20 | 20 | |
21 | - <?php foreach ( array_keys( $columns ) as $column ) : ?> |
|
21 | + <?php foreach (array_keys($columns) as $column) : ?> |
|
22 | 22 | |
23 | - <td class="<?php echo 'name' == $column ? 'text-left' : 'text-right'; ?> wpinv_cart_item_<?php echo esc_attr( $column ); ?>"> |
|
23 | + <td class="<?php echo 'name' == $column ? 'text-left' : 'text-right'; ?> wpinv_cart_item_<?php echo esc_attr($column); ?>"> |
|
24 | 24 | |
25 | 25 | <?php |
26 | 26 | |
27 | 27 | // Fires before printing a fee item column. |
28 | - do_action( "getpaid_email_fee_item_before_$column", $fee, $invoice ); |
|
28 | + do_action("getpaid_email_fee_item_before_$column", $fee, $invoice); |
|
29 | 29 | |
30 | 30 | // Item name. |
31 | - if ( 'name' == $column ) { |
|
31 | + if ('name' == $column) { |
|
32 | 32 | |
33 | 33 | // Display the name. |
34 | - echo '<div class="wpinv_email_cart_item_title">' . esc_html( $fee['name'] ) . '</div>'; |
|
34 | + echo '<div class="wpinv_email_cart_item_title">' . esc_html($fee['name']) . '</div>'; |
|
35 | 35 | |
36 | 36 | // And an optional description. |
37 | - $description = empty( $fee['description'] ) ? esc_html__( 'Fee', 'invoicing' ) : esc_html( $fee['description'] ); |
|
38 | - echo wp_kses_post( "<p class='small'>$description</p>" ); |
|
37 | + $description = empty($fee['description']) ? esc_html__('Fee', 'invoicing') : esc_html($fee['description']); |
|
38 | + echo wp_kses_post("<p class='small'>$description</p>"); |
|
39 | 39 | |
40 | 40 | } |
41 | 41 | |
42 | 42 | // Item price. |
43 | - if ( 'price' == $column ) { |
|
43 | + if ('price' == $column) { |
|
44 | 44 | |
45 | 45 | // Display the item price (or recurring price if this is a renewal invoice) |
46 | - if ( $invoice->is_recurring() && $invoice->is_renewal() ) { |
|
47 | - wpinv_the_price( $fee['recurring_fee'], $invoice->get_currency() ); |
|
46 | + if ($invoice->is_recurring() && $invoice->is_renewal()) { |
|
47 | + wpinv_the_price($fee['recurring_fee'], $invoice->get_currency()); |
|
48 | 48 | } else { |
49 | - wpinv_the_price( $fee['initial_fee'], $invoice->get_currency() ); |
|
49 | + wpinv_the_price($fee['initial_fee'], $invoice->get_currency()); |
|
50 | 50 | } |
51 | 51 | } |
52 | 52 | |
53 | 53 | // Item quantity. |
54 | - if ( 'quantity' == $column ) { |
|
54 | + if ('quantity' == $column) { |
|
55 | 55 | echo '—'; |
56 | 56 | } |
57 | 57 | |
58 | 58 | // Item tax. |
59 | - if ( 'tax_rate' == $column ) { |
|
59 | + if ('tax_rate' == $column) { |
|
60 | 60 | echo '—'; |
61 | 61 | } |
62 | 62 | |
63 | 63 | // Item sub total. |
64 | - if ( 'subtotal' == $column ) { |
|
65 | - if ( $invoice->is_recurring() && $invoice->is_renewal() ) { |
|
66 | - wpinv_the_price( $fee['recurring_fee'], $invoice->get_currency() ); |
|
64 | + if ('subtotal' == $column) { |
|
65 | + if ($invoice->is_recurring() && $invoice->is_renewal()) { |
|
66 | + wpinv_the_price($fee['recurring_fee'], $invoice->get_currency()); |
|
67 | 67 | } else { |
68 | - wpinv_the_price( $fee['initial_fee'], $invoice->get_currency() ); |
|
68 | + wpinv_the_price($fee['initial_fee'], $invoice->get_currency()); |
|
69 | 69 | } |
70 | 70 | } |
71 | 71 | |
72 | 72 | // Fires when printing a line item column. |
73 | - do_action( "getpaid_email_fee_item_$column", $fee, $invoice ); |
|
73 | + do_action("getpaid_email_fee_item_$column", $fee, $invoice); |
|
74 | 74 | |
75 | 75 | ?> |
76 | 76 | |
@@ -80,4 +80,4 @@ discard block |
||
80 | 80 | |
81 | 81 | </tr> |
82 | 82 | |
83 | -<?php do_action( 'getpaid_after_email_fee_item', $invoice, $fee ); ?> |
|
83 | +<?php do_action('getpaid_after_email_fee_item', $invoice, $fee); ?> |
@@ -126,25 +126,25 @@ |
||
126 | 126 | |
127 | 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>" ); |
|
139 | + echo wp_kses_post( "<a href='$url' class='btn btn-sm ml-1 $class $key' $attrs>$anchor</a>" ); |
|
140 | 140 | } |
141 | 141 | |
142 | - echo '</div>'; |
|
142 | + echo '</div>'; |
|
143 | 143 | |
144 | 144 | } |
145 | 145 | |
146 | 146 | if ( ! empty( $alert ) ) { |
147 | - echo wp_kses_post( $alert ); |
|
147 | + echo wp_kses_post( $alert ); |
|
148 | 148 | } |
149 | 149 | |
150 | 150 | ?> |
@@ -7,64 +7,64 @@ discard block |
||
7 | 7 | * @version 1.0.19 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
10 | +defined('ABSPATH') || exit; |
|
11 | 11 | |
12 | 12 | // Fetch the invoice. |
13 | -$invoice = new WPInv_Invoice( $invoice ); |
|
13 | +$invoice = new WPInv_Invoice($invoice); |
|
14 | 14 | |
15 | 15 | // @deprecated |
16 | -do_action( 'wpinv_success_content_before', $invoice ); |
|
17 | -do_action( 'wpinv_before_receipt', $invoice ); |
|
16 | +do_action('wpinv_success_content_before', $invoice); |
|
17 | +do_action('wpinv_before_receipt', $invoice); |
|
18 | 18 | |
19 | 19 | wpinv_print_errors(); |
20 | 20 | |
21 | 21 | // Prepare header text. |
22 | -if ( $invoice->is_paid() ) { |
|
22 | +if ($invoice->is_paid()) { |
|
23 | 23 | |
24 | 24 | $alert = aui()->alert( |
25 | 25 | array( |
26 | 26 | 'type' => 'success', |
27 | - 'content' => __( 'Thank you for your payment!', 'invoicing' ), |
|
27 | + 'content' => __('Thank you for your payment!', 'invoicing'), |
|
28 | 28 | ) |
29 | 29 | ); |
30 | 30 | |
31 | -} elseif ( $invoice->is_refunded() ) { |
|
31 | +} elseif ($invoice->is_refunded()) { |
|
32 | 32 | |
33 | 33 | $alert = aui()->alert( |
34 | 34 | array( |
35 | 35 | 'type' => 'info', |
36 | - 'content' => __( 'This invoice was refunded.', 'invoicing' ), |
|
36 | + 'content' => __('This invoice was refunded.', 'invoicing'), |
|
37 | 37 | ) |
38 | 38 | ); |
39 | 39 | |
40 | -} elseif ( $invoice->is_held() ) { |
|
40 | +} elseif ($invoice->is_held()) { |
|
41 | 41 | |
42 | 42 | $alert = aui()->alert( |
43 | 43 | array( |
44 | 44 | 'type' => 'info', |
45 | - 'content' => __( 'This invoice will be processed as soon we verify your payment.', 'invoicing' ), |
|
45 | + 'content' => __('This invoice will be processed as soon we verify your payment.', 'invoicing'), |
|
46 | 46 | ) |
47 | 47 | ); |
48 | 48 | |
49 | -} elseif ( $invoice->needs_payment() ) { |
|
49 | +} elseif ($invoice->needs_payment()) { |
|
50 | 50 | |
51 | - if ( ! empty( $_GET['token'] ) ) { |
|
51 | + if (!empty($_GET['token'])) { |
|
52 | 52 | |
53 | 53 | $alert = aui()->alert( |
54 | 54 | array( |
55 | 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' ), |
|
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 | 57 | ) |
58 | 58 | ); |
59 | 59 | |
60 | - } elseif ( $invoice->is_due() ) { |
|
60 | + } elseif ($invoice->is_due()) { |
|
61 | 61 | |
62 | 62 | $alert = aui()->alert( |
63 | 63 | array( |
64 | 64 | 'type' => 'danger', |
65 | 65 | 'content' => sprintf( |
66 | - __( 'This invoice was due on %.', 'invoicing' ), |
|
67 | - getpaid_format_date_value( $invoice->get_due_date() ) |
|
66 | + __('This invoice was due on %.', 'invoicing'), |
|
67 | + getpaid_format_date_value($invoice->get_due_date()) |
|
68 | 68 | ), |
69 | 69 | ) |
70 | 70 | ); |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | $alert = aui()->alert( |
75 | 75 | array( |
76 | 76 | 'type' => 'warning', |
77 | - 'content' => __( 'This invoice needs payment.', 'invoicing' ), |
|
77 | + 'content' => __('This invoice needs payment.', 'invoicing'), |
|
78 | 78 | ) |
79 | 79 | ); |
80 | 80 | |
@@ -88,19 +88,19 @@ discard block |
||
88 | 88 | |
89 | 89 | 'pay' => array( |
90 | 90 | 'url' => $invoice->get_checkout_payment_url(), |
91 | - 'name' => __( 'Pay For Invoice', 'invoicing' ), |
|
91 | + 'name' => __('Pay For Invoice', 'invoicing'), |
|
92 | 92 | 'class' => 'btn-success', |
93 | 93 | ), |
94 | 94 | |
95 | 95 | 'view' => array( |
96 | 96 | 'url' => $invoice->get_view_url(), |
97 | - 'name' => __( 'View Invoice', 'invoicing' ), |
|
97 | + 'name' => __('View Invoice', 'invoicing'), |
|
98 | 98 | 'class' => 'btn-primary', |
99 | 99 | ), |
100 | 100 | |
101 | 101 | 'history' => array( |
102 | 102 | 'url' => wpinv_get_history_page_uri(), |
103 | - 'name' => __( 'Invoice History', 'invoicing' ), |
|
103 | + 'name' => __('Invoice History', 'invoicing'), |
|
104 | 104 | 'class' => 'btn-warning', |
105 | 105 | ), |
106 | 106 | |
@@ -108,12 +108,12 @@ discard block |
||
108 | 108 | $invoice |
109 | 109 | ); |
110 | 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 | ?> |
@@ -122,29 +122,29 @@ discard block |
||
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 | 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>" ); |
|
139 | + echo wp_kses_post("<a href='$url' class='btn btn-sm ml-1 $class $key' $attrs>$anchor</a>"); |
|
140 | 140 | } |
141 | 141 | |
142 | 142 | echo '</div>'; |
143 | 143 | |
144 | 144 | } |
145 | 145 | |
146 | - if ( ! empty( $alert ) ) { |
|
147 | - echo wp_kses_post( $alert ); |
|
146 | + if (!empty($alert)) { |
|
147 | + echo wp_kses_post($alert); |
|
148 | 148 | } |
149 | 149 | |
150 | 150 | ?> |
@@ -152,19 +152,19 @@ discard block |
||
152 | 152 | <div class="wpinv-receipt-details"> |
153 | 153 | |
154 | 154 | <h4 class="wpinv-details-t mb-3 mt-3"> |
155 | - <?php echo esc_html( apply_filters( 'wpinv_receipt_details_title', __( 'Invoice Details', 'invoicing' ), $invoice ) ); ?> |
|
155 | + <?php echo esc_html(apply_filters('wpinv_receipt_details_title', __('Invoice Details', 'invoicing'), $invoice)); ?> |
|
156 | 156 | </h4> |
157 | 157 | |
158 | - <?php getpaid_invoice_meta( $invoice ); ?> |
|
158 | + <?php getpaid_invoice_meta($invoice); ?> |
|
159 | 159 | |
160 | 160 | </div> |
161 | 161 | |
162 | - <?php do_action( 'wpinv_receipt_end', $invoice ); ?> |
|
162 | + <?php do_action('wpinv_receipt_end', $invoice); ?> |
|
163 | 163 | |
164 | 164 | </div> |
165 | 165 | |
166 | 166 | <?php |
167 | 167 | |
168 | 168 | // @deprecated |
169 | -do_action( 'wpinv_success_content_after', $invoice ); |
|
170 | -do_action( 'wpinv_after_receipt', $invoice ); |
|
169 | +do_action('wpinv_success_content_after', $invoice); |
|
170 | +do_action('wpinv_after_receipt', $invoice); |