Diff: STRATO-apps/wordpress_03/app/wp-content/plugins/paid-memberships-pro/adminpages/admin_header.php
Keine Baseline-Datei – Diff nur gegen leer.
1
-
1
+
<?php
2
+
require_once(dirname(__FILE__) . "/functions.php");
3
+
4
+
if(isset($_REQUEST['page']))
5
+
$view = sanitize_text_field($_REQUEST['page']);
6
+
else
7
+
$view = "";
8
+
9
+
if ( ! empty( $_REQUEST['edit'] ) ) {
10
+
$edit_level = intval( $_REQUEST['edit'] );
11
+
} else {
12
+
$edit_level = false;
13
+
}
14
+
15
+
global $pmpro_ready, $msg, $msgt;
16
+
///$pmpro_ready = pmpro_is_ready();
17
+
if(!$pmpro_ready)
18
+
{
19
+
global $pmpro_level_ready, $pmpro_gateway_ready, $pmpro_pages_ready;
20
+
21
+
if(empty($msg))
22
+
$msg = -1;
23
+
if(empty($pmpro_level_ready) && empty($edit_level) && $view != "pmpro-membershiplevels")
24
+
$msgt .= " <a href=\"" . admin_url('admin.php?page=pmpro-membershiplevels&edit=-1') . "\">" . __("Add a membership level to get started.", 'paid-memberships-pro' ) . "</a>";
25
+
elseif($pmpro_level_ready && !$pmpro_pages_ready && $view != "pmpro-pagesettings")
26
+
$msgt .= " <strong>" . __( 'Next step:', 'paid-memberships-pro' ) . "</strong> <a href=\"" . admin_url('admin.php?page=pmpro-pagesettings') . "\">" . __("Set up the membership pages", 'paid-memberships-pro' ) . "</a>.";
27
+
elseif($pmpro_level_ready && $pmpro_pages_ready && !$pmpro_gateway_ready && $view != "pmpro-paymentsettings" && ! pmpro_onlyFreeLevels())
28
+
$msgt .= " <strong>" . __( 'Next step:', 'paid-memberships-pro' ) . "</strong> <a href=\"" . admin_url('admin.php?page=pmpro-paymentsettings') . "\">" . __("Set up your payment gateway", 'paid-memberships-pro' ) . "</a>.";
29
+
30
+
if(empty($msgt))
31
+
$msg = false;
32
+
}
33
+
34
+
//check level compatibility
35
+
if(!pmpro_checkLevelForStripeCompatibility())
36
+
{
37
+
$msg = -1;
38
+
$msgt = __("The billing details for some of your membership levels is not supported by Stripe.", 'paid-memberships-pro' );
39
+
if($view == "pmpro-membershiplevels" && !empty($edit_level) && $edit_level > 0)
40
+
{
41
+
if(!pmpro_checkLevelForStripeCompatibility($edit_level))
42
+
{
43
+
global $pmpro_stripe_error;
44
+
$pmpro_stripe_error = true;
45
+
$msg = -1;
46
+
$msgt = __("The billing details for this level are not supported by Stripe. Please review the notes in the Billing Details section below.", 'paid-memberships-pro' );
47
+
}
48
+
}
49
+
elseif($view == "pmpro-membershiplevels")
50
+
$msgt .= " " . __("The levels with issues are highlighted below.", 'paid-memberships-pro' );
51
+
else
52
+
$msgt .= " <a href=\"" . admin_url('admin.php?page=pmpro-membershiplevels') . "\">" . __("Please edit your levels", 'paid-memberships-pro' ) . "</a>.";
53
+
}
54
+
55
+
if(!pmpro_checkLevelForPayflowCompatibility())
56
+
{
57
+
$msg = -1;
58
+
$msgt = __("The billing details for some of your membership levels is not supported by Payflow.", 'paid-memberships-pro' );
59
+
if($view == "pmpro-membershiplevels" && !empty($edit_level) && $edit_level > 0)
60
+
{
61
+
if(!pmpro_checkLevelForPayflowCompatibility($edit_level))
62
+
{
63
+
global $pmpro_payflow_error;
64
+
$pmpro_payflow_error = true;
65
+
$msg = -1;
66
+
$msgt = __("The billing details for this level are not supported by Payflow. Please review the notes in the Billing Details section below.", 'paid-memberships-pro' );
67
+
}
68
+
}
69
+
elseif($view == "pmpro-membershiplevels")
70
+
$msgt .= " " . __("The levels with issues are highlighted below.", 'paid-memberships-pro' );
71
+
else
72
+
$msgt .= " <a href=\"" . admin_url('admin.php?page=pmpro-membershiplevels') . "\">" . __("Please edit your levels", 'paid-memberships-pro' ) . "</a>.";
73
+
}
74
+
75
+
if(!pmpro_checkLevelForBraintreeCompatibility())
76
+
{
77
+
global $pmpro_braintree_error;
78
+
79
+
if ( false == $pmpro_braintree_error ) {
80
+
$msg = - 1;
81
+
$msgt = __( "The billing details for some of your membership levels is not supported by Braintree.", 'paid-memberships-pro' );
82
+
}
83
+
if($view == "pmpro-membershiplevels" && !empty($edit_level) && $edit_level > 0)
84
+
{
85
+
if(!pmpro_checkLevelForBraintreeCompatibility($edit_level))
86
+
{
87
+
88
+
// Don't overwrite existing messages
89
+
if ( false == $pmpro_braintree_error ) {
90
+
$pmpro_braintree_error = true;
91
+
$msg = - 1;
92
+
$msgt = __( "The billing details for this level are not supported by Braintree. Please review the notes in the Billing Details section below.", 'paid-memberships-pro' );
93
+
}
94
+
}
95
+
}
96
+
elseif($view == "pmpro-membershiplevels")
97
+
$msgt .= " " . __("The levels with issues are highlighted below.", 'paid-memberships-pro' );
98
+
else {
99
+
if ( false === $pmpro_braintree_error ) {
100
+
$msgt .= " <a href=\"" . admin_url( 'admin.php?page=pmpro-membershiplevels' ) . "\">" . __( "Please edit your levels", 'paid-memberships-pro' ) . "</a>.";
101
+
}
102
+
}
103
+
}
104
+
105
+
if(!pmpro_checkLevelForTwoCheckoutCompatibility())
106
+
{
107
+
$msg = -1;
108
+
$msgt = __("The billing details for some of your membership levels is not supported by TwoCheckout.", 'paid-memberships-pro' );
109
+
if($view == "pmpro-membershiplevels" && !empty($edit_level) && $edit_level > 0)
110
+
{
111
+
if(!pmpro_checkLevelForTwoCheckoutCompatibility($edit_level))
112
+
{
113
+
global $pmpro_twocheckout_error;
114
+
$pmpro_twocheckout_error = true;
115
+
116
+
$msg = -1;
117
+
$msgt = __("The billing details for this level are not supported by 2Checkout. Please review the notes in the Billing Details section below.", 'paid-memberships-pro' );
118
+
}
119
+
}
120
+
elseif($view == "pmpro-membershiplevels")
121
+
$msgt .= " " . __("The levels with issues are highlighted below.", 'paid-memberships-pro' );
122
+
else
123
+
$msgt .= " <a href=\"" . admin_url('admin.php?page=pmpro-membershiplevels') . "\">" . __("Please edit your levels", 'paid-memberships-pro' ) . "</a>.";
124
+
}
125
+
126
+
if ( ! pmpro_check_discount_code_for_gateway_compatibility() ) {
127
+
$msg = -1;
128
+
$msgt = __( 'The billing details for some of your discount codes are not supported by your gateway.', 'paid-memberships-pro' );
129
+
if ( $view == 'pmpro-discountcodes' && ! empty($edit_level) && $edit_level > 0 ) {
130
+
if ( ! pmpro_check_discount_code_for_gateway_compatibility( $edit_level ) ) {
131
+
$msg = -1;
132
+
$msgt = __( 'The billing details for this discount code are not supported by your gateway.', 'paid-memberships-pro' );
133
+
}
134
+
} elseif ( $view == 'pmpro-discountcodes' ) {
135
+
$msg = -1;
136
+
$msgt .= " " . __("The discount codes with issues are highlighted below.", 'paid-memberships-pro' );
137
+
} else {
138
+
$msgt .= " <a href=\"" . admin_url('admin.php?page=pmpro-discountcodes') . "\">" . __("Please edit your discount codes", 'paid-memberships-pro' ) . "</a>.";
139
+
140
+
}
141
+
}
142
+
143
+
$gateway = get_option( 'pmpro_gateway' );
144
+
if($gateway == "stripe" && version_compare( PHP_VERSION, '5.3.29', '>=' ) ) {
145
+
PMProGateway_stripe::dependencies();
146
+
} elseif($gateway == "braintree" && version_compare( PHP_VERSION, '5.4.45', '>=' ) ) {
147
+
PMProGateway_braintree::dependencies();
148
+
} elseif($gateway == "stripe" && version_compare( PHP_VERSION, '5.3.29', '<' ) ) {
149
+
$msg = -1;
150
+
$msgt = sprintf(__("The Stripe Gateway requires PHP 5.3.29 or greater. We recommend upgrading to PHP %s or greater. Ask your host to upgrade.", "paid-memberships-pro" ), PMPRO_MIN_PHP_VERSION );
151
+
} elseif($gateway == "braintree" && version_compare( PHP_VERSION, '5.4.45', '<' ) ) {
152
+
$msg = -1;
153
+
$msgt = sprintf(__("The Braintree Gateway requires PHP 5.4.45 or greater. We recommend upgrading to PHP %s or greater. Ask your host to upgrade.", "paid-memberships-pro" ), PMPRO_MIN_PHP_VERSION );
154
+
}
155
+
156
+
//if no errors yet, let's check and bug them if < our PMPRO_MIN_PHP_VERSION
157
+
if( empty($msgt) && version_compare( PHP_VERSION, PMPRO_MIN_PHP_VERSION, '<' ) ) {
158
+
$msg = 1;
159
+
$msgt = sprintf(__("We recommend upgrading to PHP %s or greater. Ask your host to upgrade.", "paid-memberships-pro" ), PMPRO_MIN_PHP_VERSION );
160
+
}
161
+
162
+
// Show the contextual messages on our admin pages.
163
+
if ( ! empty( $msg ) && ! in_array( $view, array( 'pmpro-dashboard', 'pmpro-member' ) ) ) { ?>
164
+
<div id="message" class="<?php if($msg > 0) echo "updated fade"; else echo "error"; ?>"><p><?php echo wp_kses_post( $msgt );?></p></div>
165
+
<?php } ?>
166
+
167
+
<div class="wrap pmpro_admin <?php echo 'pmpro_admin-' . esc_attr( $view ); ?>">
168
+
<?php
169
+
// Default to showing notification banners.
170
+
$show_notifications = true;
171
+
172
+
// Hide notifications on certain pages.
173
+
$hide_on_these_pages = array( 'pmpro-updates' );
174
+
if ( ! empty( $_REQUEST['page'] ) && in_array( sanitize_text_field( $_REQUEST['page'] ), $hide_on_these_pages ) ) {
175
+
$show_notifications = false;
176
+
}
177
+
178
+
// Hide notifications if the user has disabled them.
179
+
$notification_handler = pmpro_get_pmpro_banner_notifier();
180
+
if( $notification_handler->get_max_notification_priority() < 1 ) {
181
+
$show_notifications = false;
182
+
}
183
+
184
+
if( $show_notifications ) :
185
+
?>
186
+
<div id="pmpro_notifications">
187
+
</div>
188
+
<?php
189
+
// To debug a specific notification.
190
+
if ( !empty( $_REQUEST['pmpro_notification'] ) ) {
191
+
$specific_notification = '&pmpro_notification=' . intval( $_REQUEST['pmpro_notification'] );
192
+
} else {
193
+
$specific_notification = '';
194
+
}
195
+
?>
196
+
<script>
197
+
jQuery(document).ready(function() {
198
+
jQuery.get('<?php echo esc_url_raw( admin_url( "admin-ajax.php?action=pmpro_notifications" . $specific_notification ) ); ?>', function(data) {
199
+
if(data && data != 'NULL')
200
+
jQuery('#pmpro_notifications').html(data);
201
+
});
202
+
});
203
+
</script>
204
+
<?php endif; ?>
205
+
206
+
<?php
207
+
$settings_tabs = array(
208
+
'pmpro-dashboard',
209
+
'pmpro-membershiplevels',
210
+
'pmpro-memberslist',
211
+
'pmpro-reports',
212
+
'pmpro-orders',
213
+
'pmpro-subscriptions',
214
+
'pmpro-discountcodes',
215
+
'pmpro-pagesettings',
216
+
'pmpro-paymentsettings',
217
+
'pmpro-securitysettings',
218
+
'pmpro-emailsettings',
219
+
'pmpro-userfields',
220
+
'pmpro-emailtemplates',
221
+
'pmpro-designsettings',
222
+
'pmpro-advancedsettings',
223
+
'pmpro-addons',
224
+
'pmpro-license',
225
+
'pmpro-wizard'
226
+
);
227
+
if( in_array( $view, $settings_tabs ) ) { ?>
228
+
<nav class="pmpro-nav-primary" aria-labelledby="pmpro-membership-menu">
229
+
<h2 id="pmpro-membership-menu" class="screen-reader-text"><?php esc_html_e( 'Memberships Area Menu', 'paid-memberships-pro' ); ?></h2>
230
+
<ul>
231
+
<?php if(current_user_can('pmpro_dashboard')) { ?>
232
+
<li><a href="<?php echo esc_url( admin_url( 'admin.php?page=pmpro-dashboard' ) );?>"<?php if($view == 'pmpro-dashboard') { ?> class="current"<?php } ?>"><?php esc_html_e('Dashboard', 'paid-memberships-pro' );?></a></li>
233
+
<?php } ?>
234
+
235
+
<?php if(current_user_can('pmpro_memberslist')) { ?>
236
+
<li><a href="<?php echo esc_url( admin_url( 'admin.php?page=pmpro-memberslist' ) );?>"<?php if($view == 'pmpro-memberslist') { ?> class="current"<?php } ?>"><?php esc_html_e('Members', 'paid-memberships-pro' );?></a></li>
237
+
<?php } ?>
238
+
239
+
<?php if(current_user_can('pmpro_orders')) { ?>
240
+
<li><a href="<?php echo esc_url( admin_url( 'admin.php?page=pmpro-orders' ) );?>"<?php if($view == 'pmpro-orders') { ?> class="current"<?php } ?>"><?php esc_html_e('Orders', 'paid-memberships-pro' );?></a></li>
241
+
<?php } ?>
242
+
243
+
<?php if(current_user_can('pmpro_edit_members')) { ?>
244
+
<li><a href="<?php echo esc_url( admin_url( 'admin.php?page=pmpro-subscriptions' ) );?>"<?php if($view == 'pmpro-subscriptions') { ?> class="current"<?php } ?>"><?php esc_html_e('Subscriptions', 'paid-memberships-pro' );?></a></li>
245
+
<?php } ?>
246
+
247
+
<?php if(current_user_can('pmpro_reports')) { ?>
248
+
<li><a href="<?php echo esc_url( admin_url( 'admin.php?page=pmpro-reports' ) );?>"<?php if($view == 'pmpro-reports') { ?> class="current"<?php } ?>"><?php esc_html_e('Reports', 'paid-memberships-pro' );?></a></li>
249
+
<?php } ?>
250
+
251
+
<?php if(current_user_can('pmpro_membershiplevels')) { ?>
252
+
<li><a href="<?php echo esc_url( admin_url( 'admin.php?page=pmpro-membershiplevels' ) );?>"<?php if( in_array( $view, array( 'pmpro-membershiplevels', 'pmpro-discountcodes', 'pmpro-pagesettings', 'pmpro-paymentsettings', 'pmpro-securitysettings', 'pmpro-emailsettings', 'pmpro-emailtemplates', 'pmpro-designsettings', 'pmpro-advancedsettings' ) ) ) { ?> class="current"<?php } ?>"><?php esc_html_e('Settings', 'paid-memberships-pro' );?></a></li>
253
+
<?php } ?>
254
+
255
+
<?php if(current_user_can('pmpro_addons')) { ?>
256
+
<li><a href="<?php echo esc_url( admin_url( 'admin.php?page=pmpro-addons' ) );?>"<?php if($view == 'pmpro-addons') { ?> class="current"<?php } ?>"><?php esc_html_e('Add Ons', 'paid-memberships-pro' );?></a></li>
257
+
<?php } ?>
258
+
259
+
<?php if(current_user_can('manage_options')) { ?>
260
+
<li><a href="<?php echo esc_url( admin_url( 'admin.php?page=pmpro-license' ) );?>"<?php if($view == 'pmpro-license') { ?> class="current"<?php } ?>"><?php esc_html_e('License', 'paid-memberships-pro' );?></a></li>
261
+
<?php } ?>
262
+
263
+
<?php if ( current_user_can('pmpro_wizard' ) && pmpro_show_setup_wizard_link() ) { ?>
264
+
<li><a href="<?php echo esc_url( admin_url( 'admin.php?page=pmpro-wizard' ) );?>"<?php if($view == 'pmpro-wizard') { ?> class="current"<?php } ?>"><?php esc_html_e('Setup Wizard', 'paid-memberships-pro' );?></a></li>
265
+
<?php } ?>
266
+
</ul>
267
+
</nav>
268
+
269
+
<?php if( $view == 'pmpro-membershiplevels' || $view == 'pmpro-discountcodes' || $view == 'pmpro-pagesettings' || $view == 'pmpro-paymentsettings' || $view == 'pmpro-securitysettings' || $view == 'pmpro-emailsettings' || $view == 'pmpro-emailtemplates' || $view == 'pmpro-userfields' || $view == 'pmpro-designsettings' || $view == 'pmpro-advancedsettings' ) { ?>
270
+
<nav class="pmpro-nav-secondary" aria-labelledby="pmpro-settings-menu">
271
+
<h2 id="pmpro-settings-menu" class="screen-reader-text"><?php esc_html_e( 'Membership Settings Menu', 'paid-memberships-pro' ); ?></h2>
272
+
<ul>
273
+
<?php if(current_user_can('pmpro_membershiplevels')) { ?>
274
+
<li><a href="<?php echo esc_url( admin_url( 'admin.php?page=pmpro-membershiplevels' ) );?>" class="<?php if($view == 'pmpro-membershiplevels') { ?>current<?php } ?>"><?php esc_html_e('Levels', 'paid-memberships-pro' );?></a></li>
275
+
<?php } ?>
276
+
277
+
<?php if(current_user_can('pmpro_discountcodes')) { ?>
278
+
<li><a href="<?php echo esc_url( admin_url( 'admin.php?page=pmpro-discountcodes' ) );?>" class="<?php if($view == 'pmpro-discountcodes') { ?>current<?php } ?>"><?php esc_html_e('Discount Codes', 'paid-memberships-pro' );?></a></li>
279
+
<?php } ?>
280
+
281
+
<?php if(current_user_can('pmpro_pagesettings')) { ?>
282
+
<li><a href="<?php echo esc_url( admin_url( 'admin.php?page=pmpro-pagesettings' ) );?>" class="<?php if($view == 'pmpro-pagesettings') { ?>current<?php } ?>"><?php esc_html_e('Pages', 'paid-memberships-pro' );?></a></li>
283
+
<?php } ?>
284
+
285
+
<?php if(current_user_can('pmpro_paymentsettings')) { ?>
286
+
<li><a href="<?php echo esc_url( admin_url( 'admin.php?page=pmpro-paymentsettings' ) );?>" class="<?php if($view == 'pmpro-paymentsettings') { ?>current<?php } ?>"><?php esc_html_e( 'Payments', 'paid-memberships-pro' );?></a></li>
287
+
<?php } ?>
288
+
289
+
<?php if(current_user_can('pmpro_securitysettings')) { ?>
290
+
<li><a href="<?php echo esc_url( admin_url( 'admin.php?page=pmpro-securitysettings' ) );?>" class="<?php if($view == 'pmpro-securitysettings') { ?>current<?php } ?>"><?php esc_html_e('Security', 'paid-memberships-pro' );?></a></li>
291
+
<?php } ?>
292
+
293
+
<?php if(current_user_can('pmpro_emailsettings')) { ?>
294
+
<li><a href="<?php echo esc_url( admin_url( 'admin.php?page=pmpro-emailsettings' ) );?>" class="<?php if($view == 'pmpro-emailsettings') { ?>current<?php } ?>"><?php esc_html_e('Email Settings', 'paid-memberships-pro' );?></a></li>
295
+
<?php } ?>
296
+
297
+
<?php if(current_user_can('pmpro_emailtemplates')) { ?>
298
+
<li><a href="<?php echo esc_url( admin_url( 'admin.php?page=pmpro-emailtemplates' ) );?>" class="<?php if($view == 'pmpro-emailtemplates') { ?>current<?php } ?>"><?php esc_html_e('Email Templates', 'paid-memberships-pro' );?></a></li>
299
+
<?php } ?>
300
+
301
+
<?php if ( current_user_can( 'pmpro_userfields' ) ) { ?>
302
+
<li><a href="<?php echo esc_url( add_query_arg( array( 'page' => 'pmpro-userfields' ), get_admin_url(null, 'admin.php' ) ) ); ?>" class="<?php if($view == 'pmpro-userfields') { ?>current<?php } ?>"><?php esc_html_e('User Fields', 'paid-memberships-pro' );?></a></li>
303
+
<?php } ?>
304
+
305
+
<?php if(current_user_can('pmpro_designsettings')) { ?>
306
+
<li><a href="<?php echo esc_url( admin_url( 'admin.php?page=pmpro-designsettings' ) );?>" class="<?php if($view == 'pmpro-designsettings') { ?>current<?php } ?>"><?php esc_html_e('Design', 'paid-memberships-pro' );?></a></li>
307
+
<?php } ?>
308
+
309
+
<?php if(current_user_can('pmpro_advancedsettings')) { ?>
310
+
<li><a href="<?php echo esc_url( admin_url( 'admin.php?page=pmpro-advancedsettings' ) );?>" class="<?php if($view == 'pmpro-advancedsettings') { ?>current<?php } ?>"><?php esc_html_e('Advanced', 'paid-memberships-pro' );?></a></li>
311
+
<?php } ?>
312
+
</ul>
313
+
</nav>
314
+
<?php } ?>
315
+
316
+
<?php
317
+
}
318
+
319
+
// Check if the site is using Stripe with a lowered Connect fee.
320
+
// Check if Stripe is the gateway.
321
+
if ( 'stripe' === get_option( 'pmpro_gateway' ) ) {
322
+
// Check if the user is not paying for a license.
323
+
if ( ! pmpro_license_isValid( null, pmpro_license_get_premium_types() ) ) {
324
+
// Check if the user selected to acknowledge the 2% fee.
325
+
if ( ! empty( $_REQUEST['acknowledge_stripe_connect_fee'] ) && '1' === $_REQUEST['acknowledge_stripe_connect_fee'] ) {
326
+
// Delete the option to acknowledge the fee.
327
+
delete_option( 'pmpro_stripe_connect_reduced_application_fee' );
328
+
329
+
// Add option to acknowledge the fee. Include the user ID and timestamp.
330
+
update_option( 'pmpro_stripe_connect_acknowledged_fee', array(
331
+
'user_id' => get_current_user_id(),
332
+
'timestamp' => date_i18n( 'Y-m-d H:i:s' ),
333
+
) );
334
+
}
335
+
336
+
// Check if the site is using a lowered Connect fee.
337
+
$reduced_fee = get_option( 'pmpro_stripe_connect_reduced_application_fee' );
338
+
$filtered_fee = apply_filters( 'pmpro_set_application_fee_percentage', 2 );
339
+
if ( empty( get_option( 'pmpro_stripe_connect_acknowledged_fee' ) ) && 2 != $filtered_fee ) {
340
+
?>
341
+
<div class="notice notice-large notice-warning inline">
342
+
<h3><?php esc_html_e( 'Action Required: Your Stripe Connect Fees', 'paid-memberships-pro' ); ?></h3>
343
+
<p><?php esc_html_e( 'Your site is using a custom filter to adjust the Paid Memberships Pro Stripe Connect application fee.', 'paid-memberships-pro' ); ?> <strong><?php esc_html_e( 'Sites that continue using a reduced fee risk being disconnected from Stripe.', 'paid-memberships-pro' ); ?></strong></p>
344
+
<p><?php esc_html_e( 'If you would like to continue using Stripe Connect, please click the button below to accept the 2% application fee.', 'paid-memberships-pro' ); ?></p>
345
+
<p><?php esc_html_e( 'Or, to reduce the fee to 0%, you may either:', 'paid-memberships-pro' ); ?></p>
346
+
<ol>
347
+
<li>
348
+
<?php
349
+
$pmpro_stripe_restricted_key_docs_escaped = '<a target="_blank" href="https://www.paidmembershipspro.com/gateway/stripe/switch-legacy-to-connect/?utm_source=pmpro&utm_medium=plugin&utm_campaign=documentation&utm_content=stripe-restricted-key-setup#h-stripe-restricted-keys-alternative-to-stripe-connect">' . esc_html( 'by following this documentation', 'paid-memberships-pro' ) . '</a>';
350
+
// translators: %s is a link to the PMPro documentation for switching to Stripe Restricted API keys.
351
+
printf( esc_html__( 'Switch to using your own Stripe Restricted API keys %s (bypassing Stripe Connect).', 'paid-memberships-pro' ), $pmpro_stripe_restricted_key_docs_escaped ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
352
+
?>
353
+
</li>
354
+
<li>
355
+
<?php
356
+
$pmpro_premium_license_link_escaped = '<a href="' . esc_url( add_query_arg( array( 'page' => 'pmpro-license#pmpro-license-settings' ), admin_url( 'admin.php' ) ) ) . '">' . esc_html( 'PMPro Premium license', 'paid-memberships-pro' ) . '</a>';
357
+
// translators: %s is a link to the PMPro Premium license page.
358
+
printf( esc_html__( 'Activate a %s to waive the fee.', 'paid-memberships-pro' ), $pmpro_premium_license_link_escaped ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
359
+
?>
360
+
</li>
361
+
</ol>
362
+
<p>
363
+
<a href="<?php echo esc_url( add_query_arg( array( 'page' => 'pmpro-paymentsettings', 'acknowledge_stripe_connect_fee' => '1' ), admin_url( 'admin.php' ) ) ); ?>" class="button button-primary">
364
+
<?php esc_html_e( 'Accept and Continue With 2% Fee', 'paid-memberships-pro' ); ?>
365
+
</a>
366
+
</p>
367
+
</div>
368
+
<?php
369
+
} elseif ( ! empty( $reduced_fee ) && 2 != $reduced_fee ) {
370
+
?>
371
+
<div class="notice notice-large notice-warning inline">
372
+
<h3><?php esc_html_e( 'Important: Stripe Connect Fee Updated', 'paid-memberships-pro' ); ?></h3>
373
+
<p><?php esc_html_e( 'In 2023, Paid Memberships Pro raised the Stripe Connect application fee for newly connected sites to 2%. Because your site was connected prior to this update, you were allowed to continue using the legacy 1% application fee.', 'paid-memberships-pro' ); ?></p>
374
+
<p>
375
+
<?php esc_html_e( 'With the release of PMPro v3.5, we now charge all sites the same 2% application fee. No legacy rates will be supported from this point forward.', 'paid-memberships-pro' ); ?>
376
+
<a href="https://www.paidmembershipspro.com/pmpro-update-3-5/?utm_source=pmpro&utm_medium=plugin&utm_campaign=blog&utm_content=stripe-connect-fee-update" target="_blank"><?php esc_html_e( 'Learn more in the PMPro v3.5 release notes.', 'paid-memberships-pro' ); ?></a>
377
+
</p>
378
+
<p><?php esc_html_e( 'To reduce the fee to 0%, you may either:', 'paid-memberships-pro' ); ?></p>
379
+
<ol>
380
+
<li>
381
+
<?php
382
+
$pmpro_stripe_restricted_key_docs_escaped = '<a target="_blank" href="https://www.paidmembershipspro.com/gateway/stripe/switch-legacy-to-connect/?utm_source=pmpro&utm_medium=plugin&utm_campaign=documentation&utm_content=stripe-restricted-key-setup#h-stripe-restricted-keys-alternative-to-stripe-connect">' . esc_html( 'by following this documentation', 'paid-memberships-pro' ) . '</a>';
383
+
// translators: %s is a link to the PMPro documentation for switching to Stripe Restricted API keys.
384
+
printf( esc_html__( 'Switch to using your own Stripe Restricted API keys %s (bypassing Stripe Connect).', 'paid-memberships-pro' ), $pmpro_stripe_restricted_key_docs_escaped ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
385
+
?>
386
+
</li>
387
+
<li>
388
+
<?php
389
+
$pmpro_premium_license_link_escaped = '<a href="' . esc_url( add_query_arg( array( 'page' => 'pmpro-license#pmpro-license-settings' ), admin_url( 'admin.php' ) ) ) . '">' . esc_html( 'PMPro Premium license', 'paid-memberships-pro' ) . '</a>';
390
+
// translators: %s is a link to the PMPro Premium license page.
391
+
printf( esc_html__( 'Activate a %s to waive the fee.', 'paid-memberships-pro' ), $pmpro_premium_license_link_escaped ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
392
+
?>
393
+
</li>
394
+
</ol>
395
+
<p>
396
+
<a href="<?php echo esc_url( add_query_arg( array( 'page' => 'pmpro-paymentsettings', 'acknowledge_stripe_connect_fee' => '1' ), admin_url( 'admin.php' ) ) ); ?>" class="button button-primary">
397
+
<?php esc_html_e( 'Dismiss this Notice', 'paid-memberships-pro' ); ?>
398
+
</a>
399
+
</p>
400
+
</div>
401
+
<?php
402
+
}
403
+
}
404
+
}
405
+