@@ -7,7 +7,7 @@ |
||
7 | 7 | * @version 1.0.19 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
10 | +defined('ABSPATH') || exit; |
|
11 | 11 | ?> |
12 | 12 | |
13 | 13 | <hr class="featurette-divider" /> |
@@ -7,57 +7,57 @@ discard block |
||
7 | 7 | * @version 1.0.19 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
10 | +defined('ABSPATH') || exit; |
|
11 | 11 | |
12 | -if ( empty( $fields ) ) { |
|
12 | +if (empty($fields)) { |
|
13 | 13 | return; |
14 | 14 | } |
15 | 15 | |
16 | 16 | // A prefix for all ids (so that a form can be included in the same page multiple times). |
17 | -$uniqid = uniqid( '_' ); |
|
17 | +$uniqid = uniqid('_'); |
|
18 | 18 | |
19 | 19 | // Prepare the user's country. |
20 | -if ( ! empty( $form->invoice ) ) { |
|
20 | +if (!empty($form->invoice)) { |
|
21 | 21 | $country = $form->invoice->get_country(); |
22 | 22 | } |
23 | 23 | |
24 | -if ( empty( $country ) ) { |
|
25 | - $country = empty( $country ) ? getpaid_get_ip_country() : $country; |
|
26 | - $country = empty( $country ) ? wpinv_get_default_country() : $country; |
|
24 | +if (empty($country)) { |
|
25 | + $country = empty($country) ? getpaid_get_ip_country() : $country; |
|
26 | + $country = empty($country) ? wpinv_get_default_country() : $country; |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | // A prefix for all ids (so that a form can be included in the same page multiple times). |
30 | -$uniqid = uniqid( '_' ); |
|
30 | +$uniqid = uniqid('_'); |
|
31 | 31 | |
32 | -$address_type = empty( $address_type ) ? 'billing' : $address_type; |
|
32 | +$address_type = empty($address_type) ? 'billing' : $address_type; |
|
33 | 33 | |
34 | 34 | ?> |
35 | 35 | |
36 | -<?php if ( 'both' === $address_type ) : ?> |
|
36 | +<?php if ('both' === $address_type) : ?> |
|
37 | 37 | |
38 | 38 | <!-- Start Billing/Shipping Address Title --> |
39 | 39 | <h4 class="mb-3 getpaid-shipping-billing-address-title"> |
40 | - <?php esc_html_e( 'Billing / Shipping Address', 'invoicing' ); ?> |
|
40 | + <?php esc_html_e('Billing / Shipping Address', 'invoicing'); ?> |
|
41 | 41 | </h4> |
42 | 42 | <!-- End Billing Address Title --> |
43 | 43 | |
44 | 44 | <!-- Start Billing Address Title --> |
45 | 45 | <h4 class="mb-3 getpaid-billing-address-title"> |
46 | - <?php esc_html_e( 'Billing Address', 'invoicing' ); ?> |
|
46 | + <?php esc_html_e('Billing Address', 'invoicing'); ?> |
|
47 | 47 | </h4> |
48 | 48 | <!-- End Billing Address Title --> |
49 | 49 | |
50 | 50 | <?php endif; ?> |
51 | 51 | |
52 | 52 | |
53 | -<?php if ( 'both' === $address_type || 'billing' === $address_type ) : ?> |
|
53 | +<?php if ('both' === $address_type || 'billing' === $address_type) : ?> |
|
54 | 54 | |
55 | 55 | <!-- Start Billing Address --> |
56 | 56 | <div class="getpaid-billing-address-wrapper"> |
57 | 57 | <?php |
58 | 58 | $field_type = 'billing'; |
59 | - include plugin_dir_path( __FILE__ ) . 'address-fields.php'; |
|
60 | - do_action( 'getpaid_after_payment_form_billing_fields', $form ); |
|
59 | + include plugin_dir_path(__FILE__) . 'address-fields.php'; |
|
60 | + do_action('getpaid_after_payment_form_billing_fields', $form); |
|
61 | 61 | ?> |
62 | 62 | </div> |
63 | 63 | <!-- End Billing Address --> |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | <?php endif; ?> |
66 | 66 | |
67 | 67 | |
68 | -<?php if ( 'both' === $address_type ) : ?> |
|
68 | +<?php if ('both' === $address_type) : ?> |
|
69 | 69 | |
70 | 70 | |
71 | 71 | <?php |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | 'name' => 'same-shipping-address', |
77 | 77 | 'id' => "shipping-toggle$uniqid", |
78 | 78 | 'required' => false, |
79 | - 'label' => wp_kses_post( $shipping_address_toggle ), |
|
79 | + 'label' => wp_kses_post($shipping_address_toggle), |
|
80 | 80 | 'value' => 1, |
81 | 81 | 'checked' => true, |
82 | 82 | 'class' => 'w-auto', |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | |
89 | 89 | <!-- Start Shipping Address Title --> |
90 | 90 | <h4 class="mb-3 getpaid-shipping-address-title"> |
91 | - <?php esc_html_e( 'Shipping Address', 'invoicing' ); ?> |
|
91 | + <?php esc_html_e('Shipping Address', 'invoicing'); ?> |
|
92 | 92 | </h4> |
93 | 93 | <!-- End Shipping Address Title --> |
94 | 94 | |
@@ -97,14 +97,14 @@ discard block |
||
97 | 97 | |
98 | 98 | |
99 | 99 | |
100 | -<?php if ( 'both' === $address_type || 'shipping' === $address_type ) : ?> |
|
100 | +<?php if ('both' === $address_type || 'shipping' === $address_type) : ?> |
|
101 | 101 | |
102 | 102 | <!-- Start Shipping Address --> |
103 | 103 | <div class="getpaid-shipping-address-wrapper"> |
104 | 104 | <?php |
105 | 105 | $field_type = 'shipping'; |
106 | - include plugin_dir_path( __FILE__ ) . 'address-fields.php'; |
|
107 | - do_action( 'getpaid_after_payment_form_shipping_fields', $form ); |
|
106 | + include plugin_dir_path(__FILE__) . 'address-fields.php'; |
|
107 | + do_action('getpaid_after_payment_form_shipping_fields', $form); |
|
108 | 108 | ?> |
109 | 109 | </div> |
110 | 110 | <!-- End Shipping Address --> |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | defined( 'ABSPATH' ) || exit; |
11 | 11 | |
12 | 12 | if ( empty( $fields ) ) { |
13 | - return; |
|
13 | + return; |
|
14 | 14 | } |
15 | 15 | |
16 | 16 | // A prefix for all ids (so that a form can be included in the same page multiple times). |
@@ -18,12 +18,12 @@ discard block |
||
18 | 18 | |
19 | 19 | // Prepare the user's country. |
20 | 20 | if ( ! empty( $form->invoice ) ) { |
21 | - $country = $form->invoice->get_country(); |
|
21 | + $country = $form->invoice->get_country(); |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | if ( empty( $country ) ) { |
25 | - $country = empty( $country ) ? getpaid_get_ip_country() : $country; |
|
26 | - $country = empty( $country ) ? wpinv_get_default_country() : $country; |
|
25 | + $country = empty( $country ) ? getpaid_get_ip_country() : $country; |
|
26 | + $country = empty( $country ) ? wpinv_get_default_country() : $country; |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | // A prefix for all ids (so that a form can be included in the same page multiple times). |
@@ -55,10 +55,10 @@ discard block |
||
55 | 55 | <!-- Start Billing Address --> |
56 | 56 | <div class="getpaid-billing-address-wrapper"> |
57 | 57 | <?php |
58 | - $field_type = 'billing'; |
|
59 | - include plugin_dir_path( __FILE__ ) . 'address-fields.php'; |
|
60 | - do_action( 'getpaid_after_payment_form_billing_fields', $form ); |
|
61 | - ?> |
|
58 | + $field_type = 'billing'; |
|
59 | + include plugin_dir_path( __FILE__ ) . 'address-fields.php'; |
|
60 | + do_action( 'getpaid_after_payment_form_billing_fields', $form ); |
|
61 | + ?> |
|
62 | 62 | </div> |
63 | 63 | <!-- End Billing Address --> |
64 | 64 | |
@@ -70,21 +70,21 @@ discard block |
||
70 | 70 | |
71 | 71 | <?php |
72 | 72 | |
73 | - aui()->input( |
|
74 | - array( |
|
75 | - 'type' => 'checkbox', |
|
76 | - 'name' => 'same-shipping-address', |
|
77 | - 'id' => "shipping-toggle$uniqid", |
|
78 | - 'required' => false, |
|
79 | - 'label' => wp_kses_post( $shipping_address_toggle ), |
|
80 | - 'value' => 1, |
|
81 | - 'checked' => true, |
|
82 | - 'class' => 'w-auto', |
|
83 | - ), |
|
84 | - true |
|
85 | - ); |
|
73 | + aui()->input( |
|
74 | + array( |
|
75 | + 'type' => 'checkbox', |
|
76 | + 'name' => 'same-shipping-address', |
|
77 | + 'id' => "shipping-toggle$uniqid", |
|
78 | + 'required' => false, |
|
79 | + 'label' => wp_kses_post( $shipping_address_toggle ), |
|
80 | + 'value' => 1, |
|
81 | + 'checked' => true, |
|
82 | + 'class' => 'w-auto', |
|
83 | + ), |
|
84 | + true |
|
85 | + ); |
|
86 | 86 | |
87 | - ?> |
|
87 | + ?> |
|
88 | 88 | |
89 | 89 | |
90 | 90 | <!-- Start Shipping Address Title --> |
@@ -103,10 +103,10 @@ discard block |
||
103 | 103 | <!-- Start Shipping Address --> |
104 | 104 | <div class="getpaid-shipping-address-wrapper"> |
105 | 105 | <?php |
106 | - $field_type = 'shipping'; |
|
107 | - include plugin_dir_path( __FILE__ ) . 'address-fields.php'; |
|
108 | - do_action( 'getpaid_after_payment_form_shipping_fields', $form ); |
|
109 | - ?> |
|
106 | + $field_type = 'shipping'; |
|
107 | + include plugin_dir_path( __FILE__ ) . 'address-fields.php'; |
|
108 | + do_action( 'getpaid_after_payment_form_shipping_fields', $form ); |
|
109 | + ?> |
|
110 | 110 | </div> |
111 | 111 | <!-- End Shipping Address --> |
112 | 112 |
@@ -3,8 +3,8 @@ discard block |
||
3 | 3 | <p> |
4 | 4 | <?php |
5 | 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' ) ) |
|
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 | 8 | ); |
9 | 9 | ?> |
10 | 10 | <i class="fa fa-spin fa-refresh"></i> |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | <script type="text/javascript"> |
14 | 14 | setTimeout( |
15 | 15 | function(){ |
16 | - window.location.href = '<?php echo esc_url_raw( remove_query_arg( 'payment-confirm' ) ); ?>'; |
|
16 | + window.location.href = '<?php echo esc_url_raw(remove_query_arg('payment-confirm')); ?>'; |
|
17 | 17 | }, |
18 | 18 | 10000 |
19 | 19 | ); |
@@ -7,14 +7,14 @@ |
||
7 | 7 | * @version 1.0.19 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
10 | +defined('ABSPATH') || exit; |
|
11 | 11 | |
12 | 12 | ?> |
13 | 13 | |
14 | 14 | <div v-if='!is_default'> |
15 | - <div class='alert alert-info' role='alert'><?php esc_html_e( 'Item totals will appear here. Click to set items.', 'invoicing' ); ?></div> |
|
15 | + <div class='alert alert-info' role='alert'><?php esc_html_e('Item totals will appear here. Click to set items.', 'invoicing'); ?></div> |
|
16 | 16 | </div> |
17 | 17 | |
18 | 18 | <div v-if='is_default'> |
19 | - <div class='alert alert-info' role='alert'><?php esc_html_e( 'Item totals will appear here.', 'invoicing' ); ?></div> |
|
19 | + <div class='alert alert-info' role='alert'><?php esc_html_e('Item totals will appear here.', 'invoicing'); ?></div> |
|
20 | 20 | </div> |
@@ -7,15 +7,15 @@ |
||
7 | 7 | * @version 1.0.19 |
8 | 8 | */ |
9 | 9 | |
10 | -defined( 'ABSPATH' ) || exit; |
|
10 | +defined('ABSPATH') || exit; |
|
11 | 11 | |
12 | 12 | ?> |
13 | 13 | |
14 | 14 | <label><span v-html="form_element.label"></span></label> |
15 | 15 | <div class="d-flex w-100 flex-column align-items-center justify-content-center p-2" style="height: 200px; border: 3px dashed rgb(136, 136, 136); cursor: pointer;"> |
16 | 16 | <div class="h5 text-dark"> |
17 | - <span v-if="form_element.max_file_num > 1"><?php esc_html_e( 'Drag files to this area or click to upload', 'invoicing' ); ?></span> |
|
18 | - <span v-if="form_element.max_file_num < 2"><?php esc_html_e( 'Drag your file to this area or click to upload', 'invoicing' ); ?></span> |
|
17 | + <span v-if="form_element.max_file_num > 1"><?php esc_html_e('Drag files to this area or click to upload', 'invoicing'); ?></span> |
|
18 | + <span v-if="form_element.max_file_num < 2"><?php esc_html_e('Drag your file to this area or click to upload', 'invoicing'); ?></span> |
|
19 | 19 | </div> |
20 | 20 | <small v-if='form_element.description' class='form-text text-muted' v-html='form_element.description'></small> |
21 | 21 | </div> |
@@ -8,25 +8,25 @@ |
||
8 | 8 | * @var WPInv_Invoice $invoice |
9 | 9 | */ |
10 | 10 | |
11 | -defined( 'ABSPATH' ) || exit; |
|
11 | +defined('ABSPATH') || exit; |
|
12 | 12 | |
13 | 13 | ?> |
14 | 14 | |
15 | 15 | <div class="getpaid-header-left-actions"> |
16 | 16 | |
17 | - <?php if ( $invoice->is_type( 'invoice' ) && $invoice->needs_payment() && ! $invoice->is_held() ) : ?> |
|
18 | - <a class="btn btn-sm btn-primary m-1 d-inline-block invoice-action-pay" href="<?php echo esc_url( $invoice->get_checkout_payment_url() ); ?>"> |
|
19 | - <?php esc_html_e( 'Pay For Invoice', 'invoicing' ); ?> |
|
17 | + <?php if ($invoice->is_type('invoice') && $invoice->needs_payment() && !$invoice->is_held()) : ?> |
|
18 | + <a class="btn btn-sm btn-primary m-1 d-inline-block invoice-action-pay" href="<?php echo esc_url($invoice->get_checkout_payment_url()); ?>"> |
|
19 | + <?php esc_html_e('Pay For Invoice', 'invoicing'); ?> |
|
20 | 20 | </a> |
21 | 21 | <?php endif; ?> |
22 | 22 | |
23 | - <?php if ( $invoice->is_type( 'invoice' ) && $invoice->is_paid() ) : ?> |
|
24 | - <a class="btn btn-sm btn-info m-1 d-inline-block invoice-action-receipt" href="<?php echo esc_url( $invoice->get_receipt_url() ); ?>"> |
|
25 | - <?php esc_html_e( 'View Receipt', 'invoicing' ); ?> |
|
23 | + <?php if ($invoice->is_type('invoice') && $invoice->is_paid()) : ?> |
|
24 | + <a class="btn btn-sm btn-info m-1 d-inline-block invoice-action-receipt" href="<?php echo esc_url($invoice->get_receipt_url()); ?>"> |
|
25 | + <?php esc_html_e('View Receipt', 'invoicing'); ?> |
|
26 | 26 | </a> |
27 | 27 | <?php endif; ?> |
28 | 28 | |
29 | - <?php do_action( 'wpinv_invoice_display_left_actions', $invoice ); ?> |
|
29 | + <?php do_action('wpinv_invoice_display_left_actions', $invoice); ?> |
|
30 | 30 | |
31 | 31 | </div> |
32 | 32 |
@@ -13,42 +13,42 @@ |
||
13 | 13 | |
14 | 14 | foreach ( array_keys( $widget->get_subscriptions_table_columns() ) as $column ) : |
15 | 15 | |
16 | - $class = sanitize_html_class( $column ); |
|
17 | - echo "<td class='getpaid-subscriptions-table-column-" . esc_attr( $class ) . "'>"; |
|
16 | + $class = sanitize_html_class( $column ); |
|
17 | + echo "<td class='getpaid-subscriptions-table-column-" . esc_attr( $class ) . "'>"; |
|
18 | 18 | |
19 | - do_action( "getpaid_subscriptions_before_frontend_subscription_table_$column", $subscription ); |
|
19 | + do_action( "getpaid_subscriptions_before_frontend_subscription_table_$column", $subscription ); |
|
20 | 20 | |
21 | - switch ( $column ) : |
|
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; |
|
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 | 32 | |
33 | - case 'status': |
|
34 | - echo esc_html( $subscription->get_status_label() ); |
|
35 | - break; |
|
33 | + case 'status': |
|
34 | + echo esc_html( $subscription->get_status_label() ); |
|
35 | + break; |
|
36 | 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; |
|
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 | 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; |
|
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 | 47 | |
48 | - endswitch; |
|
48 | + endswitch; |
|
49 | 49 | |
50 | - do_action( "getpaid_subscriptions_frontend_subscription_table_$column", $subscription ); |
|
50 | + do_action( "getpaid_subscriptions_frontend_subscription_table_$column", $subscription ); |
|
51 | 51 | |
52 | - echo '</td>'; |
|
52 | + echo '</td>'; |
|
53 | 53 | |
54 | 54 | endforeach; |
@@ -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; |
@@ -9,45 +9,45 @@ |
||
9 | 9 | * @var WPInv_Subscriptions_Widget $widget |
10 | 10 | */ |
11 | 11 | |
12 | -defined( 'ABSPATH' ) || exit; |
|
12 | +defined('ABSPATH') || exit; |
|
13 | 13 | |
14 | -foreach ( array_keys( $widget->get_subscriptions_table_columns() ) as $column ) : |
|
14 | +foreach (array_keys($widget->get_subscriptions_table_columns()) as $column) : |
|
15 | 15 | |
16 | - $class = sanitize_html_class( $column ); |
|
17 | - echo "<td class='getpaid-subscriptions-table-column-" . esc_attr( $class ) . "'>"; |
|
16 | + $class = sanitize_html_class($column); |
|
17 | + echo "<td class='getpaid-subscriptions-table-column-" . esc_attr($class) . "'>"; |
|
18 | 18 | |
19 | - do_action( "getpaid_subscriptions_before_frontend_subscription_table_$column", $subscription ); |
|
19 | + do_action("getpaid_subscriptions_before_frontend_subscription_table_$column", $subscription); |
|
20 | 20 | |
21 | - switch ( $column ) : |
|
21 | + switch ($column) : |
|
22 | 22 | |
23 | 23 | case 'subscription': |
24 | 24 | $subscription_id = (int) $subscription->get_id(); |
25 | - $url = esc_url( $subscription->get_view_url() ); |
|
25 | + $url = esc_url($subscription->get_view_url()); |
|
26 | 26 | $id_label = sprintf( |
27 | - esc_attr_x( '#%s', 'subscription id', 'invoicing' ), |
|
27 | + esc_attr_x('#%s', 'subscription id', 'invoicing'), |
|
28 | 28 | (int) $subscription->get_id() |
29 | 29 | ); |
30 | - echo wp_kses_post( $widget->add_row_actions( "<a href='$url' class='font-weight-bold text-decoration-none'>$id_label</a>", $subscription ) ); |
|
30 | + echo wp_kses_post($widget->add_row_actions("<a href='$url' class='font-weight-bold text-decoration-none'>$id_label</a>", $subscription)); |
|
31 | 31 | break; |
32 | 32 | |
33 | 33 | case 'status': |
34 | - echo esc_html( $subscription->get_status_label() ); |
|
34 | + echo esc_html($subscription->get_status_label()); |
|
35 | 35 | break; |
36 | 36 | |
37 | 37 | case 'renewal-date': |
38 | - $renewal = getpaid_format_date_value( $subscription->get_next_renewal_date() ); |
|
39 | - echo $subscription->is_active() ? esc_html( $renewal ) : '—'; |
|
38 | + $renewal = getpaid_format_date_value($subscription->get_next_renewal_date()); |
|
39 | + echo $subscription->is_active() ? esc_html($renewal) : '—'; |
|
40 | 40 | break; |
41 | 41 | |
42 | 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>" ); |
|
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 | 46 | break; |
47 | 47 | |
48 | 48 | endswitch; |
49 | 49 | |
50 | - do_action( "getpaid_subscriptions_frontend_subscription_table_$column", $subscription ); |
|
50 | + do_action("getpaid_subscriptions_frontend_subscription_table_$column", $subscription); |
|
51 | 51 | |
52 | 52 | echo '</td>'; |
53 | 53 |
@@ -46,62 +46,62 @@ discard block |
||
46 | 46 | <td style="width: 65%"> |
47 | 47 | <?php |
48 | 48 | |
49 | - switch ( $key ) { |
|
49 | + switch ( $key ) { |
|
50 | 50 | |
51 | - case 'status': |
|
52 | - echo esc_html( $subscription->get_status_label() ); |
|
53 | - break; |
|
51 | + case 'status': |
|
52 | + echo esc_html( $subscription->get_status_label() ); |
|
53 | + break; |
|
54 | 54 | |
55 | - case 'start_date': |
|
56 | - echo esc_html( getpaid_format_date_value( $subscription->get_date_created() ) ); |
|
57 | - break; |
|
55 | + case 'start_date': |
|
56 | + echo esc_html( getpaid_format_date_value( $subscription->get_date_created() ) ); |
|
57 | + break; |
|
58 | 58 | |
59 | - case 'expiry_date': |
|
60 | - echo esc_html( getpaid_format_date_value( $subscription->get_next_renewal_date() ) ); |
|
61 | - break; |
|
59 | + case 'expiry_date': |
|
60 | + echo esc_html( getpaid_format_date_value( $subscription->get_next_renewal_date() ) ); |
|
61 | + break; |
|
62 | 62 | |
63 | - case 'initial_amount': |
|
64 | - echo wp_kses_post( wpinv_price( $subscription->get_initial_amount(), $subscription->get_parent_payment()->get_currency() ) ); |
|
63 | + case 'initial_amount': |
|
64 | + echo wp_kses_post( wpinv_price( $subscription->get_initial_amount(), $subscription->get_parent_payment()->get_currency() ) ); |
|
65 | 65 | |
66 | - if ( $subscription->has_trial_period() ) { |
|
66 | + if ( $subscription->has_trial_period() ) { |
|
67 | 67 | |
68 | - echo "<small class='text-muted'> "; |
|
69 | - printf( |
|
70 | - esc_html_x( '( %1$s trial )', 'Subscription trial period. (e.g.: 1 month trial)', 'invoicing' ), |
|
71 | - esc_html( $subscription->get_trial_period() ) |
|
72 | - ); |
|
73 | - echo '</small>'; |
|
68 | + echo "<small class='text-muted'> "; |
|
69 | + printf( |
|
70 | + esc_html_x( '( %1$s trial )', 'Subscription trial period. (e.g.: 1 month trial)', 'invoicing' ), |
|
71 | + esc_html( $subscription->get_trial_period() ) |
|
72 | + ); |
|
73 | + echo '</small>'; |
|
74 | 74 | |
75 | - } |
|
75 | + } |
|
76 | 76 | |
77 | - break; |
|
77 | + break; |
|
78 | 78 | |
79 | - case 'recurring_amount': |
|
80 | - $frequency = getpaid_get_subscription_period_label( $subscription->get_period(), $subscription->get_frequency(), '' ); |
|
81 | - $amount = wpinv_price( $subscription->get_recurring_amount(), $subscription->get_parent_payment()->get_currency() ); |
|
82 | - echo wp_kses_post( strtolower( "<strong style='font-weight: 500;'>$amount</strong> / <span class='getpaid-item-recurring-period'>$frequency</span>" ) ); |
|
83 | - break; |
|
79 | + case 'recurring_amount': |
|
80 | + $frequency = getpaid_get_subscription_period_label( $subscription->get_period(), $subscription->get_frequency(), '' ); |
|
81 | + $amount = wpinv_price( $subscription->get_recurring_amount(), $subscription->get_parent_payment()->get_currency() ); |
|
82 | + echo wp_kses_post( strtolower( "<strong style='font-weight: 500;'>$amount</strong> / <span class='getpaid-item-recurring-period'>$frequency</span>" ) ); |
|
83 | + break; |
|
84 | 84 | |
85 | - case 'item': |
|
86 | - if ( empty( $subscription_group ) ) { |
|
87 | - echo wp_kses_post( WPInv_Subscriptions_List_Table::generate_item_markup( $subscription->get_product_id() ) ); |
|
88 | - } else { |
|
89 | - $markup = array_map( array( 'WPInv_Subscriptions_List_Table', 'generate_item_markup' ), array_keys( $subscription_group['items'] ) ); |
|
90 | - echo wp_kses_post( implode( ' | ', $markup ) ); |
|
91 | - } |
|
85 | + case 'item': |
|
86 | + if ( empty( $subscription_group ) ) { |
|
87 | + echo wp_kses_post( WPInv_Subscriptions_List_Table::generate_item_markup( $subscription->get_product_id() ) ); |
|
88 | + } else { |
|
89 | + $markup = array_map( array( 'WPInv_Subscriptions_List_Table', 'generate_item_markup' ), array_keys( $subscription_group['items'] ) ); |
|
90 | + echo wp_kses_post( implode( ' | ', $markup ) ); |
|
91 | + } |
|
92 | 92 | |
93 | - break; |
|
93 | + break; |
|
94 | 94 | |
95 | - case 'payments': |
|
96 | - $max_activations = (int) $subscription->get_bill_times(); |
|
97 | - echo ( (int) $subscription->get_times_billed() ) . ' / ' . ( empty( $max_activations ) ? '∞' : (int) $max_activations ); |
|
95 | + case 'payments': |
|
96 | + $max_activations = (int) $subscription->get_bill_times(); |
|
97 | + echo ( (int) $subscription->get_times_billed() ) . ' / ' . ( empty( $max_activations ) ? '∞' : (int) $max_activations ); |
|
98 | 98 | |
99 | - break; |
|
99 | + break; |
|
100 | 100 | |
101 | - } |
|
102 | - do_action( "getpaid_render_single_subscription_column_$key", $subscription ); |
|
101 | + } |
|
102 | + do_action( "getpaid_render_single_subscription_column_$key", $subscription ); |
|
103 | 103 | |
104 | - ?> |
|
104 | + ?> |
|
105 | 105 | </td> |
106 | 106 | |
107 | 107 | </tr> |
@@ -128,17 +128,17 @@ discard block |
||
128 | 128 | <span class="form-text"> |
129 | 129 | |
130 | 130 | <?php |
131 | - if ( $subscription->can_cancel() ) { |
|
132 | - printf( |
|
131 | + if ( $subscription->can_cancel() ) { |
|
132 | + printf( |
|
133 | 133 | '<a href="%s" class="btn btn-danger btn-sm" onclick="return confirm(\'%s\')">%s</a> ', |
134 | 134 | esc_url( $subscription->get_cancel_url() ), |
135 | 135 | esc_attr__( 'Are you sure you want to cancel this subscription?', 'invoicing' ), |
136 | 136 | esc_html__( 'Cancel Subscription', 'invoicing' ) |
137 | 137 | ); |
138 | - } |
|
138 | + } |
|
139 | 139 | |
140 | - do_action( 'getpaid-single-subscription-page-actions', $subscription ); |
|
141 | - ?> |
|
140 | + do_action( 'getpaid-single-subscription-page-actions', $subscription ); |
|
141 | + ?> |
|
142 | 142 | |
143 | 143 | <a href="<?php echo esc_url( getpaid_get_tab_url( 'gp-subscriptions', get_permalink( (int) wpinv_get_option( 'invoice_subscription_page' ) ) ) ); ?>" class="btn btn-secondary btn-sm"><?php esc_html_e( 'Go Back', 'invoicing' ); ?></a> |
144 | 144 | </span> |
@@ -9,58 +9,58 @@ discard block |
||
9 | 9 | * @var WPInv_Subscriptions_Widget $widget |
10 | 10 | */ |
11 | 11 | |
12 | -defined( 'ABSPATH' ) || exit; |
|
12 | +defined('ABSPATH') || exit; |
|
13 | 13 | |
14 | -do_action( 'getpaid_single_subscription_before_notices', $subscription ); |
|
14 | +do_action('getpaid_single_subscription_before_notices', $subscription); |
|
15 | 15 | |
16 | 16 | // Display errors and notices. |
17 | 17 | wpinv_print_errors(); |
18 | 18 | |
19 | -$subscription_groups = getpaid_get_invoice_subscription_groups( $subscription->get_parent_invoice_id() ); |
|
20 | -$subscription_group = getpaid_get_invoice_subscription_group( $subscription->get_parent_invoice_id(), $subscription->get_id() ); |
|
19 | +$subscription_groups = getpaid_get_invoice_subscription_groups($subscription->get_parent_invoice_id()); |
|
20 | +$subscription_group = getpaid_get_invoice_subscription_group($subscription->get_parent_invoice_id(), $subscription->get_id()); |
|
21 | 21 | |
22 | -do_action( 'getpaid_before_single_subscription', $subscription, $subscription_groups ); |
|
22 | +do_action('getpaid_before_single_subscription', $subscription, $subscription_groups); |
|
23 | 23 | |
24 | 24 | ?> |
25 | 25 | |
26 | -<h2 class="mb-1 h4"><?php esc_html_e( 'Subscription Details', 'invoicing' ); ?></h2> |
|
26 | +<h2 class="mb-1 h4"><?php esc_html_e('Subscription Details', 'invoicing'); ?></h2> |
|
27 | 27 | <table class="table table-bordered"> |
28 | 28 | <tbody> |
29 | 29 | |
30 | - <?php foreach ( $widget->get_single_subscription_columns( $subscription ) as $key => $label ) : ?> |
|
30 | + <?php foreach ($widget->get_single_subscription_columns($subscription) as $key => $label) : ?> |
|
31 | 31 | |
32 | - <tr class="getpaid-subscription-meta-<?php echo esc_attr( $key ); ?>"> |
|
32 | + <tr class="getpaid-subscription-meta-<?php echo esc_attr($key); ?>"> |
|
33 | 33 | |
34 | 34 | <th class="font-weight-bold" style="width: 35%"> |
35 | - <?php echo esc_html( $label ); ?> |
|
35 | + <?php echo esc_html($label); ?> |
|
36 | 36 | </th> |
37 | 37 | |
38 | 38 | <td style="width: 65%"> |
39 | 39 | <?php |
40 | 40 | |
41 | - switch ( $key ) { |
|
41 | + switch ($key) { |
|
42 | 42 | |
43 | 43 | case 'status': |
44 | - echo esc_html( $subscription->get_status_label() ); |
|
44 | + echo esc_html($subscription->get_status_label()); |
|
45 | 45 | break; |
46 | 46 | |
47 | 47 | case 'start_date': |
48 | - echo esc_html( getpaid_format_date_value( $subscription->get_date_created() ) ); |
|
48 | + echo esc_html(getpaid_format_date_value($subscription->get_date_created())); |
|
49 | 49 | break; |
50 | 50 | |
51 | 51 | case 'expiry_date': |
52 | - echo esc_html( getpaid_format_date_value( $subscription->get_next_renewal_date() ) ); |
|
52 | + echo esc_html(getpaid_format_date_value($subscription->get_next_renewal_date())); |
|
53 | 53 | break; |
54 | 54 | |
55 | 55 | case 'initial_amount': |
56 | - echo wp_kses_post( wpinv_price( $subscription->get_initial_amount(), $subscription->get_parent_payment()->get_currency() ) ); |
|
56 | + echo wp_kses_post(wpinv_price($subscription->get_initial_amount(), $subscription->get_parent_payment()->get_currency())); |
|
57 | 57 | |
58 | - if ( $subscription->has_trial_period() ) { |
|
58 | + if ($subscription->has_trial_period()) { |
|
59 | 59 | |
60 | 60 | echo "<small class='text-muted'> "; |
61 | 61 | printf( |
62 | - esc_html_x( '( %1$s trial )', 'Subscription trial period. (e.g.: 1 month trial)', 'invoicing' ), |
|
63 | - esc_html( $subscription->get_trial_period() ) |
|
62 | + esc_html_x('( %1$s trial )', 'Subscription trial period. (e.g.: 1 month trial)', 'invoicing'), |
|
63 | + esc_html($subscription->get_trial_period()) |
|
64 | 64 | ); |
65 | 65 | echo '</small>'; |
66 | 66 | |
@@ -69,29 +69,29 @@ discard block |
||
69 | 69 | break; |
70 | 70 | |
71 | 71 | case 'recurring_amount': |
72 | - $frequency = getpaid_get_subscription_period_label( $subscription->get_period(), $subscription->get_frequency(), '' ); |
|
73 | - $amount = wpinv_price( $subscription->get_recurring_amount(), $subscription->get_parent_payment()->get_currency() ); |
|
74 | - echo wp_kses_post( strtolower( "<strong style='font-weight: 500;'>$amount</strong> / <span class='getpaid-item-recurring-period'>$frequency</span>" ) ); |
|
72 | + $frequency = getpaid_get_subscription_period_label($subscription->get_period(), $subscription->get_frequency(), ''); |
|
73 | + $amount = wpinv_price($subscription->get_recurring_amount(), $subscription->get_parent_payment()->get_currency()); |
|
74 | + echo wp_kses_post(strtolower("<strong style='font-weight: 500;'>$amount</strong> / <span class='getpaid-item-recurring-period'>$frequency</span>")); |
|
75 | 75 | break; |
76 | 76 | |
77 | 77 | case 'item': |
78 | - if ( empty( $subscription_group ) ) { |
|
79 | - echo wp_kses_post( WPInv_Subscriptions_List_Table::generate_item_markup( $subscription->get_product_id() ) ); |
|
78 | + if (empty($subscription_group)) { |
|
79 | + echo wp_kses_post(WPInv_Subscriptions_List_Table::generate_item_markup($subscription->get_product_id())); |
|
80 | 80 | } else { |
81 | - $markup = array_map( array( 'WPInv_Subscriptions_List_Table', 'generate_item_markup' ), array_keys( $subscription_group['items'] ) ); |
|
82 | - echo wp_kses_post( implode( ' | ', $markup ) ); |
|
81 | + $markup = array_map(array('WPInv_Subscriptions_List_Table', 'generate_item_markup'), array_keys($subscription_group['items'])); |
|
82 | + echo wp_kses_post(implode(' | ', $markup)); |
|
83 | 83 | } |
84 | 84 | |
85 | 85 | break; |
86 | 86 | |
87 | 87 | case 'payments': |
88 | 88 | $max_activations = (int) $subscription->get_bill_times(); |
89 | - echo ( (int) $subscription->get_times_billed() ) . ' / ' . ( empty( $max_activations ) ? '∞' : (int) $max_activations ); |
|
89 | + echo ((int) $subscription->get_times_billed()) . ' / ' . (empty($max_activations) ? '∞' : (int) $max_activations); |
|
90 | 90 | |
91 | 91 | break; |
92 | 92 | |
93 | 93 | } |
94 | - do_action( "getpaid_render_single_subscription_column_$key", $subscription ); |
|
94 | + do_action("getpaid_render_single_subscription_column_$key", $subscription); |
|
95 | 95 | |
96 | 96 | ?> |
97 | 97 | </td> |
@@ -103,34 +103,34 @@ discard block |
||
103 | 103 | </tbody> |
104 | 104 | </table> |
105 | 105 | |
106 | -<?php if ( ! empty( $subscription_group ) ) : ?> |
|
107 | - <h2 class='mt-5 mb-1 h4'><?php esc_html_e( 'Subscription Items', 'invoicing' ); ?></h2> |
|
108 | - <?php getpaid_admin_subscription_item_details_metabox( $subscription ); ?> |
|
106 | +<?php if (!empty($subscription_group)) : ?> |
|
107 | + <h2 class='mt-5 mb-1 h4'><?php esc_html_e('Subscription Items', 'invoicing'); ?></h2> |
|
108 | + <?php getpaid_admin_subscription_item_details_metabox($subscription); ?> |
|
109 | 109 | <?php endif; ?> |
110 | 110 | |
111 | -<h2 class='mt-5 mb-1 h4'><?php esc_html_e( 'Related Invoices', 'invoicing' ); ?></h2> |
|
111 | +<h2 class='mt-5 mb-1 h4'><?php esc_html_e('Related Invoices', 'invoicing'); ?></h2> |
|
112 | 112 | |
113 | -<?php echo wp_kses_post( getpaid_admin_subscription_invoice_details_metabox( $subscription ) ); ?> |
|
113 | +<?php echo wp_kses_post(getpaid_admin_subscription_invoice_details_metabox($subscription)); ?> |
|
114 | 114 | |
115 | -<?php if ( 1 < count( $subscription_groups ) ) : ?> |
|
116 | - <h2 class='mt-5 mb-1 h4'><?php esc_html_e( 'Related Subscriptions', 'invoicing' ); ?></h2> |
|
117 | - <?php getpaid_admin_subscription_related_subscriptions_metabox( $subscription ); ?> |
|
115 | +<?php if (1 < count($subscription_groups)) : ?> |
|
116 | + <h2 class='mt-5 mb-1 h4'><?php esc_html_e('Related Subscriptions', 'invoicing'); ?></h2> |
|
117 | + <?php getpaid_admin_subscription_related_subscriptions_metabox($subscription); ?> |
|
118 | 118 | <?php endif; ?> |
119 | 119 | |
120 | 120 | <span class="form-text"> |
121 | 121 | |
122 | 122 | <?php |
123 | - if ( $subscription->can_cancel() ) { |
|
123 | + if ($subscription->can_cancel()) { |
|
124 | 124 | printf( |
125 | 125 | '<a href="%s" class="btn btn-danger btn-sm" onclick="return confirm(\'%s\')">%s</a> ', |
126 | - esc_url( $subscription->get_cancel_url() ), |
|
127 | - esc_attr__( 'Are you sure you want to cancel this subscription?', 'invoicing' ), |
|
128 | - esc_html__( 'Cancel Subscription', 'invoicing' ) |
|
126 | + esc_url($subscription->get_cancel_url()), |
|
127 | + esc_attr__('Are you sure you want to cancel this subscription?', 'invoicing'), |
|
128 | + esc_html__('Cancel Subscription', 'invoicing') |
|
129 | 129 | ); |
130 | 130 | } |
131 | 131 | |
132 | - do_action( 'getpaid-single-subscription-page-actions', $subscription ); |
|
132 | + do_action('getpaid-single-subscription-page-actions', $subscription); |
|
133 | 133 | ?> |
134 | 134 | |
135 | - <a href="<?php echo esc_url( getpaid_get_tab_url( 'gp-subscriptions', get_permalink( (int) wpinv_get_option( 'invoice_subscription_page' ) ) ) ); ?>" class="btn btn-secondary btn-sm"><?php esc_html_e( 'Go Back', 'invoicing' ); ?></a> |
|
135 | + <a href="<?php echo esc_url(getpaid_get_tab_url('gp-subscriptions', get_permalink((int) wpinv_get_option('invoice_subscription_page')))); ?>" class="btn btn-secondary btn-sm"><?php esc_html_e('Go Back', 'invoicing'); ?></a> |
|
136 | 136 | </span> |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php |
|
1 | + <?php |
|
2 | 2 | |
3 | 3 | /** |
4 | 4 | * Template that prints a single subscription's details |
@@ -10,19 +10,19 @@ discard block |
||
10 | 10 | * @var WPInv_Subscriptions_Widget $widget |
11 | 11 | */ |
12 | 12 | |
13 | -defined( 'ABSPATH' ) || exit; |
|
13 | + defined( 'ABSPATH' ) || exit; |
|
14 | 14 | |
15 | -do_action( 'getpaid_single_subscription_before_notices', $subscription ); |
|
15 | + do_action( 'getpaid_single_subscription_before_notices', $subscription ); |
|
16 | 16 | |
17 | -// Display errors and notices. |
|
18 | -wpinv_print_errors(); |
|
17 | + // Display errors and notices. |
|
18 | + wpinv_print_errors(); |
|
19 | 19 | |
20 | -$subscription_groups = getpaid_get_invoice_subscription_groups( $subscription->get_parent_invoice_id() ); |
|
21 | -$subscription_group = getpaid_get_invoice_subscription_group( $subscription->get_parent_invoice_id(), $subscription->get_id() ); |
|
20 | + $subscription_groups = getpaid_get_invoice_subscription_groups( $subscription->get_parent_invoice_id() ); |
|
21 | + $subscription_group = getpaid_get_invoice_subscription_group( $subscription->get_parent_invoice_id(), $subscription->get_id() ); |
|
22 | 22 | |
23 | -do_action( 'getpaid_before_single_subscription', $subscription, $subscription_groups ); |
|
23 | + do_action( 'getpaid_before_single_subscription', $subscription, $subscription_groups ); |
|
24 | 24 | |
25 | -?> |
|
25 | + ?> |
|
26 | 26 | |
27 | 27 | <h2 class="mb-1 h4"><?php esc_html_e( 'Subscription Details', 'invoicing' ); ?></h2> |
28 | 28 | <table class="table table-bordered"> |
@@ -39,59 +39,59 @@ discard block |
||
39 | 39 | <td style="width: 65%"> |
40 | 40 | <?php |
41 | 41 | |
42 | - switch ( $key ) { |
|
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 ); |
96 | 96 | |
97 | 97 | ?> |
@@ -4,68 +4,68 @@ |
||
4 | 4 | * |
5 | 5 | */ |
6 | 6 | |
7 | -defined( 'ABSPATH' ) || exit; |
|
7 | +defined('ABSPATH') || exit; |
|
8 | 8 | |
9 | 9 | ?> |
10 | 10 | |
11 | 11 | <div class="card shadow-sm my-5"> |
12 | 12 | <div class="text-center card-body"> |
13 | - <h1 class="h3"><?php esc_html_e( 'Awesome, you are ready to Get Paid', 'invoicing' ); ?></h1> |
|
13 | + <h1 class="h3"><?php esc_html_e('Awesome, you are ready to Get Paid', 'invoicing'); ?></h1> |
|
14 | 14 | |
15 | 15 | <div class="geodirectory-message geodirectory-tracker"> |
16 | - <p><?php esc_html_e( 'Thank you for choosing GetPaid!', 'invoicing' ); ?> <i class="far fa-smile-beam"></i></p> |
|
16 | + <p><?php esc_html_e('Thank you for choosing GetPaid!', 'invoicing'); ?> <i class="far fa-smile-beam"></i></p> |
|
17 | 17 | </div> |
18 | 18 | |
19 | 19 | <div class="gp-setup-next-steps"> |
20 | 20 | <div class="gp-setup-next-steps-first mb-4"> |
21 | 21 | <div> |
22 | - <h2 class="h3"><i class="fas fa-arrow-down"></i> <?php esc_html_e( 'Watch This', 'invoicing' ); ?> <i class="fas fa-arrow-down"></i></h2> |
|
22 | + <h2 class="h3"><i class="fas fa-arrow-down"></i> <?php esc_html_e('Watch This', 'invoicing'); ?> <i class="fas fa-arrow-down"></i></h2> |
|
23 | 23 | <div class="embed-responsive embed-responsive-16by9 mb-4"> |
24 | 24 | <iframe class="embed-responsive-item" src="https://www.youtube.com/embed/TXZuPXHjt9E?rel=0" allowfullscreen></iframe> |
25 | 25 | </div> |
26 | 26 | </div> |
27 | - <h2 class="h3"><?php esc_html_e( 'Next steps', 'invoicing' ); ?></h2> |
|
27 | + <h2 class="h3"><?php esc_html_e('Next steps', 'invoicing'); ?></h2> |
|
28 | 28 | |
29 | 29 | <div class="d-flex justify-content-between"> |
30 | 30 | <a |
31 | 31 | class="btn btn-outline-primary btn-sm" |
32 | - href="<?php echo esc_url( admin_url( 'post-new.php?post_type=wpi_item' ) ); ?>"> |
|
32 | + href="<?php echo esc_url(admin_url('post-new.php?post_type=wpi_item')); ?>"> |
|
33 | 33 | <span class="h1 d-block"><i class="fas fa-box-open"></i></span> |
34 | - <?php esc_html_e( 'Create Item', 'invoicing' ); ?> |
|
34 | + <?php esc_html_e('Create Item', 'invoicing'); ?> |
|
35 | 35 | </a> |
36 | 36 | <a |
37 | 37 | class="btn btn-outline-primary btn-sm" |
38 | - href="<?php echo esc_url( admin_url( 'post-new.php?post_type=wpi_payment_form' ) ); ?>"> |
|
38 | + href="<?php echo esc_url(admin_url('post-new.php?post_type=wpi_payment_form')); ?>"> |
|
39 | 39 | <span class="h1 d-block"><i class="fas fa-align-justify"></i></span> |
40 | - <?php esc_html_e( 'Create Payment Form', 'invoicing' ); ?> |
|
40 | + <?php esc_html_e('Create Payment Form', 'invoicing'); ?> |
|
41 | 41 | </a> |
42 | 42 | <a |
43 | 43 | class="btn btn-outline-primary btn-sm" |
44 | - href="<?php echo esc_url( admin_url( 'post-new.php?post_type=wpi_invoice' ) ); ?>"> |
|
44 | + href="<?php echo esc_url(admin_url('post-new.php?post_type=wpi_invoice')); ?>"> |
|
45 | 45 | <span class="h1 d-block"><i class="fas fa-file-alt"></i></span> |
46 | - <?php esc_html_e( 'Create Invoice', 'invoicing' ); ?> |
|
46 | + <?php esc_html_e('Create Invoice', 'invoicing'); ?> |
|
47 | 47 | </a> |
48 | 48 | </div> |
49 | 49 | |
50 | 50 | |
51 | 51 | |
52 | - <h2 class="h3 mt-4"><?php esc_html_e( 'Learn more', 'invoicing' ); ?></h2> |
|
52 | + <h2 class="h3 mt-4"><?php esc_html_e('Learn more', 'invoicing'); ?></h2> |
|
53 | 53 | <div class="gp-setup-next-steps-last mt-2 d-flex justify-content-between"> |
54 | 54 | <a |
55 | 55 | class="btn btn-outline-primary btn-sm" href="https://docs.wpgetpaid.com/collection/114-getting-started?utm_source=setupwizard&utm_medium=product&utm_content=getting-started&utm_campaign=invoicingplugin" |
56 | - target="_blank"><?php esc_html_e( 'Getting Started', 'invoicing' ); ?></a> |
|
56 | + target="_blank"><?php esc_html_e('Getting Started', 'invoicing'); ?></a> |
|
57 | 57 | <a |
58 | 58 | class="btn btn-outline-primary btn-sm" |
59 | 59 | href="https://docs.wpgetpaid.com/?utm_source=setupwizard&utm_medium=product&utm_content=docs&utm_campaign=invoicingplugin" |
60 | - target="_blank"><?php esc_html_e( 'Documentation', 'invoicing' ); ?></a> |
|
60 | + target="_blank"><?php esc_html_e('Documentation', 'invoicing'); ?></a> |
|
61 | 61 | <a |
62 | 62 | class="btn btn-outline-primary btn-sm" |
63 | 63 | href="https://wpgetpaid.com/support/?utm_source=setupwizard&utm_medium=product&utm_content=docs&utm_campaign=invoicingyplugin" |
64 | - target="_blank"><?php esc_html_e( 'Support', 'invoicing' ); ?></a> |
|
64 | + target="_blank"><?php esc_html_e('Support', 'invoicing'); ?></a> |
|
65 | 65 | <a |
66 | 66 | class="btn btn-outline-primary btn-sm" |
67 | 67 | href="https://demos.ayecode.io/getpaid/?utm_source=setupwizard&utm_medium=product&utm_content=demos&utm_campaign=invoicingyplugin" |
68 | - target="_blank"><?php esc_html_e( 'Demos', 'invoicing' ); ?></a> |
|
68 | + target="_blank"><?php esc_html_e('Demos', 'invoicing'); ?></a> |
|
69 | 69 | </div> |
70 | 70 | </div> |
71 | 71 | </div> |