PluginProbe ʕ •ᴥ•ʔ
Paid Membership Plugin, Ecommerce, User Registration Form, Login Form, User Profile & Restrict Content – ProfilePress / 4.17.1
Paid Membership Plugin, Ecommerce, User Registration Form, Login Form, User Profile & Restrict Content – ProfilePress v4.17.1
4.17.1 4.17.0 4.16.19 4.16.18 4.16.17 4.16.16 trunk 1.0 1.0.1 1.0.2 1.1 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.5a 1.1.6 1.1.7 1.2 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.3 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.4 1.4.1 1.4.2 1.5 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.6 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 1.6.7 1.6.8 1.7 1.7.1 1.7.2 1.8 1.8.1 1.8.10 1.8.2 1.8.3 1.8.4 1.8.5 1.8.6 1.8.7 1.8.8 1.8.9 1.9 1.9.1 1.9.10 1.9.11 1.9.12 1.9.13 1.9.2 1.9.3 1.9.4 1.9.5 1.9.6 1.9.7 1.9.8 1.9.9 2.1.9 2.2.10 2.2.11 2.2.12 2.2.13 2.2.14 2.2.15 2.2.16 2.2.2 2.2.5 2.2.6 2.2.7 2.2.8 2.2.9 3.0 3.1 3.1.1 3.1.10 3.1.11 3.1.12 3.1.13 3.1.14 3.1.15 3.1.16 3.1.17 3.1.18 3.1.19 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.1.8 3.1.9 3.2.0 3.2.1 3.2.10 3.2.11 3.2.12 3.2.13 3.2.14 3.2.15 3.2.16 3.2.2 3.2.3 3.2.4 3.2.5 3.2.6 3.2.7 3.2.8 3.2.9 4.0.0 4.0.1 4.0.2 4.0.3 4.1.0 4.1.1 4.1.2 4.1.3 4.1.4 4.10.0 4.10.1 4.10.2 4.10.3 4.11.0 4.12.0 4.13.0 4.13.1 4.13.2 4.13.3 4.13.4 4.14.0 4.14.1 4.14.2 4.14.3 4.14.4 4.15.0 4.15.1 4.15.10 4.15.11 4.15.12 4.15.13 4.15.14 4.15.15 4.15.16 4.15.17 4.15.18 4.15.19 4.15.2 4.15.20 4.15.20.1 4.15.21 4.15.22 4.15.23 4.15.24 4.15.25 4.15.3 4.15.4 4.15.5 4.15.6 4.15.7 4.15.8 4.15.9 4.16.0 4.16.1 4.16.10 4.16.11 4.16.12 4.16.13 4.16.14 4.16.15 4.16.2 4.16.3 4.16.4 4.16.5 4.16.6 4.16.7 4.16.8 4.16.9 4.2.0 4.3.0 4.3.1 4.3.2 4.4.0 4.4.1 4.5.0 4.5.1 4.5.2 4.5.3 4.5.4 4.5.5 4.6.0 4.7.0 4.8.0 4.9.0
wp-user-avatar / src / templates / checkout / form-checkout-sidebar.php
wp-user-avatar / src / templates / checkout Last commit date
credit-card-fields.php 4 years ago form-account-info-fields.php 3 months ago form-billing-fields.php 4 years ago form-checkout-sidebar.php 1 year ago form-checkout-submit-btn.php 1 month ago form-checkout.php 2 weeks ago form-login.php 3 years ago form-payment-methods.php 1 year ago form-terms.php 10 months ago group-selector.php 1 year ago index.php 4 years ago
form-checkout-sidebar.php
163 lines
1 <?php
2
3 use ProfilePress\Core\Membership\Controllers\CheckoutSessionData;
4 use ProfilePress\Core\Membership\Models\Order\CartEntity;
5 use ProfilePress\Core\Membership\Models\Plan\PlanEntity;
6 use ProfilePress\Core\Membership\Models\Subscription\SubscriptionBillingFrequency;
7 use ProfilePress\Core\Membership\Models\Subscription\SubscriptionTrialPeriod;
8 use ProfilePress\Core\Membership\Services\Calculator;
9 use ProfilePress\Core\Membership\Services\TaxService;
10
11 /** @global PlanEntity $plan */
12 /** @global CartEntity $cart_vars */
13 /** @global bool $isChangePlanIdSelected true if we on change plan checkout and selected plan is same as plan to switch from */
14
15 $coupon_code = CheckoutSessionData::get_coupon_code($plan->id);
16
17 $tax_rate = ppress_session()->get(CheckoutSessionData::TAX_RATE);
18 if (empty($tax_rate)) $tax_rate = '0';
19
20 $sub_total = $cart_vars->sub_total;
21 $discount_amount = $cart_vars->discount_amount;
22 $discount_percentage = $cart_vars->discount_percentage;
23 $total_amount = $cart_vars->total;
24
25 $billing_frequency = $plan->is_recurring() ? ' ' . SubscriptionBillingFrequency::get_label($plan->billing_frequency) : '';
26
27 ?>
28 <div class="ppress-checkout_order_summary-wrap">
29 <?php do_action('ppress_checkout_summary_content_before'); ?>
30 <div class="ppress-checkout_order_summary">
31 <div class="ppress-checkout_order_summary__plan_name">
32 <?= $plan->name ?>
33 <span class="ppress-checkout_order_summary__plan_price">(<?= ppress_display_amount($plan->price) . $billing_frequency ?>)</span>
34 </div>
35 <?php if ( ! empty($plan->description)) : ?>
36 <div class="ppress-checkout_order_summary__plan_description">
37 <?= $plan->description ?>
38 </div>
39 <?php endif; ?>
40
41 <?php if ( ! $isChangePlanIdSelected) : ?>
42 <dl class="ppress-checkout_order_summary__bottom_details">
43
44 <?php if (apply_filters('ppress_checkout_show_discount', ppress_is_any_active_coupon())) : ?>
45
46 <div class="ppress-checkout_order_summary__discount">
47 <p>
48 <?php printf(
49 esc_html__('Have a coupon? %sClick here to enter your code%s', 'wp-user-avatar'),
50 '<a class="ppress-checkout__link ppress-coupon-code-link" href="#">',
51 '</a>'
52 ) ?>
53 </p>
54
55 <div id="ppress-checkout-coupon-code-wrap">
56 <div class="checkout_order_summary__discount__field_wrap">
57 <input placeholder="<?php esc_html_e('Coupon code', 'wp-user-avatar') ?>" type="text" id="apply-discount" class="checkout_order_summary__discount__input">
58 <input type="submit" class="ppress-apply-discount-btn" value="<?php esc_html_e('Apply', 'wp-user-avatar') ?>">
59 </div>
60 </div>
61 </div>
62 <?php endif; ?>
63
64 <?php if ($cart_vars->change_plan_sub_id > 0) : ?>
65 <div class="checkout_order_summary__fee_structure__item">
66 <dt><?php esc_html_e('Prorated Price', 'wp-user-avatar'); ?></dt>
67 <dd><?= ppress_display_amount($cart_vars->prorated_price) ?></dd>
68 </div>
69 <?php endif; ?>
70
71 <?php if ( ! Calculator::init($plan->signup_fee)->isNegativeOrZero()) : ?>
72 <div class="checkout_order_summary__fee_structure__item">
73 <dt><?php esc_html_e('Signup Fee', 'wp-user-avatar') ?></dt>
74 <dd><?= ppress_display_amount($plan->signup_fee) ?></dd>
75 </div>
76 <?php endif; ?>
77
78 <div class="checkout_order_summary__fee_structure__item">
79 <dt><?php esc_html_e('Subtotal', 'wp-user-avatar') ?></dt>
80 <dd><?= ppress_display_amount($sub_total) ?></dd>
81 </div>
82
83 <?php if ( ! empty($coupon_code)) : ?>
84 <div class="checkout_order_summary__fee_structure__item">
85 <dt>
86 <?php printf(
87 esc_html__('Discount %s', 'wp-user-avatar'),
88 '<span>' . $coupon_code . '</span>'
89 ) ?>
90 </dt>
91 <dd>&minus;
92 <?php if ( ! empty($discount_percentage)) : ?>
93 <?= $discount_percentage ?>% (<?= ppress_display_amount($discount_amount) ?>)
94 <?php else : ?>
95 <?= ppress_display_amount($discount_amount) ?>
96 <?php endif; ?>
97 <a id="ppress-remove-applied-coupon" href="#"><?= esc_html__('Remove', 'wp-user-avatar') ?></a>
98 </dd>
99 </div>
100 <?php endif; ?>
101
102 <?php if (TaxService::init()->is_tax_enabled() && Calculator::init($cart_vars->tax_amount)->isGreaterThanZero()) : ?>
103 <div class="checkout_order_summary__fee_structure__item">
104 <dt><?= TaxService::init()->get_tax_label(sanitize_text_field(ppressPOST_var('country', '', true))) ?>
105 <?php if ( ! empty($cart_vars->tax_rate)) : ?>
106 <span><?= $cart_vars->tax_rate ?>%</span>
107 <?php endif; ?>
108 </dt>
109 <dd><?= ppress_display_amount($cart_vars->tax_amount) ?></dd>
110 </div>
111 <?php endif; ?>
112
113 <div class="checkout_order_summary__fee_structure__item">
114 <dt>
115 <?php esc_html_e('Total', 'wp-user-avatar'); ?>
116 <?php if ($plan->has_free_trial()) : ?>
117 <span class="checkout_order_summary__fee_structure__item__trial_term">
118 <?= SubscriptionTrialPeriod::get_label($plan->get_free_trial()) . ' ' . esc_html__('free trial', 'wp-user-avatar') ?>
119 </span>
120 <?php endif; ?>
121 </dt>
122 <dd><?= ppress_display_amount($total_amount) ?></dd>
123 </div>
124 </dl>
125 <?php endif; ?>
126 </div>
127
128 <?php if ( ! $isChangePlanIdSelected) : ?>
129 <?php if ($plan->is_recurring()) : ?>
130 <div class="ppress-checkout_charge_details">
131 <?php printf(
132 esc_html__('You will be charged %1$stoday%2$s', 'wp-user-avatar'),
133 sprintf('<span>%s ', ppress_display_amount($cart_vars->initial_amount)), '</span>',
134 );
135
136 if ($plan->is_auto_renew()) {
137
138 echo '&nbsp;';
139
140 printf(
141 esc_html__('then %1$s starting %2$s.', 'wp-user-avatar'),
142 sprintf('<span>%s %s</span>', ppress_display_amount($cart_vars->recurring_amount), strtolower(SubscriptionBillingFrequency::get_label($plan->billing_frequency))),
143 apply_filters('ppress_checkout_sidebar_order_expiration_date_time', ppress_format_date($cart_vars->expiration_date, 'j M, Y'), $cart_vars, $plan)
144 );
145 }
146
147 if ($plan->get_total_payments() > 0) {
148 printf('&nbsp;' . esc_html__('%s payments total.', 'wp-user-avatar'), '<strong>' . $plan->get_total_payments() . '</strong>');
149 }
150 ?>
151 </div>
152 <?php elseif ( ! empty($cart_vars->expiration_date) && ppress_strtotime_utc($cart_vars->expiration_date) > 0) : ?>
153 <div class="ppress-checkout_charge_details">
154 <?php printf(
155 esc_html__('After payment, your subscription will expire on %1$s', 'wp-user-avatar'),
156 '<span>' . ppress_format_date($cart_vars->expiration_date, 'j F, Y') . '</span>'
157 );
158 ?>
159 </div>
160 <?php endif; ?>
161 <?php do_action('ppress_checkout_summary_content_after'); ?>
162 <?php endif; ?>
163 </div>