@@ -20,35 +20,35 @@ |
||
20 | 20 | |
21 | 21 | switch ( $column ) : |
22 | 22 | |
23 | - case 'subscription': |
|
24 | - $subscription_id = (int) $subscription->get_id(); |
|
25 | - $url = esc_url( $subscription->get_view_url() ); |
|
26 | - $id_label = sprintf( |
|
27 | - esc_attr_x( '#%s', 'subscription id', 'invoicing' ), |
|
28 | - (int) $subscription->get_id() |
|
29 | - ); |
|
30 | - echo wp_kses_post( $widget->add_row_actions( "<a href='$url' class='font-weight-bold text-decoration-none'>$id_label</a>", $subscription ) ); |
|
31 | - break; |
|
32 | - |
|
33 | - case 'status': |
|
34 | - echo esc_html( $subscription->get_status_label() ); |
|
35 | - break; |
|
36 | - |
|
37 | - case 'renewal-date': |
|
38 | - $renewal = getpaid_format_date_value( $subscription->get_next_renewal_date() ); |
|
39 | - echo $subscription->is_active() ? esc_html( $renewal ) : '—'; |
|
40 | - break; |
|
41 | - |
|
42 | - case 'amount': |
|
43 | - $frequency = getpaid_get_subscription_period_label( $subscription->get_period(), $subscription->get_frequency(), '' ); |
|
44 | - $amount = wpinv_price( $subscription->get_recurring_amount(), $subscription->get_parent_payment()->get_currency() ); |
|
45 | - echo wp_kses_post( "<span>$amount</span> / <span class='getpaid-item-recurring-period'>$frequency</span>" ); |
|
46 | - break; |
|
47 | - |
|
48 | - endswitch; |
|
49 | - |
|
50 | - do_action( "getpaid_subscriptions_frontend_subscription_table_$column", $subscription ); |
|
51 | - |
|
52 | - echo '</td>'; |
|
53 | - |
|
54 | -endforeach; |
|
23 | + case 'subscription': |
|
24 | + $subscription_id = (int) $subscription->get_id(); |
|
25 | + $url = esc_url( $subscription->get_view_url() ); |
|
26 | + $id_label = sprintf( |
|
27 | + esc_attr_x( '#%s', 'subscription id', 'invoicing' ), |
|
28 | + (int) $subscription->get_id() |
|
29 | + ); |
|
30 | + echo wp_kses_post( $widget->add_row_actions( "<a href='$url' class='font-weight-bold text-decoration-none'>$id_label</a>", $subscription ) ); |
|
31 | + break; |
|
32 | + |
|
33 | + case 'status': |
|
34 | + echo esc_html( $subscription->get_status_label() ); |
|
35 | + break; |
|
36 | + |
|
37 | + case 'renewal-date': |
|
38 | + $renewal = getpaid_format_date_value( $subscription->get_next_renewal_date() ); |
|
39 | + echo $subscription->is_active() ? esc_html( $renewal ) : '—'; |
|
40 | + break; |
|
41 | + |
|
42 | + case 'amount': |
|
43 | + $frequency = getpaid_get_subscription_period_label( $subscription->get_period(), $subscription->get_frequency(), '' ); |
|
44 | + $amount = wpinv_price( $subscription->get_recurring_amount(), $subscription->get_parent_payment()->get_currency() ); |
|
45 | + echo wp_kses_post( "<span>$amount</span> / <span class='getpaid-item-recurring-period'>$frequency</span>" ); |
|
46 | + break; |
|
47 | + |
|
48 | + endswitch; |
|
49 | + |
|
50 | + do_action( "getpaid_subscriptions_frontend_subscription_table_$column", $subscription ); |
|
51 | + |
|
52 | + echo '</td>'; |
|
53 | + |
|
54 | + endforeach; |
@@ -0,0 +1,1 @@ |
||
1 | + |
|
0 | 2 | \ No newline at end of file |
@@ -41,55 +41,55 @@ |
||
41 | 41 | |
42 | 42 | switch ( $key ) { |
43 | 43 | |
44 | - case 'status': |
|
45 | - echo esc_html( $subscription->get_status_label() ); |
|
46 | - break; |
|
44 | + case 'status': |
|
45 | + echo esc_html( $subscription->get_status_label() ); |
|
46 | + break; |
|
47 | 47 | |
48 | - case 'start_date': |
|
49 | - echo esc_html( getpaid_format_date_value( $subscription->get_date_created() ) ); |
|
50 | - break; |
|
48 | + case 'start_date': |
|
49 | + echo esc_html( getpaid_format_date_value( $subscription->get_date_created() ) ); |
|
50 | + break; |
|
51 | 51 | |
52 | - case 'expiry_date': |
|
53 | - echo esc_html( getpaid_format_date_value( $subscription->get_next_renewal_date() ) ); |
|
54 | - break; |
|
52 | + case 'expiry_date': |
|
53 | + echo esc_html( getpaid_format_date_value( $subscription->get_next_renewal_date() ) ); |
|
54 | + break; |
|
55 | 55 | |
56 | - case 'initial_amount': |
|
57 | - echo wp_kses_post( wpinv_price( $subscription->get_initial_amount(), $subscription->get_parent_payment()->get_currency() ) ); |
|
56 | + case 'initial_amount': |
|
57 | + echo wp_kses_post( wpinv_price( $subscription->get_initial_amount(), $subscription->get_parent_payment()->get_currency() ) ); |
|
58 | 58 | |
59 | - if ( $subscription->has_trial_period() ) { |
|
59 | + if ( $subscription->has_trial_period() ) { |
|
60 | 60 | |
61 | - echo "<small class='text-muted'> "; |
|
62 | - printf( |
|
63 | - esc_html_x( '( %1$s trial )', 'Subscription trial period. (e.g.: 1 month trial)', 'invoicing' ), |
|
64 | - esc_html( $subscription->get_trial_period() ) |
|
65 | - ); |
|
66 | - echo '</small>'; |
|
61 | + echo "<small class='text-muted'> "; |
|
62 | + printf( |
|
63 | + esc_html_x( '( %1$s trial )', 'Subscription trial period. (e.g.: 1 month trial)', 'invoicing' ), |
|
64 | + esc_html( $subscription->get_trial_period() ) |
|
65 | + ); |
|
66 | + echo '</small>'; |
|
67 | 67 | |
68 | - } |
|
68 | + } |
|
69 | 69 | |
70 | - break; |
|
70 | + break; |
|
71 | 71 | |
72 | - case 'recurring_amount': |
|
73 | - $frequency = getpaid_get_subscription_period_label( $subscription->get_period(), $subscription->get_frequency(), '' ); |
|
74 | - $amount = wpinv_price( $subscription->get_recurring_amount(), $subscription->get_parent_payment()->get_currency() ); |
|
75 | - echo wp_kses_post( strtolower( "<strong style='font-weight: 500;'>$amount</strong> / <span class='getpaid-item-recurring-period'>$frequency</span>" ) ); |
|
76 | - break; |
|
72 | + case 'recurring_amount': |
|
73 | + $frequency = getpaid_get_subscription_period_label( $subscription->get_period(), $subscription->get_frequency(), '' ); |
|
74 | + $amount = wpinv_price( $subscription->get_recurring_amount(), $subscription->get_parent_payment()->get_currency() ); |
|
75 | + echo wp_kses_post( strtolower( "<strong style='font-weight: 500;'>$amount</strong> / <span class='getpaid-item-recurring-period'>$frequency</span>" ) ); |
|
76 | + break; |
|
77 | 77 | |
78 | - case 'item': |
|
79 | - if ( empty( $subscription_group ) ) { |
|
80 | - echo wp_kses_post( WPInv_Subscriptions_List_Table::generate_item_markup( $subscription->get_product_id() ) ); |
|
81 | - } else { |
|
82 | - $markup = array_map( array( 'WPInv_Subscriptions_List_Table', 'generate_item_markup' ), array_keys( $subscription_group['items'] ) ); |
|
83 | - echo wp_kses_post( implode( ' | ', $markup ) ); |
|
84 | - } |
|
78 | + case 'item': |
|
79 | + if ( empty( $subscription_group ) ) { |
|
80 | + echo wp_kses_post( WPInv_Subscriptions_List_Table::generate_item_markup( $subscription->get_product_id() ) ); |
|
81 | + } else { |
|
82 | + $markup = array_map( array( 'WPInv_Subscriptions_List_Table', 'generate_item_markup' ), array_keys( $subscription_group['items'] ) ); |
|
83 | + echo wp_kses_post( implode( ' | ', $markup ) ); |
|
84 | + } |
|
85 | 85 | |
86 | - break; |
|
86 | + break; |
|
87 | 87 | |
88 | - case 'payments': |
|
89 | - $max_activations = (int) $subscription->get_bill_times(); |
|
90 | - echo ( (int) $subscription->get_times_billed() ) . ' / ' . ( empty( $max_activations ) ? '∞' : (int) $max_activations ); |
|
88 | + case 'payments': |
|
89 | + $max_activations = (int) $subscription->get_bill_times(); |
|
90 | + echo ( (int) $subscription->get_times_billed() ) . ' / ' . ( empty( $max_activations ) ? '∞' : (int) $max_activations ); |
|
91 | 91 | |
92 | - break; |
|
92 | + break; |
|
93 | 93 | |
94 | 94 | } |
95 | 95 | do_action( "getpaid_render_single_subscription_column_$key", $subscription ); |
@@ -2,11 +2,11 @@ |
||
2 | 2 | |
3 | 3 | <p> |
4 | 4 | <?php |
5 | - echo wp_sprintf( |
|
6 | - wp_kses_post( __( 'Your payment is processing. This page will reload automatically in 10 seconds. If it does not, click <a href="%s">here</a>.', 'invoicing' ) ), |
|
7 | - esc_url_raw( remove_query_arg( 'payment-confirm' ) ) |
|
8 | - ); |
|
9 | - ?> |
|
5 | + echo wp_sprintf( |
|
6 | + wp_kses_post( __( 'Your payment is processing. This page will reload automatically in 10 seconds. If it does not, click <a href="%s">here</a>.', 'invoicing' ) ), |
|
7 | + esc_url_raw( remove_query_arg( 'payment-confirm' ) ) |
|
8 | + ); |
|
9 | + ?> |
|
10 | 10 | <i class="fa fa-spin fa-refresh"></i> |
11 | 11 | </p> |
12 | 12 |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php |
|
1 | + <?php |
|
2 | 2 | /** |
3 | 3 | * Displays a payment form |
4 | 4 | * |
@@ -7,112 +7,112 @@ discard block |
||
7 | 7 | * @version 1.0.19 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
11 | - |
|
12 | -// Standardize IDs. |
|
13 | -global $rendered_getpaid_forms; |
|
14 | - |
|
15 | -// Make sure that the form is active. |
|
16 | -if ( ! $form->is_active() ) { |
|
17 | - aui()->alert( |
|
18 | - array( |
|
19 | - 'type' => 'warning', |
|
20 | - 'content' => __( 'This payment form is no longer active', 'invoicing' ), |
|
21 | - ), |
|
22 | - true |
|
23 | - ); |
|
24 | - return; |
|
10 | + defined( 'ABSPATH' ) || exit; |
|
11 | + |
|
12 | + // Standardize IDs. |
|
13 | + global $rendered_getpaid_forms; |
|
14 | + |
|
15 | + // Make sure that the form is active. |
|
16 | + if ( ! $form->is_active() ) { |
|
17 | + aui()->alert( |
|
18 | + array( |
|
19 | + 'type' => 'warning', |
|
20 | + 'content' => __( 'This payment form is no longer active', 'invoicing' ), |
|
21 | + ), |
|
22 | + true |
|
23 | + ); |
|
24 | + return; |
|
25 | 25 | } |
26 | 26 | |
27 | -// Require login to checkout. |
|
28 | -if ( wpinv_require_login_to_checkout() && ! get_current_user_id() ) { |
|
27 | + // Require login to checkout. |
|
28 | + if ( wpinv_require_login_to_checkout() && ! get_current_user_id() ) { |
|
29 | 29 | |
30 | - aui()->alert( |
|
31 | - array( |
|
32 | - 'type' => 'danger', |
|
33 | - 'content' => __( 'You must be logged in to checkout.', 'invoicing' ), |
|
34 | - ), |
|
35 | - true |
|
36 | - ); |
|
37 | - return; |
|
30 | + aui()->alert( |
|
31 | + array( |
|
32 | + 'type' => 'danger', |
|
33 | + 'content' => __( 'You must be logged in to checkout.', 'invoicing' ), |
|
34 | + ), |
|
35 | + true |
|
36 | + ); |
|
37 | + return; |
|
38 | 38 | |
39 | 39 | } |
40 | 40 | |
41 | -if ( ! is_array( $rendered_getpaid_forms ) ) { |
|
42 | - $rendered_getpaid_forms = array(); |
|
41 | + if ( ! is_array( $rendered_getpaid_forms ) ) { |
|
42 | + $rendered_getpaid_forms = array(); |
|
43 | 43 | } |
44 | 44 | |
45 | -$rendered_getpaid_forms[ $form->get_id() ] = isset( $rendered_getpaid_forms[ $form->get_id() ] ) ? $rendered_getpaid_forms[ $form->get_id() ] + 1 : 0; |
|
45 | + $rendered_getpaid_forms[ $form->get_id() ] = isset( $rendered_getpaid_forms[ $form->get_id() ] ) ? $rendered_getpaid_forms[ $form->get_id() ] + 1 : 0; |
|
46 | 46 | |
47 | -// Fires before displaying a payment form. |
|
48 | -do_action( 'getpaid_before_payment_form', $form ); |
|
49 | -?> |
|
47 | + // Fires before displaying a payment form. |
|
48 | + do_action( 'getpaid_before_payment_form', $form ); |
|
49 | + ?> |
|
50 | 50 | |
51 | 51 | <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> |
52 | 52 | |
53 | 53 | <?php |
54 | 54 | |
55 | - // Fires when printing the top of a payment form. |
|
56 | - do_action( 'getpaid_payment_form_top', $form ); |
|
55 | + // Fires when printing the top of a payment form. |
|
56 | + do_action( 'getpaid_payment_form_top', $form ); |
|
57 | 57 | |
58 | - // And the optional invoice id. |
|
59 | - if ( ! empty( $form->invoice ) ) { |
|
60 | - getpaid_hidden_field( 'invoice_id', $form->invoice->get_id() ); |
|
61 | - } |
|
58 | + // And the optional invoice id. |
|
59 | + if ( ! empty( $form->invoice ) ) { |
|
60 | + getpaid_hidden_field( 'invoice_id', $form->invoice->get_id() ); |
|
61 | + } |
|
62 | 62 | |
63 | - // We also want to include the form id. |
|
64 | - getpaid_hidden_field( 'form_id', $form->get_id() ); |
|
63 | + // We also want to include the form id. |
|
64 | + getpaid_hidden_field( 'form_id', $form->get_id() ); |
|
65 | 65 | |
66 | - // And an indication that this is a payment form submission. |
|
67 | - getpaid_hidden_field( 'getpaid_payment_form_submission', '1' ); |
|
66 | + // And an indication that this is a payment form submission. |
|
67 | + getpaid_hidden_field( 'getpaid_payment_form_submission', '1' ); |
|
68 | 68 | |
69 | - // Fires before displaying payment form elements. |
|
70 | - do_action( 'getpaid_payment_form_before_elements', $form ); |
|
69 | + // Fires before displaying payment form elements. |
|
70 | + do_action( 'getpaid_payment_form_before_elements', $form ); |
|
71 | 71 | |
72 | - // Display the elements. |
|
73 | - ?> |
|
72 | + // Display the elements. |
|
73 | + ?> |
|
74 | 74 | <div class="container-fluid"> |
75 | 75 | <div class="row"> |
76 | 76 | <?php |
77 | 77 | |
78 | - foreach ( $form->get_elements() as $element ) { |
|
79 | - if ( isset( $element['type'] ) ) { |
|
80 | - $grid_class = getpaid_get_form_element_grid_class( $element ); |
|
81 | - do_action( 'getpaid_payment_form_element_before', $element, $form ); |
|
82 | - do_action( "getpaid_payment_form_element_before_{$element['type']}_template", $element, $form ); |
|
83 | - echo "<div class='" . esc_attr( $grid_class ) . "'>"; |
|
84 | - do_action( 'getpaid_payment_form_element', $element, $form ); |
|
85 | - do_action( "getpaid_payment_form_element_{$element['type']}_template", $element, $form ); |
|
86 | - echo '</div>'; |
|
87 | - do_action( 'getpaid_payment_form_element_after', $element, $form ); |
|
88 | - do_action( "getpaid_payment_form_element_after_{$element['type']}_template", $element, $form ); |
|
78 | + foreach ( $form->get_elements() as $element ) { |
|
79 | + if ( isset( $element['type'] ) ) { |
|
80 | + $grid_class = getpaid_get_form_element_grid_class( $element ); |
|
81 | + do_action( 'getpaid_payment_form_element_before', $element, $form ); |
|
82 | + do_action( "getpaid_payment_form_element_before_{$element['type']}_template", $element, $form ); |
|
83 | + echo "<div class='" . esc_attr( $grid_class ) . "'>"; |
|
84 | + do_action( 'getpaid_payment_form_element', $element, $form ); |
|
85 | + do_action( "getpaid_payment_form_element_{$element['type']}_template", $element, $form ); |
|
86 | + echo '</div>'; |
|
87 | + do_action( 'getpaid_payment_form_element_after', $element, $form ); |
|
88 | + do_action( "getpaid_payment_form_element_after_{$element['type']}_template", $element, $form ); |
|
89 | + } |
|
89 | 90 | } |
90 | - } |
|
91 | 91 | |
92 | - ?> |
|
92 | + ?> |
|
93 | 93 | </div> |
94 | 94 | </div> |
95 | 95 | |
96 | 96 | <?php |
97 | - // Fires after displaying payment form elements. |
|
98 | - do_action( 'getpaid_payment_form_after_elements', $form ); |
|
97 | + // Fires after displaying payment form elements. |
|
98 | + do_action( 'getpaid_payment_form_after_elements', $form ); |
|
99 | 99 | |
100 | - echo "<div class='getpaid-payment-form-errors alert alert-danger d-none'></div>"; |
|
100 | + echo "<div class='getpaid-payment-form-errors alert alert-danger d-none'></div>"; |
|
101 | 101 | |
102 | - if ( wpinv_current_user_can_manage_invoicing() ) { |
|
102 | + if ( wpinv_current_user_can_manage_invoicing() ) { |
|
103 | 103 | |
104 | - edit_post_link( |
|
105 | - __( 'Edit this form.', 'invoicing' ), |
|
106 | - '<small class="form-text text-muted">', |
|
107 | - ' ' . __( 'This is only visible to website administators.', 'invoicing' ) . '</small>', |
|
108 | - $form->get_id(), |
|
109 | - 'text-danger' |
|
110 | - ); |
|
104 | + edit_post_link( |
|
105 | + __( 'Edit this form.', 'invoicing' ), |
|
106 | + '<small class="form-text text-muted">', |
|
107 | + ' ' . __( 'This is only visible to website administators.', 'invoicing' ) . '</small>', |
|
108 | + $form->get_id(), |
|
109 | + 'text-danger' |
|
110 | + ); |
|
111 | 111 | |
112 | - } |
|
112 | + } |
|
113 | 113 | |
114 | - echo wp_kses( $extra_markup, getpaid_allowed_html() ); |
|
115 | - ?> |
|
114 | + echo wp_kses( $extra_markup, getpaid_allowed_html() ); |
|
115 | + ?> |
|
116 | 116 | |
117 | 117 | <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;"> |
118 | 118 | <div class="spinner-border mx-auto align-self-center text-white" role="status"> |
@@ -124,5 +124,5 @@ discard block |
||
124 | 124 | |
125 | 125 | <?php |
126 | 126 | |
127 | -// Fires after displaying a payment form. |
|
128 | -do_action( 'getpaid_after_payment_form', $form ); |
|
127 | + // Fires after displaying a payment form. |
|
128 | + do_action( 'getpaid_after_payment_form', $form ); |
@@ -1,34 +1,34 @@ discard block |
||
1 | -<?php |
|
1 | + <?php |
|
2 | 2 | |
3 | - // Is the request set up correctly? |
|
4 | - if ( empty( $_GET['form'] ) && empty( $_GET['item'] ) ) { |
|
5 | - return aui()->alert( |
|
6 | - array( |
|
7 | - 'type' => 'warning', |
|
8 | - 'content' => __( 'No payment form or item selected', 'invoicing' ), |
|
9 | - ) |
|
10 | - ); |
|
11 | - wp_die( esc_html__( 'No payment form or item selected', 'invoicing' ), 400 ); |
|
12 | - } |
|
3 | + // Is the request set up correctly? |
|
4 | + if ( empty( $_GET['form'] ) && empty( $_GET['item'] ) ) { |
|
5 | + return aui()->alert( |
|
6 | + array( |
|
7 | + 'type' => 'warning', |
|
8 | + 'content' => __( 'No payment form or item selected', 'invoicing' ), |
|
9 | + ) |
|
10 | + ); |
|
11 | + wp_die( esc_html__( 'No payment form or item selected', 'invoicing' ), 400 ); |
|
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( |
|
18 | - '[getpaid form=%s]', |
|
19 | - (int) $_GET['form'] |
|
20 | - ); |
|
17 | + $shortcode = sprintf( |
|
18 | + '[getpaid form=%s]', |
|
19 | + (int) $_GET['form'] |
|
20 | + ); |
|
21 | 21 | |
22 | - } else { |
|
22 | + } else { |
|
23 | 23 | |
24 | - $shortcode = sprintf( |
|
25 | - '[getpaid item=%s]', |
|
26 | - esc_attr( urldecode( $_GET['item'] ) ) |
|
27 | - ); |
|
24 | + $shortcode = sprintf( |
|
25 | + '[getpaid item=%s]', |
|
26 | + esc_attr( urldecode( $_GET['item'] ) ) |
|
27 | + ); |
|
28 | 28 | |
29 | - } |
|
29 | + } |
|
30 | 30 | |
31 | -?> |
|
31 | + ?> |
|
32 | 32 | |
33 | 33 | <!DOCTYPE html> |
34 | 34 | <html <?php language_attributes(); ?> class="bsui"> |
@@ -44,13 +44,13 @@ discard block |
||
44 | 44 | |
45 | 45 | <title><?php echo esc_html( get_bloginfo( 'name' ) ); ?></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 | - wp_site_icon(); |
|
53 | - ?> |
|
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 | + wp_site_icon(); |
|
53 | + ?> |
|
54 | 54 | |
55 | 55 | <style type="text/css"> |
56 | 56 | .body{ |
@@ -77,12 +77,12 @@ discard block |
||
77 | 77 | <body class="body page-template-default page"> |
78 | 78 | <div id="getpaid-form-embed" class="container my-5 page type-page status-publish hentry post post-content"> |
79 | 79 | <?php |
80 | - do_action( 'getpaid_payment_form_embed_top' ); |
|
81 | - echo do_shortcode( $shortcode ); |
|
82 | - do_action( 'getpaid_payment_form_embed_bottom' ); |
|
83 | - wpinv_get_template( 'frontend-footer.php' ); |
|
84 | - ?> |
|
85 | - </div> |
|
80 | + do_action( 'getpaid_payment_form_embed_top' ); |
|
81 | + echo do_shortcode( $shortcode ); |
|
82 | + do_action( 'getpaid_payment_form_embed_bottom' ); |
|
83 | + wpinv_get_template( 'frontend-footer.php' ); |
|
84 | + ?> |
|
85 | + </div> |
|
86 | 86 | <?php wp_footer(); ?> |
87 | 87 | </body> |
88 | 88 |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php |
|
1 | + <?php |
|
2 | 2 | /** |
3 | 3 | * Displays a text input in payment form |
4 | 4 | * |
@@ -7,33 +7,33 @@ discard block |
||
7 | 7 | * @version 1.0.19 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
10 | + defined( 'ABSPATH' ) || exit; |
|
11 | 11 | |
12 | -// Set the currency position. |
|
13 | -$position = wpinv_currency_position(); |
|
12 | + // Set the currency position. |
|
13 | + $position = wpinv_currency_position(); |
|
14 | 14 | |
15 | -if ( $position == 'left_space' ) { |
|
16 | - $position = 'left'; |
|
15 | + if ( $position == 'left_space' ) { |
|
16 | + $position = 'left'; |
|
17 | 17 | } |
18 | 18 | |
19 | -if ( $position == 'right_space' ) { |
|
20 | - $position = 'right'; |
|
19 | + if ( $position == 'right_space' ) { |
|
20 | + $position = 'right'; |
|
21 | 21 | } |
22 | -$label = empty( $label ) ? '' : esc_html( $label ); |
|
23 | -$label_class = sanitize_key( preg_replace( '/[^A-Za-z0-9_-]/', '-', $label ) ); |
|
22 | + $label = empty( $label ) ? '' : esc_html( $label ); |
|
23 | + $label_class = sanitize_key( preg_replace( '/[^A-Za-z0-9_-]/', '-', $label ) ); |
|
24 | 24 | |
25 | -aui()->input( |
|
26 | - array( |
|
27 | - 'name' => esc_attr( $id ), |
|
28 | - 'id' => esc_attr( $element_id ), |
|
29 | - 'placeholder' => empty( $placeholder ) ? wpinv_format_amount( 0 ) : wpinv_format_amount( $placeholder ), |
|
30 | - 'value' => empty( $value ) ? wpinv_format_amount( $query_value ) : wpinv_format_amount( $value ), |
|
31 | - 'label' => empty( $label ) ? '' : wp_kses_post( $label ), |
|
32 | - 'label_type' => 'vertical', |
|
33 | - 'help_text' => empty( $description ) ? '' : wp_kses_post( $description ), |
|
34 | - 'input_group_right' => $position == 'right' ? wpinv_currency_symbol( $form->get_currency() ) : '', |
|
35 | - 'input_group_left' => $position == 'left' ? wpinv_currency_symbol( $form->get_currency() ) : '', |
|
36 | - 'class' => 'getpaid-refresh-on-change ' . $label_class, |
|
37 | - ), |
|
38 | - true |
|
39 | -); |
|
25 | + aui()->input( |
|
26 | + array( |
|
27 | + 'name' => esc_attr( $id ), |
|
28 | + 'id' => esc_attr( $element_id ), |
|
29 | + 'placeholder' => empty( $placeholder ) ? wpinv_format_amount( 0 ) : wpinv_format_amount( $placeholder ), |
|
30 | + 'value' => empty( $value ) ? wpinv_format_amount( $query_value ) : wpinv_format_amount( $value ), |
|
31 | + 'label' => empty( $label ) ? '' : wp_kses_post( $label ), |
|
32 | + 'label_type' => 'vertical', |
|
33 | + 'help_text' => empty( $description ) ? '' : wp_kses_post( $description ), |
|
34 | + 'input_group_right' => $position == 'right' ? wpinv_currency_symbol( $form->get_currency() ) : '', |
|
35 | + 'input_group_left' => $position == 'left' ? wpinv_currency_symbol( $form->get_currency() ) : '', |
|
36 | + 'class' => 'getpaid-refresh-on-change ' . $label_class, |
|
37 | + ), |
|
38 | + true |
|
39 | + ); |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php |
|
1 | + <?php |
|
2 | 2 | /** |
3 | 3 | * Displays a number input in payment form |
4 | 4 | * |
@@ -7,27 +7,27 @@ discard block |
||
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' => 'number', |
|
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' => 'number', |
|
29 | + 'class' => $label_class, |
|
30 | + 'value' => $query_value, |
|
31 | + ), |
|
32 | + true |
|
33 | + ); |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php |
|
1 | + <?php |
|
2 | 2 | /** |
3 | 3 | * Displays a checkbox in payment form |
4 | 4 | * |
@@ -7,25 +7,25 @@ discard block |
||
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 | - 'type' => 'checkbox', |
|
22 | - 'name' => esc_attr( $id ), |
|
23 | - 'id' => esc_attr( $element_id ), |
|
24 | - 'required' => ! empty( $required ), |
|
25 | - 'label' => $label, |
|
26 | - 'value' => esc_attr__( 'Yes', 'invoicing' ), |
|
27 | - 'help_text' => empty( $description ) ? '' : wp_kses_post( $description ), |
|
28 | - 'class' => 'w-auto ' . $label_class, |
|
29 | - ), |
|
30 | - true |
|
31 | -); |
|
19 | + aui()->input( |
|
20 | + array( |
|
21 | + 'type' => 'checkbox', |
|
22 | + 'name' => esc_attr( $id ), |
|
23 | + 'id' => esc_attr( $element_id ), |
|
24 | + 'required' => ! empty( $required ), |
|
25 | + 'label' => $label, |
|
26 | + 'value' => esc_attr__( 'Yes', 'invoicing' ), |
|
27 | + 'help_text' => empty( $description ) ? '' : wp_kses_post( $description ), |
|
28 | + 'class' => 'w-auto ' . $label_class, |
|
29 | + ), |
|
30 | + true |
|
31 | + ); |