@@ -7,35 +7,35 @@ discard block |
||
7 | 7 | * @version 1.0.19 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
10 | +defined('ABSPATH') || exit; |
|
11 | 11 | |
12 | 12 | $value = ''; |
13 | 13 | $class = ''; |
14 | 14 | |
15 | -if ( ! empty( $form->invoice ) ) { |
|
16 | - $value = sanitize_email( $form->invoice->get_email() ); |
|
17 | -} elseif ( is_user_logged_in() ) { |
|
15 | +if (!empty($form->invoice)) { |
|
16 | + $value = sanitize_email($form->invoice->get_email()); |
|
17 | +} elseif (is_user_logged_in()) { |
|
18 | 18 | $user = wp_get_current_user(); |
19 | - $value = sanitize_email( $user->user_email ); |
|
19 | + $value = sanitize_email($user->user_email); |
|
20 | 20 | } |
21 | 21 | |
22 | -if ( ! empty( $value ) && ! empty( $hide_billing_email ) ) { |
|
22 | +if (!empty($value) && !empty($hide_billing_email)) { |
|
23 | 23 | $class = 'd-none'; |
24 | 24 | } |
25 | 25 | |
26 | -do_action( 'getpaid_before_payment_form_billing_email', $form ); |
|
26 | +do_action('getpaid_before_payment_form_billing_email', $form); |
|
27 | 27 | |
28 | -echo "<span class='" . esc_attr( $class ) . "'>"; |
|
28 | +echo "<span class='" . esc_attr($class) . "'>"; |
|
29 | 29 | |
30 | 30 | aui()->input( |
31 | 31 | array( |
32 | 32 | 'name' => 'billing_email', |
33 | - 'id' => esc_attr( $id ) . uniqid( '_' ), |
|
34 | - 'placeholder' => empty( $placeholder ) ? '' : esc_attr( $placeholder ), |
|
35 | - 'required' => ! empty( $required ), |
|
36 | - 'label' => empty( $label ) ? '' : wp_kses_post( $label ) . '<span class="text-danger"> *</span>', |
|
33 | + 'id' => esc_attr($id) . uniqid('_'), |
|
34 | + 'placeholder' => empty($placeholder) ? '' : esc_attr($placeholder), |
|
35 | + 'required' => !empty($required), |
|
36 | + 'label' => empty($label) ? '' : wp_kses_post($label) . '<span class="text-danger"> *</span>', |
|
37 | 37 | 'label_type' => 'vertical', |
38 | - 'help_text' => empty( $description ) ? '' : wp_kses_post( $description ), |
|
38 | + 'help_text' => empty($description) ? '' : wp_kses_post($description), |
|
39 | 39 | 'type' => 'email', |
40 | 40 | 'value' => $value, |
41 | 41 | 'class' => 'wpinv_billing_email', |
@@ -48,4 +48,4 @@ discard block |
||
48 | 48 | |
49 | 49 | echo '</span>'; |
50 | 50 | |
51 | -do_action( 'getpaid_after_payment_form_billing_email', $form ); |
|
51 | +do_action('getpaid_after_payment_form_billing_email', $form); |
@@ -11,26 +11,26 @@ discard block |
||
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 |
||
61 | 61 | |
62 | 62 | <?php |
63 | 63 | |
64 | - // Total tax. |
|
65 | - if ( in_array( $key, array( 'tax', 'discount', 'subtotal', 'total', 'fees' ) ) ) { |
|
66 | - wpinv_the_price( 0, $currency ); |
|
67 | - } |
|
64 | + // Total tax. |
|
65 | + if ( in_array( $key, array( 'tax', 'discount', 'subtotal', 'total', 'fees' ) ) ) { |
|
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 |
@@ -7,17 +7,17 @@ discard block |
||
7 | 7 | * @version 1.0.19 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
10 | +defined('ABSPATH') || exit; |
|
11 | 11 | |
12 | 12 | // Totals rows. |
13 | 13 | $totals = apply_filters( |
14 | 14 | 'getpaid_payment_form_cart_table_totals', |
15 | 15 | array( |
16 | - 'subtotal' => __( 'Subtotal', 'invoicing' ), |
|
17 | - 'tax' => __( 'Tax', 'invoicing' ), |
|
18 | - 'fees' => __( 'Fee', 'invoicing' ), |
|
19 | - 'discount' => __( 'Discount', 'invoicing' ), |
|
20 | - 'total' => __( 'Total', 'invoicing' ), |
|
16 | + 'subtotal' => __('Subtotal', 'invoicing'), |
|
17 | + 'tax' => __('Tax', 'invoicing'), |
|
18 | + 'fees' => __('Fee', 'invoicing'), |
|
19 | + 'discount' => __('Discount', 'invoicing'), |
|
20 | + 'total' => __('Total', 'invoicing'), |
|
21 | 21 | ), |
22 | 22 | $form |
23 | 23 | ); |
@@ -25,15 +25,15 @@ discard block |
||
25 | 25 | $currency = $form->get_currency(); |
26 | 26 | $country = wpinv_get_default_country(); |
27 | 27 | |
28 | -if ( ! empty( $form->invoice ) ) { |
|
29 | - $country = $form->invoice->get_country(); |
|
28 | +if (!empty($form->invoice)) { |
|
29 | + $country = $form->invoice->get_country(); |
|
30 | 30 | } |
31 | 31 | |
32 | -if ( ! wpinv_use_taxes() && isset( $totals['tax'] ) ) { |
|
33 | - unset( $totals['tax'] ); |
|
32 | +if (!wpinv_use_taxes() && isset($totals['tax'])) { |
|
33 | + unset($totals['tax']); |
|
34 | 34 | } |
35 | 35 | |
36 | -do_action( 'getpaid_before_payment_form_cart_totals', $form, $totals ); |
|
36 | +do_action('getpaid_before_payment_form_cart_totals', $form, $totals); |
|
37 | 37 | |
38 | 38 | ?> |
39 | 39 | <style> |
@@ -47,26 +47,26 @@ discard block |
||
47 | 47 | <div class="row"> |
48 | 48 | <div class="col-12 offset-sm-6 col-sm-6 border-sm-left pl-sm-0"> |
49 | 49 | |
50 | - <?php foreach ( $totals as $key => $label ) : ?> |
|
50 | + <?php foreach ($totals as $key => $label) : ?> |
|
51 | 51 | |
52 | - <div class="getpaid-form-cart-totals-col getpaid-form-cart-totals-<?php echo esc_attr( $key ); ?> font-weight-bold py-2 px-3 <?php echo 'total' == $key ? 'bg-light' : 'border-bottom'; ?>"> |
|
52 | + <div class="getpaid-form-cart-totals-col getpaid-form-cart-totals-<?php echo esc_attr($key); ?> font-weight-bold py-2 px-3 <?php echo 'total' == $key ? 'bg-light' : 'border-bottom'; ?>"> |
|
53 | 53 | |
54 | 54 | <div class="form-row"> |
55 | 55 | |
56 | 56 | <div class="col-8 pl-sm-0 getpaid-payment-form-line-totals-label"> |
57 | - <?php echo esc_html( $label ); ?> |
|
57 | + <?php echo esc_html($label); ?> |
|
58 | 58 | </div> |
59 | 59 | |
60 | - <div class="col-4 getpaid-payment-form-line-totals-value getpaid-form-cart-totals-total-<?php echo esc_attr( $key ); ?>"> |
|
60 | + <div class="col-4 getpaid-payment-form-line-totals-value getpaid-form-cart-totals-total-<?php echo esc_attr($key); ?>"> |
|
61 | 61 | |
62 | 62 | <?php |
63 | 63 | |
64 | 64 | // Total tax. |
65 | - if ( in_array( $key, array( 'tax', 'discount', 'subtotal', 'total', 'fees' ) ) ) { |
|
66 | - wpinv_the_price( 0, $currency ); |
|
65 | + if (in_array($key, array('tax', 'discount', 'subtotal', 'total', 'fees'))) { |
|
66 | + wpinv_the_price(0, $currency); |
|
67 | 67 | } |
68 | 68 | |
69 | - do_action( "getpaid_payment_form_cart_totals_$key", $form ); |
|
69 | + do_action("getpaid_payment_form_cart_totals_$key", $form); |
|
70 | 70 | ?> |
71 | 71 | |
72 | 72 | </div> |
@@ -82,4 +82,4 @@ discard block |
||
82 | 82 | </div> |
83 | 83 | |
84 | 84 | <?php |
85 | -do_action( 'getpaid_payment_form_cart_totals', $form, $totals ); |
|
85 | +do_action('getpaid_payment_form_cart_totals', $form, $totals); |
@@ -1,32 +1,32 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | - // Is the request set up correctly? |
|
4 | - if ( empty( $_GET['form'] ) && empty( $_GET['item'] ) ) { |
|
5 | - return aui()->alert( |
|
3 | + // Is the request set up correctly? |
|
4 | + if ( empty( $_GET['form'] ) && empty( $_GET['item'] ) ) { |
|
5 | + return aui()->alert( |
|
6 | 6 | array( |
7 | - 'type' => 'warning', |
|
8 | - 'content' => __( 'No payment form or item selected', 'invoicing' ), |
|
7 | + 'type' => 'warning', |
|
8 | + 'content' => __( 'No payment form or item selected', 'invoicing' ), |
|
9 | 9 | ) |
10 | 10 | ); |
11 | 11 | wp_die( esc_html__( 'No payment form or item selected', 'invoicing' ), 400 ); |
12 | - } |
|
12 | + } |
|
13 | 13 | |
14 | - // Payment form or button? |
|
15 | - if ( ! empty( $_GET['form'] ) ) { |
|
14 | + // Payment form or button? |
|
15 | + if ( ! empty( $_GET['form'] ) ) { |
|
16 | 16 | |
17 | - $shortcode = sprintf( |
|
17 | + $shortcode = sprintf( |
|
18 | 18 | '[getpaid form=%s]', |
19 | 19 | (int) $_GET['form'] |
20 | 20 | ); |
21 | 21 | |
22 | - } else { |
|
22 | + } else { |
|
23 | 23 | |
24 | - $shortcode = sprintf( |
|
24 | + $shortcode = sprintf( |
|
25 | 25 | '[getpaid item=%s]', |
26 | 26 | esc_attr( urldecode( $_GET['item'] ) ) |
27 | - ); |
|
27 | + ); |
|
28 | 28 | |
29 | - } |
|
29 | + } |
|
30 | 30 | |
31 | 31 | ?> |
32 | 32 | |
@@ -44,12 +44,12 @@ discard block |
||
44 | 44 | |
45 | 45 | <title>GetPaid</title> |
46 | 46 | <?php |
47 | - wp_enqueue_scripts(); |
|
48 | - wp_print_styles(); |
|
49 | - wp_print_head_scripts(); |
|
50 | - wp_custom_css_cb(); |
|
51 | - wpinv_get_template( 'frontend-head.php' ); |
|
52 | - ?> |
|
47 | + wp_enqueue_scripts(); |
|
48 | + wp_print_styles(); |
|
49 | + wp_print_head_scripts(); |
|
50 | + wp_custom_css_cb(); |
|
51 | + wpinv_get_template( 'frontend-head.php' ); |
|
52 | + ?> |
|
53 | 53 | |
54 | 54 | <style type="text/css"> |
55 | 55 | .body{ |
@@ -83,11 +83,11 @@ discard block |
||
83 | 83 | <body class="body page-template-default page"> |
84 | 84 | <div id="getpaid-form-embed" class="container my-5 page type-page status-publish hentry post post-content"> |
85 | 85 | <?php |
86 | - do_action( 'getpaid_payment_form_embed_top' ); |
|
87 | - echo do_shortcode( $shortcode ); |
|
88 | - do_action( 'getpaid_payment_form_embed_bottom' ); |
|
89 | - wpinv_get_template( 'frontend-footer.php' ); |
|
90 | - ?> |
|
86 | + do_action( 'getpaid_payment_form_embed_top' ); |
|
87 | + echo do_shortcode( $shortcode ); |
|
88 | + do_action( 'getpaid_payment_form_embed_bottom' ); |
|
89 | + wpinv_get_template( 'frontend-footer.php' ); |
|
90 | + ?> |
|
91 | 91 | </div> |
92 | 92 | <?php wp_footer(); ?> |
93 | 93 | </body> |
@@ -1,18 +1,18 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | // Is the request set up correctly? |
4 | - if ( empty( $_GET['form'] ) && empty( $_GET['item'] ) ) { |
|
4 | + if (empty($_GET['form']) && empty($_GET['item'])) { |
|
5 | 5 | return aui()->alert( |
6 | 6 | array( |
7 | 7 | 'type' => 'warning', |
8 | - 'content' => __( 'No payment form or item selected', 'invoicing' ), |
|
8 | + 'content' => __('No payment form or item selected', 'invoicing'), |
|
9 | 9 | ) |
10 | 10 | ); |
11 | -wp_die( esc_html__( 'No payment form or item selected', 'invoicing' ), 400 ); |
|
11 | +wp_die(esc_html__('No payment form or item selected', 'invoicing'), 400); |
|
12 | 12 | } |
13 | 13 | |
14 | 14 | // Payment form or button? |
15 | - if ( ! empty( $_GET['form'] ) ) { |
|
15 | + if (!empty($_GET['form'])) { |
|
16 | 16 | |
17 | 17 | $shortcode = sprintf( |
18 | 18 | '[getpaid form=%s]', |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | |
24 | 24 | $shortcode = sprintf( |
25 | 25 | '[getpaid item=%s]', |
26 | - esc_attr( urldecode( $_GET['item'] ) ) |
|
26 | + esc_attr(urldecode($_GET['item'])) |
|
27 | 27 | ); |
28 | 28 | |
29 | 29 | } |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | |
36 | 36 | <head> |
37 | 37 | |
38 | - <meta charset="<?php bloginfo( 'charset' ); ?>"> |
|
38 | + <meta charset="<?php bloginfo('charset'); ?>"> |
|
39 | 39 | <meta name="viewport" content="width=device-width, initial-scale=1.0" > |
40 | 40 | |
41 | 41 | <meta name="robots" content="noindex,nofollow"> |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | wp_print_styles(); |
49 | 49 | wp_print_head_scripts(); |
50 | 50 | wp_custom_css_cb(); |
51 | - wpinv_get_template( 'frontend-head.php' ); |
|
51 | + wpinv_get_template('frontend-head.php'); |
|
52 | 52 | ?> |
53 | 53 | |
54 | 54 | <style type="text/css"> |
@@ -83,10 +83,10 @@ discard block |
||
83 | 83 | <body class="body page-template-default page"> |
84 | 84 | <div id="getpaid-form-embed" class="container my-5 page type-page status-publish hentry post post-content"> |
85 | 85 | <?php |
86 | - do_action( 'getpaid_payment_form_embed_top' ); |
|
87 | - echo do_shortcode( $shortcode ); |
|
88 | - do_action( 'getpaid_payment_form_embed_bottom' ); |
|
89 | - wpinv_get_template( 'frontend-footer.php' ); |
|
86 | + do_action('getpaid_payment_form_embed_top'); |
|
87 | + echo do_shortcode($shortcode); |
|
88 | + do_action('getpaid_payment_form_embed_bottom'); |
|
89 | + wpinv_get_template('frontend-footer.php'); |
|
90 | 90 | ?> |
91 | 91 | </div> |
92 | 92 | <?php wp_footer(); ?> |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | |
49 | 49 | // And the optional invoice id. |
50 | 50 | if ( ! empty( $form->invoice ) ) { |
51 | - getpaid_hidden_field( 'invoice_id', $form->invoice->get_id() ); |
|
51 | + getpaid_hidden_field( 'invoice_id', $form->invoice->get_id() ); |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | // We also want to include the form id. |
@@ -68,12 +68,12 @@ discard block |
||
68 | 68 | |
69 | 69 | foreach ( $form->get_elements() as $element ) { |
70 | 70 | |
71 | - if ( isset( $element['type'] ) ) { |
|
72 | - $grid_class = getpaid_get_form_element_grid_class( $element ); |
|
73 | - echo "<div class='" . esc_attr( $grid_class ) . "'>"; |
|
74 | - do_action( 'getpaid_payment_form_element', $element, $form ); |
|
75 | - do_action( "getpaid_payment_form_element_{$element['type']}_template", $element, $form ); |
|
76 | - echo '</div>'; |
|
71 | + if ( isset( $element['type'] ) ) { |
|
72 | + $grid_class = getpaid_get_form_element_grid_class( $element ); |
|
73 | + echo "<div class='" . esc_attr( $grid_class ) . "'>"; |
|
74 | + do_action( 'getpaid_payment_form_element', $element, $form ); |
|
75 | + do_action( "getpaid_payment_form_element_{$element['type']}_template", $element, $form ); |
|
76 | + echo '</div>'; |
|
77 | 77 | } |
78 | 78 | } |
79 | 79 |
@@ -7,14 +7,14 @@ discard block |
||
7 | 7 | * @version 1.0.19 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
10 | +defined('ABSPATH') || exit; |
|
11 | 11 | |
12 | 12 | // Make sure that the form is active. |
13 | -if ( ! $form->is_active() ) { |
|
13 | +if (!$form->is_active()) { |
|
14 | 14 | aui()->alert( |
15 | 15 | array( |
16 | 16 | 'type' => 'warning', |
17 | - 'content' => __( 'This payment form is no longer active', 'invoicing' ), |
|
17 | + 'content' => __('This payment form is no longer active', 'invoicing'), |
|
18 | 18 | ), |
19 | 19 | true |
20 | 20 | ); |
@@ -22,12 +22,12 @@ discard block |
||
22 | 22 | } |
23 | 23 | |
24 | 24 | // Require login to checkout. |
25 | -if ( wpinv_require_login_to_checkout() && ! get_current_user_id() ) { |
|
25 | +if (wpinv_require_login_to_checkout() && !get_current_user_id()) { |
|
26 | 26 | |
27 | 27 | aui()->alert( |
28 | 28 | array( |
29 | 29 | 'type' => 'danger', |
30 | - 'content' => __( 'You must be logged in to checkout.', 'invoicing' ), |
|
30 | + 'content' => __('You must be logged in to checkout.', 'invoicing'), |
|
31 | 31 | ), |
32 | 32 | true |
33 | 33 | ); |
@@ -36,29 +36,29 @@ discard block |
||
36 | 36 | } |
37 | 37 | |
38 | 38 | // Fires before displaying a payment form. |
39 | -do_action( 'getpaid_before_payment_form', $form ); |
|
39 | +do_action('getpaid_before_payment_form', $form); |
|
40 | 40 | ?> |
41 | 41 | |
42 | -<form class='getpaid-payment-form getpaid-payment-form-<?php echo absint( $form->get_id() ); ?> bsui position-relative' method='POST' data-key='<?php echo esc_attr( uniqid( 'gpf' ) ); ?>' data-currency='<?php echo esc_attr( empty( $form->invoice ) ? wpinv_get_currency() : $form->invoice->get_currency() ); ?>' novalidate> |
|
42 | +<form class='getpaid-payment-form getpaid-payment-form-<?php echo absint($form->get_id()); ?> bsui position-relative' method='POST' data-key='<?php echo esc_attr(uniqid('gpf')); ?>' data-currency='<?php echo esc_attr(empty($form->invoice) ? wpinv_get_currency() : $form->invoice->get_currency()); ?>' novalidate> |
|
43 | 43 | |
44 | 44 | <?php |
45 | 45 | |
46 | 46 | // Fires when printing the top of a payment form. |
47 | - do_action( 'getpaid_payment_form_top', $form ); |
|
47 | + do_action('getpaid_payment_form_top', $form); |
|
48 | 48 | |
49 | 49 | // And the optional invoice id. |
50 | - if ( ! empty( $form->invoice ) ) { |
|
51 | - getpaid_hidden_field( 'invoice_id', $form->invoice->get_id() ); |
|
50 | + if (!empty($form->invoice)) { |
|
51 | + getpaid_hidden_field('invoice_id', $form->invoice->get_id()); |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | // We also want to include the form id. |
55 | - getpaid_hidden_field( 'form_id', $form->get_id() ); |
|
55 | + getpaid_hidden_field('form_id', $form->get_id()); |
|
56 | 56 | |
57 | 57 | // And an indication that this is a payment form submission. |
58 | - getpaid_hidden_field( 'getpaid_payment_form_submission', '1' ); |
|
58 | + getpaid_hidden_field('getpaid_payment_form_submission', '1'); |
|
59 | 59 | |
60 | 60 | // Fires before displaying payment form elements. |
61 | - do_action( 'getpaid_payment_form_before_elements', $form ); |
|
61 | + do_action('getpaid_payment_form_before_elements', $form); |
|
62 | 62 | |
63 | 63 | // Display the elements. |
64 | 64 | ?> |
@@ -66,13 +66,13 @@ discard block |
||
66 | 66 | <div class="row"> |
67 | 67 | <?php |
68 | 68 | |
69 | - foreach ( $form->get_elements() as $element ) { |
|
69 | + foreach ($form->get_elements() as $element) { |
|
70 | 70 | |
71 | - if ( isset( $element['type'] ) ) { |
|
72 | - $grid_class = getpaid_get_form_element_grid_class( $element ); |
|
73 | - echo "<div class='" . esc_attr( $grid_class ) . "'>"; |
|
74 | - do_action( 'getpaid_payment_form_element', $element, $form ); |
|
75 | - do_action( "getpaid_payment_form_element_{$element['type']}_template", $element, $form ); |
|
71 | + if (isset($element['type'])) { |
|
72 | + $grid_class = getpaid_get_form_element_grid_class($element); |
|
73 | + echo "<div class='" . esc_attr($grid_class) . "'>"; |
|
74 | + do_action('getpaid_payment_form_element', $element, $form); |
|
75 | + do_action("getpaid_payment_form_element_{$element['type']}_template", $element, $form); |
|
76 | 76 | echo '</div>'; |
77 | 77 | } |
78 | 78 | } |
@@ -83,28 +83,28 @@ discard block |
||
83 | 83 | |
84 | 84 | <?php |
85 | 85 | // Fires after displaying payment form elements. |
86 | - do_action( 'getpaid_payment_form_after_elements', $form ); |
|
86 | + do_action('getpaid_payment_form_after_elements', $form); |
|
87 | 87 | |
88 | 88 | echo "<div class='getpaid-payment-form-errors alert alert-danger d-none'></div>"; |
89 | 89 | |
90 | - if ( wpinv_current_user_can_manage_invoicing() ) { |
|
90 | + if (wpinv_current_user_can_manage_invoicing()) { |
|
91 | 91 | |
92 | 92 | edit_post_link( |
93 | - __( 'Edit this form.', 'invoicing' ), |
|
93 | + __('Edit this form.', 'invoicing'), |
|
94 | 94 | '<small class="form-text text-muted">', |
95 | - ' ' . __( 'This is only visible to website administators.', 'invoicing' ) . '</small>', |
|
95 | + ' ' . __('This is only visible to website administators.', 'invoicing') . '</small>', |
|
96 | 96 | $form->get_id(), |
97 | 97 | 'text-danger' |
98 | 98 | ); |
99 | 99 | |
100 | 100 | } |
101 | 101 | |
102 | - echo wp_kses( $extra_markup, getpaid_allowed_html() ); |
|
102 | + echo wp_kses($extra_markup, getpaid_allowed_html()); |
|
103 | 103 | ?> |
104 | 104 | |
105 | 105 | <div class="loading_div overlay overlay-black position-absolute row m-0 rounded overflow-hidden" style="height: 100%;width: 100%;top: 0px;z-index: 2;display:none;"> |
106 | 106 | <div class="spinner-border mx-auto align-self-center text-white" role="status"> |
107 | - <span class="sr-only"><?php esc_html_e( 'Loading...', 'invoicing' ); ?></span> |
|
107 | + <span class="sr-only"><?php esc_html_e('Loading...', 'invoicing'); ?></span> |
|
108 | 108 | </div> |
109 | 109 | </div> |
110 | 110 | |
@@ -113,4 +113,4 @@ discard block |
||
113 | 113 | <?php |
114 | 114 | |
115 | 115 | // Fires after displaying a payment form. |
116 | -do_action( 'getpaid_after_payment_form', $form ); |
|
116 | +do_action('getpaid_after_payment_form', $form); |
@@ -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> |
@@ -8,22 +8,22 @@ discard block |
||
8 | 8 | * @var WPInv_Invoice $invoice |
9 | 9 | */ |
10 | 10 | |
11 | -defined( 'ABSPATH' ) || exit; |
|
11 | +defined('ABSPATH') || exit; |
|
12 | 12 | |
13 | 13 | // Totals rows. |
14 | -$totals = getpaid_invoice_totals_rows( $invoice ); |
|
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 | |
25 | - <td colspan="<?php echo ( (int) $column_count ); ?>"> |
|
26 | - <?php do_action( 'wpinv_email_footer_buttons' ); ?> |
|
25 | + <td colspan="<?php echo ((int) $column_count); ?>"> |
|
26 | + <?php do_action('wpinv_email_footer_buttons'); ?> |
|
27 | 27 | </td> |
28 | 28 | |
29 | 29 | </tr> |
@@ -31,44 +31,44 @@ discard block |
||
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 | - <tr class="wpinv_cart_footer_row wpinv_cart_<?php echo esc_html( $key ); ?>_row"> |
|
36 | + <tr class="wpinv_cart_footer_row wpinv_cart_<?php echo esc_html($key); ?>_row"> |
|
37 | 37 | |
38 | - <td colspan="<?php echo absint( ( $column_count - 1 ) ); ?>" class="wpinv_cart_<?php echo esc_html( $key ); ?>_label text-right"> |
|
39 | - <strong><?php echo esc_html( $label ); ?>:</strong> |
|
38 | + <td colspan="<?php echo absint(($column_count - 1)); ?>" class="wpinv_cart_<?php echo esc_html($key); ?>_label text-right"> |
|
39 | + <strong><?php echo esc_html($label); ?>:</strong> |
|
40 | 40 | </td> |
41 | 41 | |
42 | - <td class="wpinv_cart_<?php echo esc_html( $key ); ?> text-right"> |
|
42 | + <td class="wpinv_cart_<?php echo esc_html($key); ?> text-right"> |
|
43 | 43 | |
44 | 44 | <?php |
45 | 45 | |
46 | 46 | // Total tax. |
47 | - if ( 'tax' == $key ) { |
|
48 | - wpinv_the_price( $invoice->get_total_tax(), $invoice->get_currency() ); |
|
47 | + if ('tax' == $key) { |
|
48 | + wpinv_the_price($invoice->get_total_tax(), $invoice->get_currency()); |
|
49 | 49 | } |
50 | 50 | |
51 | - if ( 'fee' == $key ) { |
|
52 | - wpinv_the_price( $invoice->get_total_fees(), $invoice->get_currency() ); |
|
51 | + if ('fee' == $key) { |
|
52 | + wpinv_the_price($invoice->get_total_fees(), $invoice->get_currency()); |
|
53 | 53 | } |
54 | 54 | |
55 | 55 | // Total discount. |
56 | - if ( 'discount' == $key ) { |
|
57 | - wpinv_the_price( $invoice->get_total_discount(), $invoice->get_currency() ); |
|
56 | + if ('discount' == $key) { |
|
57 | + wpinv_the_price($invoice->get_total_discount(), $invoice->get_currency()); |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | // Sub total. |
61 | - if ( 'subtotal' == $key ) { |
|
62 | - wpinv_the_price( $invoice->get_subtotal(), $invoice->get_currency() ); |
|
61 | + if ('subtotal' == $key) { |
|
62 | + wpinv_the_price($invoice->get_subtotal(), $invoice->get_currency()); |
|
63 | 63 | } |
64 | 64 | |
65 | 65 | // Total. |
66 | - if ( 'total' == $key ) { |
|
67 | - wpinv_the_price( $invoice->get_total(), $invoice->get_currency() ); |
|
66 | + if ('total' == $key) { |
|
67 | + wpinv_the_price($invoice->get_total(), $invoice->get_currency()); |
|
68 | 68 | } |
69 | 69 | |
70 | 70 | // Fires when printing a cart total in an email. |
71 | - do_action( "getpaid_email_cart_totals_$key", $invoice ); |
|
71 | + do_action("getpaid_email_cart_totals_$key", $invoice); |
|
72 | 72 | |
73 | 73 | ?> |
74 | 74 | |
@@ -80,4 +80,4 @@ discard block |
||
80 | 80 | |
81 | 81 | <?php |
82 | 82 | |
83 | - do_action( 'getpaid_after_email_line_totals', $invoice, $totals ); |
|
83 | + do_action('getpaid_after_email_line_totals', $invoice, $totals); |
@@ -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 sanitize_html_class( $item->get_type() ); ?>"> |
|
19 | +<tr class="wpinv_cart_item item-type-<?php echo sanitize_html_class($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 sanitize_html_class( $column ); ?>"> |
|
23 | + <td class="<?php echo 'name' == $column ? 'text-left' : 'text-right'; ?> wpinv_cart_item_<?php echo sanitize_html_class($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 sanitize_html_class( $column ); ?>"> |
|
23 | + <td class="<?php echo 'name' == $column ? 'text-left' : 'text-right'; ?> wpinv_cart_item_<?php echo sanitize_html_class($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); ?> |