Paid Memberships Pro - Version 1.9.4.4

Version Description

  • BUG FIX: Updated the filters to extend membership levels to use the new pmpro_getSpecificMembershipLevelForUser() function to avoid bugs when MMPU is enabled.
  • BUG FIX: Fixed cases where certain email templates were resulting in the body of the email being duplicated.
  • BUG FIX: Fixed conflict with pmpro-email-templates when emails were disabled (the pmpro_email filter returns false). (Thanks, Mathieu Hays)
  • BUG FIX: Now updating status on related subscription orders BEFORE canceling at gateway to avoid cases where the webhook sent by the gateway after canceling the subscription triggers further cancellation attempts.
  • BUG FIX: No longer showing the "Stripe Publishable Key appears incorrect" error message if the key field is blank.
  • ENHANCEMENT: Added the pmpro_getSpecificMembershipLevelForUser( $user_id, $level_id ) function for cases where MMPU is enabled and you want data about a specific membership level a user might have.
  • ENHANCEMENT: Changed labels on the reCAPTCHA settings to match their current terminology: Site Key and Secret Key.
Download this release

Release Info

Developer strangerstudios
Plugin Icon 128x128 Paid Memberships Pro
Version 1.9.4.4
Comparing to
See all releases

Code changes from version 1.9.4.3 to 1.9.4.4

adminpages/advancedsettings.php CHANGED
@@ -245,11 +245,11 @@ if(pmpro_displayAds())
245
  <tr id="recaptcha_tr" <?php if(!$recaptcha) { ?>style="display: none;"<?php } ?>>
246
  <th scope="row" valign="top">&nbsp;</th>
247
  <td>
248
- <label for="recaptcha_publickey"><?php _e('reCAPTCHA Public Key', 'paid-memberships-pro' );?>:</label>
249
- <input type="text" name="recaptcha_publickey" size="60" value="<?php echo esc_attr($recaptcha_publickey);?>" />
250
  <br /><br />
251
- <label for="recaptcha_privatekey"><?php _e('reCAPTCHA Private Key', 'paid-memberships-pro' );?>:</label>
252
- <input type="text" name="recaptcha_privatekey" size="60" value="<?php echo esc_attr($recaptcha_privatekey);?>" />
253
  </td>
254
  </tr>
255
  <tr>
245
  <tr id="recaptcha_tr" <?php if(!$recaptcha) { ?>style="display: none;"<?php } ?>>
246
  <th scope="row" valign="top">&nbsp;</th>
247
  <td>
248
+ <label for="recaptcha_publickey"><?php _e('reCAPTCHA Site Key', 'paid-memberships-pro' );?>:</label>
249
+ <input type="text" id="recaptcha_publickey" name="recaptcha_publickey" size="60" value="<?php echo esc_attr($recaptcha_publickey);?>" />
250
  <br /><br />
251
+ <label for="recaptcha_privatekey"><?php _e('reCAPTCHA Secret Key', 'paid-memberships-pro' );?>:</label>
252
+ <input type="text" id="recaptcha_privatekey" name="recaptcha_privatekey" size="60" value="<?php echo esc_attr($recaptcha_privatekey);?>" />
253
  </td>
254
  </tr>
255
  <tr>
adminpages/orders.php CHANGED
@@ -1,15 +1,15 @@
1
  <?php
2
- //only admins can get this
3
- if ( ! function_exists( "current_user_can" ) || ( ! current_user_can( "manage_options" ) && ! current_user_can( "pmpro_orders" ) ) ) {
4
- die( __( "You do not have permissions to perform this action.", 'paid-memberships-pro' ) );
5
  }
6
 
7
- //vars
8
  global $wpdb;
9
  if ( isset( $_REQUEST['s'] ) ) {
10
  $s = sanitize_text_field( trim( $_REQUEST['s'] ) );
11
  } else {
12
- $s = "";
13
  }
14
 
15
  if ( isset( $_REQUEST['l'] ) ) {
@@ -21,58 +21,58 @@ if ( isset( $_REQUEST['l'] ) ) {
21
  if ( isset( $_REQUEST['start-month'] ) ) {
22
  $start_month = intval( $_REQUEST['start-month'] );
23
  } else {
24
- $start_month = "1";
25
  }
26
 
27
  if ( isset( $_REQUEST['start-day'] ) ) {
28
  $start_day = intval( $_REQUEST['start-day'] );
29
  } else {
30
- $start_day = "1";
31
  }
32
 
33
  if ( isset( $_REQUEST['start-year'] ) ) {
34
  $start_year = intval( $_REQUEST['start-year'] );
35
  } else {
36
- $start_year = date_i18n( "Y" );
37
  }
38
 
39
  if ( isset( $_REQUEST['end-month'] ) ) {
40
  $end_month = intval( $_REQUEST['end-month'] );
41
  } else {
42
- $end_month = date_i18n( "n" );
43
  }
44
 
45
  if ( isset( $_REQUEST['end-day'] ) ) {
46
  $end_day = intval( $_REQUEST['end-day'] );
47
  } else {
48
- $end_day = date_i18n( "j" );
49
  }
50
 
51
  if ( isset( $_REQUEST['end-year'] ) ) {
52
  $end_year = intval( $_REQUEST['end-year'] );
53
  } else {
54
- $end_year = date_i18n( "Y" );
55
  }
56
 
57
  if ( isset( $_REQUEST['predefined-date'] ) ) {
58
  $predefined_date = sanitize_text_field( $_REQUEST['predefined-date'] );
59
  } else {
60
- $predefined_date = "This Month";
61
  }
62
 
63
  if ( isset( $_REQUEST['status'] ) ) {
64
  $status = sanitize_text_field( $_REQUEST['status'] );
65
  } else {
66
- $status = "";
67
  }
68
 
69
  if ( isset( $_REQUEST['filter'] ) ) {
70
  $filter = sanitize_text_field( $_REQUEST['filter'] );
71
  } else {
72
- $filter = "all";
73
  }
74
 
75
- //some vars for the search
76
  if ( isset( $_REQUEST['pn'] ) ) {
77
  $pn = intval( $_REQUEST['pn'] );
78
  } else {
@@ -96,94 +96,96 @@ if ( isset( $_REQUEST['limit'] ) ) {
96
  $end = $pn * $limit;
97
  $start = $end - $limit;
98
 
99
- //filters
100
- if ( empty( $filter ) || $filter === "all" ) {
101
- $condition = "1=1";
102
- $filter = "all";
103
- } elseif ( $filter == "within-a-date-range" ) {
104
- $start_date = $start_year . "-" . $start_month . "-" . $start_day;
105
- $end_date = $end_year . "-" . $end_month . "-" . $end_day;
106
 
107
- //add times to dates
108
- $start_date = $start_date . " 00:00:00";
109
- $end_date = $end_date . " 23:59:59";
110
 
111
  $condition = "timestamp BETWEEN '" . esc_sql( $start_date ) . "' AND '" . esc_sql( $end_date ) . "'";
112
- } elseif ( $filter == "predefined-date-range" ) {
113
- if ( $predefined_date == "Last Month" ) {
114
- $start_date = date_i18n( "Y-m-d", strtotime( "first day of last month", current_time( "timestamp" ) ) );
115
- $end_date = date_i18n( "Y-m-d", strtotime( "last day of last month", current_time( "timestamp" ) ) );
116
- } elseif ( $predefined_date == "This Month" ) {
117
- $start_date = date_i18n( "Y-m-d", strtotime( "first day of this month", current_time( "timestamp" ) ) );
118
- $end_date = date_i18n( "Y-m-d", strtotime( "last day of this month", current_time( "timestamp" ) ) );
119
- } elseif ( $predefined_date == "This Year" ) {
120
  $year = date_i18n( 'Y' );
121
- $start_date = date_i18n( "Y-m-d", strtotime( "first day of January $year", current_time( "timestamp" ) ) );
122
- $end_date = date_i18n( "Y-m-d", strtotime( "last day of December $year", current_time( "timestamp" ) ) );
123
- } elseif ( $predefined_date == "Last Year" ) {
124
  $year = date_i18n( 'Y' ) - 1;
125
- $start_date = date_i18n( "Y-m-d", strtotime( "first day of January $year", current_time( "timestamp" ) ) );
126
- $end_date = date_i18n( "Y-m-d", strtotime( "last day of December $year", current_time( "timestamp" ) ) );
127
  }
128
 
129
- //add times to dates
130
- $start_date = $start_date . " 00:00:00";
131
- $end_date = $end_date . " 23:59:59";
132
 
133
  $condition = "timestamp BETWEEN '" . esc_sql( $start_date ) . "' AND '" . esc_sql( $end_date ) . "'";
134
- } elseif ( $filter == "within-a-level" ) {
135
- $condition = "membership_id = " . esc_sql( $l );
136
- } elseif ( $filter == "within-a-status" ) {
137
  $condition = "status = '" . esc_sql( $status ) . "' ";
138
  }
139
 
140
- //emailing?
141
  if ( ! empty( $_REQUEST['email'] ) && ! empty( $_REQUEST['order'] ) ) {
142
  $email = new PMProEmail();
143
- $user = get_user_by( 'email', sanitize_email($_REQUEST['email']) );
144
  $order = new MemberOrder( $_REQUEST['order'] );
145
  if ( $email->sendBillableInvoiceEmail( $user, $order ) ) {
146
- $pmpro_msg = __( "Invoice emailed successfully.", 'paid-memberships-pro' );
147
- $pmpro_msgt = "success";
148
  } else {
149
- $pmpro_msg = __( "Error emailing invoice.", 'paid-memberships-pro' );
150
- $pmpro_msgt = "error";
151
  }
152
 
153
- //clean up so we stay on the orders list view
154
  unset( $_REQUEST['order'] );
155
  $order = null;
156
  }
157
 
158
- //deleting?
159
  if ( ! empty( $_REQUEST['delete'] ) ) {
160
  $dorder = new MemberOrder( intval( $_REQUEST['delete'] ) );
161
  if ( $dorder->deleteMe() ) {
162
- $pmpro_msg = __( "Order deleted successfully.", 'paid-memberships-pro' );
163
- $pmpro_msgt = "success";
164
  } else {
165
- $pmpro_msg = __( "Error deleting order.", 'paid-memberships-pro' );
166
- $pmpro_msgt = "error";
167
  }
168
  }
169
 
170
- $thisyear = date_i18n( "Y" );
171
 
172
- //this array stores fields that should be read only
173
- $read_only_fields = apply_filters( "pmpro_orders_read_only_fields", array(
174
- "code",
175
- "payment_transaction_id",
176
- "subscription_transaction_id"
177
- ) );
 
 
178
 
179
- //if this is a new order or copy of one, let's make all fields editable
180
- if( ! empty( $_REQUEST['order'] ) && $_REQUEST['order'] < 0 ) {
181
  $read_only_fields = array();
182
  }
183
 
184
- //saving?
185
  if ( ! empty( $_REQUEST['save'] ) ) {
186
- //start with old order if applicable
187
  $order_id = intval( $_REQUEST['order'] );
188
  if ( $order_id > 0 ) {
189
  $order = new MemberOrder( $order_id );
@@ -192,118 +194,118 @@ if ( ! empty( $_REQUEST['save'] ) ) {
192
  $order->billing = new stdClass();
193
  }
194
 
195
- //update values
196
- if ( ! in_array( "code", $read_only_fields ) && isset( $_POST['code'] ) ) {
197
  $order->code = sanitize_text_field( $_POST['code'] );
198
  }
199
- if ( ! in_array( "user_id", $read_only_fields ) && isset( $_POST['user_id'] ) ) {
200
  $order->user_id = intval( $_POST['user_id'] );
201
  }
202
- if ( ! in_array( "membership_id", $read_only_fields ) && isset( $_POST['membership_id'] ) ) {
203
  $order->membership_id = intval( $_POST['membership_id'] );
204
  }
205
- if ( ! in_array( "billing_name", $read_only_fields ) && isset( $_POST['billing_name'] ) ) {
206
- $order->billing->name = sanitize_text_field(wp_unslash( $_POST['billing_name'] ));
207
  }
208
- if ( ! in_array( "billing_street", $read_only_fields ) && isset( $_POST['billing_street'] ) ) {
209
- $order->billing->street = sanitize_text_field(wp_unslash( $_POST['billing_street'] ));
210
  }
211
- if ( ! in_array( "billing_city", $read_only_fields ) && isset( $_POST['billing_city'] ) ) {
212
- $order->billing->city = sanitize_text_field(wp_unslash( $_POST['billing_city'] ));
213
  }
214
- if ( ! in_array( "billing_state", $read_only_fields ) && isset( $_POST['billing_state'] ) ) {
215
- $order->billing->state = sanitize_text_field(wp_unslash( $_POST['billing_state'] ));
216
  }
217
- if ( ! in_array( "billing_zip", $read_only_fields ) && isset( $_POST['billing_zip'] ) ) {
218
  $order->billing->zip = sanitize_text_field( $_POST['billing_zip'] );
219
  }
220
- if ( ! in_array( "billing_country", $read_only_fields ) && isset( $_POST['billing_country'] ) ) {
221
- $order->billing->country = sanitize_text_field(wp_unslash( $_POST['billing_country'] ));
222
  }
223
- if ( ! in_array( "billing_phone", $read_only_fields ) && isset( $_POST['billing_phone'] ) ) {
224
  $order->billing->phone = sanitize_text_field( $_POST['billing_phone'] );
225
  }
226
- if ( ! in_array( "subtotal", $read_only_fields ) && isset( $_POST['subtotal'] ) ) {
227
  $order->subtotal = sanitize_text_field( $_POST['subtotal'] );
228
  }
229
- if ( ! in_array( "tax", $read_only_fields ) && isset( $_POST['tax'] ) ) {
230
  $order->tax = sanitize_text_field( $_POST['tax'] );
231
  }
232
- if ( ! in_array( "couponamount", $read_only_fields ) && isset( $_POST['couponamount'] ) ) {
233
  $order->couponamount = sanitize_text_field( $_POST['couponamount'] );
234
  }
235
- if ( ! in_array( "total", $read_only_fields ) && isset( $_POST['total'] ) ) {
236
  $order->total = sanitize_text_field( $_POST['total'] );
237
  }
238
- if ( ! in_array( "payment_type", $read_only_fields ) && isset( $_POST['payment_type'] ) ) {
239
  $order->payment_type = sanitize_text_field( $_POST['payment_type'] );
240
  }
241
- if ( ! in_array( "cardtype", $read_only_fields ) && isset( $_POST['cardtype'] ) ) {
242
  $order->cardtype = sanitize_text_field( $_POST['cardtype'] );
243
  }
244
- if ( ! in_array( "accountnumber", $read_only_fields ) && isset( $_POST['accountnumber'] ) ) {
245
  $order->accountnumber = sanitize_text_field( $_POST['accountnumber'] );
246
  }
247
- if ( ! in_array( "expirationmonth", $read_only_fields ) && isset( $_POST['expirationmonth'] ) ) {
248
  $order->expirationmonth = sanitize_text_field( $_POST['expirationmonth'] );
249
  }
250
- if ( ! in_array( "expirationyear", $read_only_fields ) && isset( $_POST['expirationyear'] ) ) {
251
  $order->expirationyear = sanitize_text_field( $_POST['expirationyear'] );
252
  }
253
-
254
- if ( ! in_array( "status", $read_only_fields ) && isset( $_POST['status'] ) ) {
255
  $order->status = pmpro_sanitize_with_safelist( $_POST['status'], pmpro_getOrderStatuses() );
256
  }
257
- if ( ! in_array( "gateway", $read_only_fields ) && isset( $_POST['gateway'] ) ) {
258
  $order->gateway = sanitize_text_field( $_POST['gateway'] );
259
  }
260
- if ( ! in_array( "gateway_environment", $read_only_fields ) && isset( $_POST['gateway_environment'] ) ) {
261
  $order->gateway_environment = sanitize_text_field( $_POST['gateway_environment'] );
262
  }
263
- if ( ! in_array( "payment_transaction_id", $read_only_fields ) && isset( $_POST['payment_transaction_id'] ) ) {
264
  $order->payment_transaction_id = sanitize_text_field( $_POST['payment_transaction_id'] );
265
  }
266
- if ( ! in_array( "subscription_transaction_id", $read_only_fields ) && isset( $_POST['subscription_transaction_id'] ) ) {
267
  $order->subscription_transaction_id = sanitize_text_field( $_POST['subscription_transaction_id'] );
268
  }
269
- if ( ! in_array( "notes", $read_only_fields ) && isset( $_POST['notes'] ) ) {
270
  global $allowedposttags;
271
- $order->notes = wp_kses(wp_unslash($_REQUEST['notes']), $allowedposttags);
272
  }
273
 
274
- //affiliate stuff
275
- $affiliates = apply_filters( "pmpro_orders_show_affiliate_ids", false );
276
  if ( ! empty( $affiliates ) ) {
277
- if ( ! in_array( "affiliate_id", $read_only_fields ) ) {
278
  $order->affiliate_id = sanitize_text_field( $_POST['affiliate_id'] );
279
  }
280
- if ( ! in_array( "affiliate_subid", $read_only_fields ) ) {
281
  $order->affiliate_subid = sanitize_text_field( $_POST['affiliate_subid'] );
282
  }
283
  }
284
 
285
- //check nonce for saving
286
  $nonceokay = true;
287
- if (empty($_REQUEST['pmpro_orders_nonce']) || !check_admin_referer('save', 'pmpro_orders_nonce')) {
288
  $nonceokay = false;
289
  }
290
-
291
- //save
292
- if ( $order->saveOrder() !== false && $nonceokay) {
293
- //handle timestamp
294
- if ( $order->updateTimestamp( intval($_POST['ts_year']), intval($_POST['ts_month']), intval($_POST['ts_day']) ) !== false ) {
295
- $pmpro_msg = __( "Order saved successfully.", 'paid-memberships-pro' );
296
- $pmpro_msgt = "success";
297
  } else {
298
- $pmpro_msg = __( "Error updating order timestamp.", 'paid-memberships-pro' );
299
- $pmpro_msgt = "error";
300
  }
301
  } else {
302
- $pmpro_msg = __( "Error saving order.", 'paid-memberships-pro' );
303
- $pmpro_msgt = "error";
304
  }
305
  } else {
306
- //order passed?
307
  if ( ! empty( $_REQUEST['order'] ) ) {
308
  $order_id = intval( $_REQUEST['order'] );
309
  if ( $order_id > 0 ) {
@@ -311,90 +313,100 @@ if ( ! empty( $_REQUEST['save'] ) ) {
311
  } elseif ( ! empty( $_REQUEST['copy'] ) ) {
312
  $order = new MemberOrder( intval( $_REQUEST['copy'] ) );
313
 
314
- //new id
315
  $order->id = null;
316
 
317
- //new code
318
  $order->code = $order->getRandomCode();
319
  } else {
320
- $order = new MemberOrder(); //new order
321
 
322
- //defaults
323
  $order->code = $order->getRandomCode();
324
- $order->user_id = "";
325
- $order->membership_id = "";
326
  $order->billing = new stdClass();
327
- $order->billing->name = "";
328
- $order->billing->street = "";
329
- $order->billing->city = "";
330
- $order->billing->state = "";
331
- $order->billing->zip = "";
332
- $order->billing->country = "";
333
- $order->billing->phone = "";
334
- $order->subtotal = "";
335
- $order->tax = "";
336
- $order->couponamount = "";
337
- $order->total = "";
338
- $order->payment_type = "";
339
- $order->cardtype = "";
340
- $order->accountnumber = "";
341
- $order->expirationmonth = "";
342
- $order->expirationyear = "";
343
- $order->status = "success";
344
- $order->gateway = pmpro_getOption("gateway");
345
- $order->gateway_environment = pmpro_getOption("gateway_environment");
346
- $order->payment_transaction_id = "";
347
- $order->subscription_transaction_id = "";
348
- $order->affiliate_id = "";
349
- $order->affiliate_subid = "";
350
- $order->notes = "";
351
  }
352
  }
353
  }
354
 
355
- require_once( dirname( __FILE__ ) . "/admin_header.php" );
356
  ?>
357
 
358
  <?php if ( ! empty( $order ) ) { ?>
359
 
360
  <h2>
361
  <?php if ( ! empty( $order->id ) ) { ?>
362
- <?php _e( 'Order', 'paid-memberships-pro' ); ?> #<?php echo $order->id ?>: <?php echo $order->code ?>
363
  <?php } else { ?>
364
  <?php _e( 'New Order', 'paid-memberships-pro' ); ?>
365
  <?php } ?>
366
  </h2>
367
 
368
  <?php if ( ! empty( $pmpro_msg ) ) { ?>
369
- <div id="message" class="<?php if ( $pmpro_msgt == "success" ) {
370
- echo "updated fade";
 
 
371
  } else {
372
- echo "error";
373
- } ?>"><p><?php echo $pmpro_msg ?></p></div>
 
 
374
  <?php } ?>
375
 
376
  <form method="post" action="">
377
- <?php wp_nonce_field('save', 'pmpro_orders_nonce');?>
378
 
379
  <table class="form-table">
380
  <tbody>
381
  <tr>
382
  <th scope="row" valign="top"><label>ID:</label></th>
383
- <td><?php if ( ! empty( $order->id ) ) {
 
 
384
  echo $order->id;
385
- } else {
386
- echo __( "This will be generated when you save.", 'paid-memberships-pro' );
387
- } ?></td>
 
 
388
  </tr>
389
 
390
  <tr>
391
  <th scope="row" valign="top"><label for="code"><?php _e( 'Code', 'paid-memberships-pro' ); ?>:</label></th>
392
  <td>
393
- <?php if ( in_array( "code", $read_only_fields ) ) {
 
394
  echo $order->code;
395
- } else { ?>
396
- <input id="code" name="code" type="text" size="50"
397
- value="<?php echo esc_attr( $order->code ); ?>"/>
 
398
  <?php } ?>
399
  <?php if ( $order_id < 0 ) { ?>
400
  <small
@@ -405,11 +417,13 @@ require_once( dirname( __FILE__ ) . "/admin_header.php" );
405
  <tr>
406
  <th scope="row" valign="top"><label for="user_id"><?php _e( 'User ID', 'paid-memberships-pro' ); ?>:</label></th>
407
  <td>
408
- <?php if ( in_array( "user_id", $read_only_fields ) && $order_id > 0 ) {
 
409
  echo $order->user_id;
410
- } else { ?>
411
- <input id="user_id" name="user_id" type="text" size="50"
412
- value="<?php echo esc_attr( $order->user_id ); ?>"/>
 
413
  <?php } ?>
414
  </td>
415
  </tr>
@@ -418,11 +432,13 @@ require_once( dirname( __FILE__ ) . "/admin_header.php" );
418
  <th scope="row" valign="top"><label for="membership_id"><?php _e( 'Membership Level ID', 'paid-memberships-pro' ); ?>
419
  :</label></th>
420
  <td>
421
- <?php if ( in_array( "membership_id", $read_only_fields ) && $order_id > 0 ) {
 
422
  echo $order->membership_id;
423
- } else { ?>
424
- <input id="membership_id" name="membership_id" type="text" size="50"
425
- value="<?php echo esc_attr( $order->membership_id ); ?>"/>
 
426
  <?php } ?>
427
  </td>
428
  </tr>
@@ -431,11 +447,13 @@ require_once( dirname( __FILE__ ) . "/admin_header.php" );
431
  <th scope="row" valign="top"><label for="billing_name"><?php _e( 'Billing Name', 'paid-memberships-pro' ); ?>:</label>
432
  </th>
433
  <td>
434
- <?php if ( in_array( "billing_name", $read_only_fields ) && $order_id > 0 ) {
 
435
  echo $order->billing_name;
436
- } else { ?>
437
- <input id="billing_name" name="billing_name" type="text" size="50"
438
- value="<?php echo esc_attr( $order->billing->name ); ?>"/>
 
439
  <?php } ?>
440
  </td>
441
  </tr>
@@ -443,55 +461,65 @@ require_once( dirname( __FILE__ ) . "/admin_header.php" );
443
  <th scope="row" valign="top"><label for="billing_street"><?php _e( 'Billing Street', 'paid-memberships-pro' ); ?>
444
  :</label></th>
445
  <td>
446
- <?php if ( in_array( "billing_street", $read_only_fields ) && $order_id > 0 ) {
 
447
  echo $order->billing_street;
448
- } else { ?>
449
- <input id="billing_street" name="billing_street" type="text" size="50"
450
- value="<?php echo esc_attr( $order->billing->street ); ?>"/></td>
451
- <?php } ?>
 
452
  </tr>
453
  <tr>
454
  <th scope="row" valign="top"><label for="billing_city"><?php _e( 'Billing City', 'paid-memberships-pro' ); ?>:</label>
455
  </th>
456
  <td>
457
- <?php if ( in_array( "billing_city", $read_only_fields ) && $order_id > 0 ) {
 
458
  echo $order->billing_city;
459
- } else { ?>
460
- <input id="billing_city" name="billing_city" type="text" size="50"
461
- value="<?php echo esc_attr( $order->billing->city ); ?>"/></td>
462
- <?php } ?>
 
463
  </tr>
464
  <tr>
465
  <th scope="row" valign="top"><label for="billing_state"><?php _e( 'Billing State', 'paid-memberships-pro' ); ?>
466
  :</label></th>
467
  <td>
468
- <?php if ( in_array( "billing_state", $read_only_fields ) && $order_id > 0 ) {
 
469
  echo $order->billing_state;
470
- } else { ?>
471
- <input id="billing_state" name="billing_state" type="text" size="50"
472
- value="<?php echo esc_attr( $order->billing->state ); ?>"/></td>
473
- <?php } ?>
 
474
  </tr>
475
  <tr>
476
  <th scope="row" valign="top"><label for="billing_zip"><?php _e( 'Billing Postal Code', 'paid-memberships-pro' ); ?>
477
  :</label></th>
478
  <td>
479
- <?php if ( in_array( "billing_zip", $read_only_fields ) && $order_id > 0 ) {
 
480
  echo $order->billing_zip;
481
- } else { ?>
482
- <input id="billing_zip" name="billing_zip" type="text" size="50"
483
- value="<?php echo esc_attr( $order->billing->zip ); ?>"/></td>
484
- <?php } ?>
 
485
  </tr>
486
  <tr>
487
  <th scope="row" valign="top"><label for="billing_country"><?php _e( 'Billing Country', 'paid-memberships-pro' ); ?>
488
  :</label></th>
489
  <td>
490
- <?php if ( in_array( "billing_country", $read_only_fields ) && $order_id > 0 ) {
 
491
  echo $order->billing_country;
492
- } else { ?>
493
- <input id="billing_country" name="billing_country" type="text" size="50"
494
- value="<?php echo esc_attr( $order->billing->country ); ?>"/>
 
495
  <?php } ?>
496
  </td>
497
  </tr>
@@ -499,11 +527,13 @@ require_once( dirname( __FILE__ ) . "/admin_header.php" );
499
  <th scope="row" valign="top"><label for="billing_phone"><?php _e( 'Billing Phone', 'paid-memberships-pro' ); ?>
500
  :</label></th>
501
  <td>
502
- <?php if ( in_array( "billing_phone", $read_only_fields ) && $order_id > 0 ) {
 
503
  echo $order->billing_phone;
504
- } else { ?>
505
- <input id="billing_phone" name="billing_phone" type="text" size="50"
506
- value="<?php echo esc_attr( $order->billing->phone ); ?>"/>
 
507
  <?php } ?>
508
  </td>
509
  </tr>
@@ -511,22 +541,26 @@ require_once( dirname( __FILE__ ) . "/admin_header.php" );
511
  <tr>
512
  <th scope="row" valign="top"><label for="subtotal"><?php _e( 'Sub Total', 'paid-memberships-pro' ); ?>:</label></th>
513
  <td>
514
- <?php if ( in_array( "subtotal", $read_only_fields ) && $order_id > 0 ) {
 
515
  echo $order->subtotal;
516
- } else { ?>
517
- <input id="subtotal" name="subtotal" type="text" size="10"
518
- value="<?php echo esc_attr( $order->subtotal ); ?>"/>
 
519
  <?php } ?>
520
  </td>
521
  </tr>
522
  <tr>
523
  <th scope="row" valign="top"><label for="tax"><?php _e( 'Tax', 'paid-memberships-pro' ); ?>:</label></th>
524
  <td>
525
- <?php if ( in_array( "tax", $read_only_fields ) && $order_id > 0 ) {
 
526
  echo $order->tax;
527
- } else { ?>
528
- <input id="tax" name="tax" type="text" size="10"
529
- value="<?php echo esc_attr( $order->tax ); ?>"/>
 
530
  <?php } ?>
531
  </td>
532
  </tr>
@@ -534,22 +568,26 @@ require_once( dirname( __FILE__ ) . "/admin_header.php" );
534
  <th scope="row" valign="top"><label for="couponamount"><?php _e( 'Coupon Amount', 'paid-memberships-pro' ); ?>:</label>
535
  </th>
536
  <td>
537
- <?php if ( in_array( "couponamount", $read_only_fields ) && $order_id > 0 ) {
 
538
  echo $order->couponamount;
539
- } else { ?>
540
- <input id="couponamount" name="couponamount" type="text" size="10"
541
- value="<?php echo esc_attr( $order->couponamount ); ?>"/>
 
542
  <?php } ?>
543
  </td>
544
  </tr>
545
  <tr>
546
  <th scope="row" valign="top"><label for="total"><?php _e( 'Total', 'paid-memberships-pro' ); ?>:</label></th>
547
  <td>
548
- <?php if ( in_array( "total", $read_only_fields ) && $order_id > 0 ) {
 
549
  echo $order->total;
550
- } else { ?>
551
- <input id="total" name="total" type="text" size="10"
552
- value="<?php echo esc_attr( $order->total ); ?>"/>
 
553
  <?php } ?>
554
  <small
555
  class="pmpro_lite"><?php _e( 'Should be subtotal + tax - couponamount.', 'paid-memberships-pro' ); ?></small>
@@ -560,11 +598,13 @@ require_once( dirname( __FILE__ ) . "/admin_header.php" );
560
  <th scope="row" valign="top"><label for="payment_type"><?php _e( 'Payment Type', 'paid-memberships-pro' ); ?>:</label>
561
  </th>
562
  <td>
563
- <?php if ( in_array( "payment_type", $read_only_fields ) && $order_id > 0 ) {
 
564
  echo $order->payment_type;
565
- } else { ?>
566
- <input id="payment_type" name="payment_type" type="text" size="50"
567
- value="<?php echo esc_attr( $order->payment_type ); ?>"/>
 
568
  <?php } ?>
569
  <small
570
  class="pmpro_lite"><?php _e( 'e.g. PayPal Express, PayPal Standard, Credit Card.', 'paid-memberships-pro' ); ?></small>
@@ -573,11 +613,13 @@ require_once( dirname( __FILE__ ) . "/admin_header.php" );
573
  <tr>
574
  <th scope="row" valign="top"><label for="cardtype"><?php _e( 'Card Type', 'paid-memberships-pro' ); ?></label></th>
575
  <td>
576
- <?php if ( in_array( "cardtype", $read_only_fields ) && $order_id > 0 ) {
 
577
  echo $order->cardtype;
578
- } else { ?>
579
- <input id="cardtype" name="cardtype" type="text" size="50"
580
- value="<?php echo esc_attr( $order->cardtype ); ?>"/>
 
581
  <?php } ?>
582
  <small class="pmpro_lite"><?php _e( 'e.g. Visa, MasterCard, AMEX, etc', 'paid-memberships-pro' ); ?></small>
583
  </td>
@@ -586,33 +628,37 @@ require_once( dirname( __FILE__ ) . "/admin_header.php" );
586
  <th scope="row" valign="top"><label for="accountnumber"><?php _e( 'Account Number', 'paid-memberships-pro' ); ?>
587
  :</label></th>
588
  <td>
589
- <?php if ( in_array( "accountnumber", $read_only_fields ) && $order_id > 0 ) {
 
590
  echo $order->accountnumber;
591
- } else { ?>
592
- <input id="accountnumber" name="accountnumber" type="text" size="50"
593
- value="<?php echo esc_attr( $order->accountnumber ); ?>"/>
 
594
  <?php } ?>
595
  <small class="pmpro_lite"><?php _e( 'Obscure all but last 4 digits.', 'paid-memberships-pro' ); ?></small>
596
  </td>
597
  </tr>
598
- <?php if ( in_array( "ExpirationDate", $read_only_fields ) && $order_id > 0 ) {
 
599
  echo $order->ExpirationDate;
600
- } else { ?>
601
- <tr>
602
- <th scope="row" valign="top"><label
 
603
  for="expirationmonth"><?php _e( 'Expiration Month', 'paid-memberships-pro' ); ?>:</label></th>
604
  <td>
605
  <input id="expirationmonth" name="expirationmonth" type="text" size="10"
606
- value="<?php echo esc_attr( $order->expirationmonth ); ?>"/>
607
  <small class="pmpro_lite">MM</small>
608
  </td>
609
  </tr>
610
  <tr>
611
  <th scope="row" valign="top"><label for="expirationyear"><?php _e( 'Expiration Year', 'paid-memberships-pro' ); ?>
612
- :</label></th>
613
  <td>
614
  <input id="expirationyear" name="expirationyear" type="text" size="10"
615
- value="<?php echo esc_attr( $order->expirationyear ); ?>"/>
616
  <small class="pmpro_lite">YYYY</small>
617
  </td>
618
  </tr>
@@ -620,28 +666,30 @@ require_once( dirname( __FILE__ ) . "/admin_header.php" );
620
  <tr>
621
  <th scope="row" valign="top"><label for="status"><?php _e( 'Status', 'paid-memberships-pro' ); ?>:</label></th>
622
  <td>
623
- <?php if ( in_array( "status", $read_only_fields ) && $order_id > 0 ) {
 
624
  echo $order->status;
625
- } else { ?>
626
- <?php
627
- $statuses = array();
628
- $default_statuses = array(
629
- "",
630
- "success",
631
- "cancelled",
632
- "review",
633
- "token",
634
- "refunded",
635
- "pending",
636
- "error",
637
- );
638
- $used_statuses = $wpdb->get_col( "SELECT DISTINCT(status) FROM $wpdb->pmpro_membership_orders" );
639
- $statuses = array_unique( array_merge( $default_statuses, $used_statuses ) );
640
- asort( $statuses );
641
- $statuses = apply_filters( "pmpro_order_statuses", $statuses );
 
642
  ?>
643
  <select id="status" name="status">
644
- <?php foreach ( $statuses as $status ) { ?>
645
  <option
646
  value="<?php echo esc_attr( $status ); ?>" <?php selected( $order->status, $status ); ?>><?php echo $status; ?></option>
647
  <?php } ?>
@@ -653,35 +701,45 @@ require_once( dirname( __FILE__ ) . "/admin_header.php" );
653
  <tr>
654
  <th scope="row" valign="top"><label for="gateway"><?php _e( 'Gateway', 'paid-memberships-pro' ); ?>:</label></th>
655
  <td>
656
- <?php if ( in_array( "gateway", $read_only_fields ) && $order_id > 0 ) {
 
657
  echo $order->gateway;
658
- } else { ?>
659
- <select id="gateway" name="gateway" onchange="pmpro_changeGateway(jQuery(this).val());">
660
- <?php
661
- $pmpro_gateways = pmpro_gateways();
662
- foreach ( $pmpro_gateways as $pmpro_gateway_name => $pmpro_gateway_label ) {
663
- ?>
664
- <option
665
- value="<?php echo esc_attr( $pmpro_gateway_name ); ?>" <?php selected( $order->gateway, $pmpro_gateway_name ); ?>><?php echo $pmpro_gateway_label; ?></option>
 
666
  <?php
667
- }
668
- ?>
669
- </select>
670
- <?php } ?>
671
  </td>
672
  </tr>
673
  <tr>
674
  <th scope="row" valign="top"><label
675
  for="gateway_environment"><?php _e( 'Gateway Environment', 'paid-memberships-pro' ); ?>:</label></th>
676
  <td>
677
- <?php if ( in_array( "gateway_environment", $read_only_fields ) && $order_id > 0 ) {
 
678
  echo $order->gateway_environment;
679
- } else { ?>
680
- <select name="gateway_environment">
681
- <option value="sandbox"
682
- <?php if ( $order->gateway_environment == "sandbox" ) { ?>selected="selected"<?php } ?>><?php _e( 'Sandbox/Testing', 'paid-memberships-pro' ); ?></option>
 
 
 
 
683
  <option value="live"
684
- <?php if ( $order->gateway_environment == "live" ) { ?>selected="selected"<?php } ?>><?php _e( 'Live/Production', 'paid-memberships-pro' ); ?></option>
 
 
 
685
  </select>
686
  <?php } ?>
687
  </td>
@@ -691,11 +749,13 @@ require_once( dirname( __FILE__ ) . "/admin_header.php" );
691
  <th scope="row" valign="top"><label
692
  for="payment_transaction_id"><?php _e( 'Payment Transaction ID', 'paid-memberships-pro' ); ?>:</label></th>
693
  <td>
694
- <?php if ( in_array( "payment_transaction_id", $read_only_fields ) && $order_id > 0 ) {
 
695
  echo $order->payment_transaction_id;
696
- } else { ?>
697
- <input id="payment_transaction_id" name="payment_transaction_id" type="text" size="50"
698
- value="<?php echo esc_attr( $order->payment_transaction_id ); ?>"/>
 
699
  <?php } ?>
700
  <small
701
  class="pmpro_lite"><?php _e( 'Generated by the gateway. Useful to cross reference orders.', 'paid-memberships-pro' ); ?></small>
@@ -706,11 +766,13 @@ require_once( dirname( __FILE__ ) . "/admin_header.php" );
706
  for="subscription_transaction_id"><?php _e( 'Subscription Transaction ID', 'paid-memberships-pro' ); ?>
707
  :</label></th>
708
  <td>
709
- <?php if ( in_array( "subscription_transaction_id", $read_only_fields ) && $order_id > 0 ) {
 
710
  echo $order->subscription_transaction_id;
711
- } else { ?>
712
- <input id="subscription_transaction_id" name="subscription_transaction_id" type="text" size="50"
713
- value="<?php echo esc_attr( $order->subscription_transaction_id ); ?>"/>
 
714
  <?php } ?>
715
  <small
716
  class="pmpro_lite"><?php _e( 'Generated by the gateway. Useful to cross reference subscriptions.', 'paid-memberships-pro' ); ?></small>
@@ -720,26 +782,31 @@ require_once( dirname( __FILE__ ) . "/admin_header.php" );
720
  <tr>
721
  <th scope="row" valign="top"><label for="ts_month"><?php _e( 'Date', 'paid-memberships-pro' ); ?>:</label></th>
722
  <td>
723
- <?php if ( in_array( "timestamp", $read_only_fields ) && $order_id > 0 ) {
724
- echo date_i18n( get_option( 'date_format' ) . " " . get_option( 'time_format' ), $order->timestamp );
725
- } else { ?>
726
- <?php
727
- //set up date vars
728
- if ( ! empty( $order->timestamp ) ) {
729
- $timestamp = $order->timestamp;
730
- } else {
731
- $timestamp = current_time( 'timestamp' );
732
- }
733
- $year = date_i18n( "Y", $timestamp );
734
- $month = date_i18n( "n", $timestamp );
735
- $day = date_i18n( "j", $timestamp );
736
- ?>
737
- <select id="ts_month" name="ts_month">
 
 
738
  <?php
739
  for ( $i = 1; $i < 13; $i ++ ) {
740
  ?>
741
- <option value="<?php echo $i ?>"
742
- <?php if ( $i == $month ) { ?>selected="selected"<?php } ?>><?php echo date_i18n( "M", strtotime( $i . "/1/" . $year, current_time( "timestamp" ) ) ) ?></option>
 
 
 
743
  <?php
744
  }
745
  ?>
@@ -751,18 +818,20 @@ require_once( dirname( __FILE__ ) . "/admin_header.php" );
751
  </tr>
752
 
753
  <?php
754
- $affiliates = apply_filters( "pmpro_orders_show_affiliate_ids", false );
755
  if ( ! empty( $affiliates ) ) {
756
  ?>
757
  <tr>
758
  <th scope="row" valign="top"><label for="affiliate_id"><?php _e( 'Affiliate ID', 'paid-memberships-pro' ); ?>
759
  :</label></th>
760
  <td>
761
- <?php if ( in_array( "affiliate_id", $read_only_fields ) && $order_id > 0 ) {
 
762
  echo $order->affiliate_id;
763
- } else { ?>
764
- <input id="affiliate_id" name="affiliate_id" type="text" size="50"
765
- value="<?php echo esc_attr( $order->affiliate_id ); ?>"/>
 
766
  <?php } ?>
767
  </td>
768
  </tr>
@@ -770,11 +839,13 @@ require_once( dirname( __FILE__ ) . "/admin_header.php" );
770
  <th scope="row" valign="top"><label for="affiliate_subid"><?php _e( 'Affiliate SubID', 'paid-memberships-pro' ); ?>
771
  :</label></th>
772
  <td>
773
- <?php if ( in_array( "affiliate_subid", $read_only_fields ) && $order_id > 0 ) {
 
774
  echo $order->affiliate_subid;
775
- } else { ?>
776
- <input id="affiliate_subid" name="affiliate_subid" type="text" size="50"
777
- value="<?php echo esc_attr( $order->affiliate_subid ); ?>"/>
 
778
  <?php } ?>
779
  </td>
780
  </tr>
@@ -783,29 +854,35 @@ require_once( dirname( __FILE__ ) . "/admin_header.php" );
783
  <tr>
784
  <th scope="row" valign="top"><label for="notes"><?php _e( 'Notes', 'paid-memberships-pro' ); ?>:</label></th>
785
  <td>
786
- <?php if ( in_array( "notes", $read_only_fields ) && $order_id > 0 ) {
 
787
  echo $order->notes;
788
- } else { ?>
789
- <textarea id="notes" name="notes" rows="5"
790
- cols="80"><?php echo esc_textarea( $order->notes ); ?></textarea>
 
791
  <?php } ?>
792
  </td>
793
  </tr>
794
 
795
- <?php do_action( "pmpro_after_order_settings", $order ); ?>
796
 
797
  </tbody>
798
  </table>
799
 
800
  <p class="submit topborder">
801
- <input name="order" type="hidden" value="<?php if ( ! empty( $order->id ) ) {
 
 
802
  echo $order->id;
803
  } else {
804
  echo $order_id;
805
- } ?>"/>
 
 
806
  <input name="save" type="submit" class="button-primary" value="<?php _e( 'Save Order', 'paid-memberships-pro' ); ?>"/>
807
  <input name="cancel" type="button" class="cancel button-secondary" value="<?php _e( 'Cancel', 'paid-memberships-pro' ); ?>"
808
- onclick="location.href='<?php echo get_admin_url( null, '/admin.php?page=pmpro-orders' ) ?>';"/>
809
  </p>
810
 
811
  </form>
@@ -854,20 +931,20 @@ require_once( dirname( __FILE__ ) . "/admin_header.php" );
854
  class="add-new-h2">+ <?php _e( 'Add New Order', 'paid-memberships-pro' ); ?></a>
855
 
856
  <?php
857
- //build the export URL
858
  $export_url = admin_url( 'admin-ajax.php?action=orders_csv' );
859
  $url_params = array(
860
- "filter" => $filter,
861
- "s" => $s,
862
- "l" => $l,
863
- "start-month" => $start_month,
864
- "start-day" => $start_day,
865
- "start-year" => $start_year,
866
- "end-month" => $end_month,
867
- "end-day" => $end_day,
868
- "end-year" => $end_year,
869
- "predefined-date" => $predefined_date,
870
- "status" => $status
871
  );
872
  $export_url = add_query_arg( $url_params, $export_url );
873
  ?>
@@ -877,50 +954,54 @@ require_once( dirname( __FILE__ ) . "/admin_header.php" );
877
 
878
 
879
  <?php if ( ! empty( $pmpro_msg ) ) { ?>
880
- <div id="message" class="<?php if ( $pmpro_msgt == "success" ) {
881
- echo "updated fade";
 
 
882
  } else {
883
- echo "error";
884
- } ?>"><p><?php echo $pmpro_msg ?></p></div>
 
 
885
  <?php } ?>
886
 
887
 
888
  <ul class="subsubsub">
889
  <li>
890
- <?php _e( 'Show', 'paid-memberships-pro' ) ?>
891
  <select id="filter" name="filter">
892
- <option value="all" <?php selected( $filter, "all" ); ?>><?php _e( 'All', 'paid-memberships-pro' ); ?></option>
893
  <option
894
- value="within-a-date-range" <?php selected( $filter, "within-a-date-range" ); ?>><?php _e( 'Within a Date Range', 'paid-memberships-pro' ); ?></option>
895
  <option
896
- value="predefined-date-range" <?php selected( $filter, "predefined-date-range" ); ?>><?php _e( 'Predefined Date Range', 'paid-memberships-pro' ); ?></option>
897
  <option
898
- value="within-a-level" <?php selected( $filter, "within-a-level" ); ?>><?php _e( 'Within a Level', 'paid-memberships-pro' ); ?></option>
899
  <option
900
- value="within-a-status" <?php selected( $filter, "within-a-status" ); ?>><?php _e( 'Within a Status', 'paid-memberships-pro' ); ?></option>
901
  </select>
902
 
903
- <span id="from"><?php _e( 'From', 'paid-memberships-pro' ) ?></span>
904
 
905
  <select id="start-month" name="start-month">
906
  <?php for ( $i = 1; $i < 13; $i ++ ) { ?>
907
  <option
908
- value="<?php echo $i; ?>" <?php selected( $start_month, $i ); ?>><?php echo date_i18n( "F", mktime( 0, 0, 0, $i, 2 ) ); ?></option>
909
  <?php } ?>
910
  </select>
911
 
912
  <input id='start-day' name="start-day" type="text" size="2"
913
- value="<?php echo esc_attr( $start_day ); ?>"/>
914
  <input id='start-year' name="start-year" type="text" size="4"
915
- value="<?php echo esc_attr( $start_year ); ?>"/>
916
 
917
 
918
- <span id="to"><?php _e( 'To', 'paid-memberships-pro' ) ?></span>
919
 
920
  <select id="end-month" name="end-month">
921
  <?php for ( $i = 1; $i < 13; $i ++ ) { ?>
922
  <option
923
- value="<?php echo $i; ?>" <?php selected( $end_month, $i ); ?>><?php echo date_i18n( "F", mktime( 0, 0, 0, $i, 2 ) ); ?></option>
924
  <?php } ?>
925
  </select>
926
 
@@ -928,23 +1009,23 @@ require_once( dirname( __FILE__ ) . "/admin_header.php" );
928
  <input id='end-day' name="end-day" type="text" size="2" value="<?php echo esc_attr( $end_day ); ?>"/>
929
  <input id='end-year' name="end-year" type="text" size="4" value="<?php echo esc_attr( $end_year ); ?>"/>
930
 
931
- <span id="filterby"><?php _e( 'filter by ', 'paid-memberships-pro' ) ?></span>
932
 
933
  <select id="predefined-date" name="predefined-date">
934
 
935
  <option
936
- value="<?php echo "This Month"; ?>" <?php selected( $predefined_date, "This Month" ); ?>><?php echo "This Month"; ?></option>
937
  <option
938
- value="<?php echo "Last Month"; ?>" <?php selected( $predefined_date, "Last Month" ); ?>><?php echo "Last Month"; ?></option>
939
  <option
940
- value="<?php echo "This Year"; ?>" <?php selected( $predefined_date, "This Year" ); ?>><?php echo "This Year"; ?></option>
941
  <option
942
- value="<?php echo "Last Year"; ?>" <?php selected( $predefined_date, "Last Year" ); ?>><?php echo "Last Year"; ?></option>
943
 
944
  </select>
945
 
946
  <?php
947
- //Note: only orders belonging to current levels can be filtered. There is no option for orders belonging to deleted levels
948
  $levels = pmpro_getAllLevels( true, true );
949
  ?>
950
  <select id="l" name="l">
@@ -955,7 +1036,7 @@ require_once( dirname( __FILE__ ) . "/admin_header.php" );
955
 
956
  </select>
957
 
958
- <?php
959
  $statuses = pmpro_getOrderStatuses();
960
  ?>
961
  <select id="status" name="status">
@@ -1070,67 +1151,67 @@ require_once( dirname( __FILE__ ) . "/admin_header.php" );
1070
  </p>
1071
 
1072
  <?php
1073
- //string search
1074
  if ( $s ) {
1075
  $sqlQuery = "SELECT SQL_CALC_FOUND_ROWS o.id FROM $wpdb->pmpro_membership_orders o LEFT JOIN $wpdb->users u ON o.user_id = u.ID LEFT JOIN $wpdb->pmpro_membership_levels l ON o.membership_id = l.id ";
1076
 
1077
- $join_with_usermeta = apply_filters( "pmpro_orders_search_usermeta", false );
1078
  if ( $join_with_usermeta ) {
1079
  $sqlQuery .= "LEFT JOIN $wpdb->usermeta um ON o.user_id = um.user_id ";
1080
  }
1081
 
1082
- $sqlQuery .= "WHERE (1=2 ";
1083
 
1084
  $fields = array(
1085
- "o.id",
1086
- "o.code",
1087
- "o.billing_name",
1088
- "o.billing_street",
1089
- "o.billing_city",
1090
- "o.billing_state",
1091
- "o.billing_zip",
1092
- "o.billing_phone",
1093
- "o.payment_type",
1094
- "o.cardtype",
1095
- "o.accountnumber",
1096
- "o.status",
1097
- "o.gateway",
1098
- "o.gateway_environment",
1099
- "o.payment_transaction_id",
1100
- "o.subscription_transaction_id",
1101
- "u.user_login",
1102
- "u.user_email",
1103
- "u.display_name",
1104
- "l.name"
1105
  );
1106
 
1107
  if ( $join_with_usermeta ) {
1108
- $fields[] = "um.meta_value";
1109
  }
1110
 
1111
- $fields = apply_filters( "pmpro_orders_search_fields", $fields );
1112
 
1113
  foreach ( $fields as $field ) {
1114
- $sqlQuery .= " OR " . $field . " LIKE '%" . esc_sql( $s ) . "%' ";
1115
  }
1116
- $sqlQuery .= ") ";
1117
 
1118
- $sqlQuery .= "AND " . $condition . " ";
1119
 
1120
- $sqlQuery .= "GROUP BY o.id ORDER BY o.id DESC, o.timestamp DESC ";
1121
  } else {
1122
- $sqlQuery = "SELECT SQL_CALC_FOUND_ROWS id FROM $wpdb->pmpro_membership_orders WHERE " . $condition . " ORDER BY id DESC, timestamp DESC ";
1123
  }
1124
 
1125
  $sqlQuery .= "LIMIT $start, $limit";
1126
 
1127
  $order_ids = $wpdb->get_col( $sqlQuery );
1128
 
1129
- $totalrows = $wpdb->get_var( "SELECT FOUND_ROWS() as found_rows" );
1130
 
1131
  if ( $order_ids ) {
1132
  ?>
1133
- <p class="clear"><?php printf( __( "%d orders found.", 'paid-memberships-pro' ), $totalrows ); ?></span></p>
1134
  <?php
1135
  }
1136
  ?>
@@ -1140,7 +1221,7 @@ require_once( dirname( __FILE__ ) . "/admin_header.php" );
1140
  <th><?php _e( 'ID', 'paid-memberships-pro' ); ?></th>
1141
  <th><?php _e( 'Code', 'paid-memberships-pro' ); ?></th>
1142
  <th><?php _e( 'User', 'paid-memberships-pro' ); ?></th>
1143
- <?php do_action( "pmpro_orders_extra_cols_header", $order_ids ); ?>
1144
  <th><?php _e( 'Membership Level', 'paid-memberships-pro' ); ?></th>
1145
  <th><?php _e( 'Total', 'paid-memberships-pro' ); ?></th>
1146
  <th><?php _e( 'Payment', 'paid-memberships-pro' ); ?></th>
@@ -1163,19 +1244,25 @@ require_once( dirname( __FILE__ ) . "/admin_header.php" );
1163
  $order->nogateway = true;
1164
  $order->getMemberOrderByID( $order_id );
1165
  ?>
1166
- <tr <?php if ( $count ++ % 2 == 0 ) { ?>class="alternate"<?php } ?>>
 
 
 
 
1167
  <td>
1168
- <a href="admin.php?page=pmpro-orders&order=<?php echo $order->id ?>"><?php echo $order->id; ?></a>
1169
  </td>
1170
  <td>
1171
- <a href="admin.php?page=pmpro-orders&order=<?php echo $order->id ?>"><?php echo $order->code; ?></a>
1172
  </td>
1173
  <td class="username column-username">
1174
  <?php $order->getUser(); ?>
1175
  <?php if ( ! empty( $order->user ) ) { ?>
1176
- <a href="user-edit.php?user_id=<?php echo $order->user->ID ?>"><?php echo $order->user->user_login ?></a>
1177
- <?php } else { ?>
1178
  [<?php _e( 'deleted', 'paid-memberships-pro' ); ?>]
 
 
1179
  <?php } ?>
1180
  <br/>
1181
  <?php
@@ -1195,13 +1282,15 @@ require_once( dirname( __FILE__ ) . "/admin_header.php" );
1195
  }
1196
  ?>
1197
  </td>
1198
- <?php do_action( "pmpro_orders_extra_cols_body", $order ); ?>
1199
  <td><?php echo $order->membership_id; ?></td>
1200
  <td><?php echo pmpro_formatPrice( $order->total ); ?></td>
1201
  <td>
1202
- <?php if ( ! empty( $order->payment_type ) ) {
1203
- echo $order->payment_type . "<br />";
1204
- } ?>
 
 
1205
  <?php if ( ! empty( $order->accountnumber ) ) { ?>
1206
  <?php echo $order->cardtype; ?>: x<?php echo last4( $order->accountnumber ); ?><br/>
1207
  <?php } ?>
@@ -1211,30 +1300,46 @@ require_once( dirname( __FILE__ ) . "/admin_header.php" );
1211
  <?php if ( ! empty( $order->billing->street ) ) { ?>
1212
  <?php echo $order->billing->street; ?><br/>
1213
  <?php if ( $order->billing->city && $order->billing->state ) { ?>
1214
- <?php echo $order->billing->city ?>, <?php echo $order->billing->state ?><?php echo $order->billing->zip ?><?php if ( ! empty( $order->billing->country ) )
1215
- echo $order->billing->country ?><br/>
 
 
 
 
1216
  <?php } ?>
1217
  <?php } ?>
1218
- <?php if ( ! empty( $order->billing->phone ) ) {
 
1219
  echo formatPhone( $order->billing->phone );
1220
- } ?>
 
1221
  </td>
1222
- <td><?php echo $order->gateway; ?><?php if ( $order->gateway_environment == "test" ) {
1223
- echo "(test)";
1224
- } ?></td>
 
 
 
 
1225
  <td>
1226
- <?php _e( 'Payment', 'paid-memberships-pro' ); ?>: <?php if ( ! empty( $order->payment_transaction_id ) ) {
1227
- echo $order->payment_transaction_id;
1228
- } else {
1229
- echo "N/A";
1230
- } ?>
 
 
 
1231
  <br/>
1232
  <?php _e( 'Subscription', 'paid-memberships-pro' ); ?>
1233
- : <?php if ( ! empty( $order->subscription_transaction_id ) ) {
 
 
1234
  echo $order->subscription_transaction_id;
1235
  } else {
1236
- echo "N/A";
1237
- } ?>
 
1238
  </td>
1239
  <td><?php echo $order->status; ?></td>
1240
  <td>
@@ -1248,7 +1353,7 @@ require_once( dirname( __FILE__ ) . "/admin_header.php" );
1248
  <a href="admin.php?page=pmpro-orders&order=-1&copy=<?php echo $order->id; ?>"><?php _e( 'copy', 'paid-memberships-pro' ); ?></a>
1249
  </td>
1250
  <td align="center">
1251
- <a href="javascript:askfirst('<?php echo str_replace( "'", "\'", sprintf( __( "Deleting orders is permanent and can affect active users. Are you sure you want to delete order %s?", 'paid-memberships-pro' ), str_replace( "'", "", $order->code ) ) ); ?>', 'admin.php?page=pmpro-orders&delete=<?php echo $order->id; ?>'); void(0);"><?php _e( 'delete', 'paid-memberships-pro' ); ?></a>
1252
  </td>
1253
  <td align="center">
1254
  <a href="admin-ajax.php?action=pmpro_orders_print_view&order=<?php echo $order->id; ?>"
@@ -1274,12 +1379,11 @@ require_once( dirname( __FILE__ ) . "/admin_header.php" );
1274
  </table>
1275
  </form>
1276
  <?php
1277
- //add normal args
1278
- $pagination_url = add_query_arg( $url_params, get_admin_url( null, "/admin.php?page=pmpro-orders" ) );
1279
  echo pmpro_getPaginationString( $pn, $totalrows, $limit, 1, $pagination_url, "&limit=$limit&pn=" );
1280
  ?>
1281
 
1282
  <?php } ?>
1283
  <?php
1284
- require_once( dirname( __FILE__ ) . "/admin_footer.php" );
1285
- ?>
1
  <?php
2
+ // only admins can get this
3
+ if ( ! function_exists( 'current_user_can' ) || ( ! current_user_can( 'manage_options' ) && ! current_user_can( 'pmpro_orders' ) ) ) {
4
+ die( __( 'You do not have permissions to perform this action.', 'paid-memberships-pro' ) );
5
  }
6
 
7
+ // vars
8
  global $wpdb;
9
  if ( isset( $_REQUEST['s'] ) ) {
10
  $s = sanitize_text_field( trim( $_REQUEST['s'] ) );
11
  } else {
12
+ $s = '';
13
  }
14
 
15
  if ( isset( $_REQUEST['l'] ) ) {
21
  if ( isset( $_REQUEST['start-month'] ) ) {
22
  $start_month = intval( $_REQUEST['start-month'] );
23
  } else {
24
+ $start_month = '1';
25
  }
26
 
27
  if ( isset( $_REQUEST['start-day'] ) ) {
28
  $start_day = intval( $_REQUEST['start-day'] );
29
  } else {
30
+ $start_day = '1';
31
  }
32
 
33
  if ( isset( $_REQUEST['start-year'] ) ) {
34
  $start_year = intval( $_REQUEST['start-year'] );
35
  } else {
36
+ $start_year = date_i18n( 'Y' );
37
  }
38
 
39
  if ( isset( $_REQUEST['end-month'] ) ) {
40
  $end_month = intval( $_REQUEST['end-month'] );
41
  } else {
42
+ $end_month = date_i18n( 'n' );
43
  }
44
 
45
  if ( isset( $_REQUEST['end-day'] ) ) {
46
  $end_day = intval( $_REQUEST['end-day'] );
47
  } else {
48
+ $end_day = date_i18n( 'j' );
49
  }
50
 
51
  if ( isset( $_REQUEST['end-year'] ) ) {
52
  $end_year = intval( $_REQUEST['end-year'] );
53
  } else {
54
+ $end_year = date_i18n( 'Y' );
55
  }
56
 
57
  if ( isset( $_REQUEST['predefined-date'] ) ) {
58
  $predefined_date = sanitize_text_field( $_REQUEST['predefined-date'] );
59
  } else {
60
+ $predefined_date = 'This Month';
61
  }
62
 
63
  if ( isset( $_REQUEST['status'] ) ) {
64
  $status = sanitize_text_field( $_REQUEST['status'] );
65
  } else {
66
+ $status = '';
67
  }
68
 
69
  if ( isset( $_REQUEST['filter'] ) ) {
70
  $filter = sanitize_text_field( $_REQUEST['filter'] );
71
  } else {
72
+ $filter = 'all';
73
  }
74
 
75
+ // some vars for the search
76
  if ( isset( $_REQUEST['pn'] ) ) {
77
  $pn = intval( $_REQUEST['pn'] );
78
  } else {
96
  $end = $pn * $limit;
97
  $start = $end - $limit;
98
 
99
+ // filters
100
+ if ( empty( $filter ) || $filter === 'all' ) {
101
+ $condition = '1=1';
102
+ $filter = 'all';
103
+ } elseif ( $filter == 'within-a-date-range' ) {
104
+ $start_date = $start_year . '-' . $start_month . '-' . $start_day;
105
+ $end_date = $end_year . '-' . $end_month . '-' . $end_day;
106
 
107
+ // add times to dates
108
+ $start_date = $start_date . ' 00:00:00';
109
+ $end_date = $end_date . ' 23:59:59';
110
 
111
  $condition = "timestamp BETWEEN '" . esc_sql( $start_date ) . "' AND '" . esc_sql( $end_date ) . "'";
112
+ } elseif ( $filter == 'predefined-date-range' ) {
113
+ if ( $predefined_date == 'Last Month' ) {
114
+ $start_date = date_i18n( 'Y-m-d', strtotime( 'first day of last month', current_time( 'timestamp' ) ) );
115
+ $end_date = date_i18n( 'Y-m-d', strtotime( 'last day of last month', current_time( 'timestamp' ) ) );
116
+ } elseif ( $predefined_date == 'This Month' ) {
117
+ $start_date = date_i18n( 'Y-m-d', strtotime( 'first day of this month', current_time( 'timestamp' ) ) );
118
+ $end_date = date_i18n( 'Y-m-d', strtotime( 'last day of this month', current_time( 'timestamp' ) ) );
119
+ } elseif ( $predefined_date == 'This Year' ) {
120
  $year = date_i18n( 'Y' );
121
+ $start_date = date_i18n( 'Y-m-d', strtotime( "first day of January $year", current_time( 'timestamp' ) ) );
122
+ $end_date = date_i18n( 'Y-m-d', strtotime( "last day of December $year", current_time( 'timestamp' ) ) );
123
+ } elseif ( $predefined_date == 'Last Year' ) {
124
  $year = date_i18n( 'Y' ) - 1;
125
+ $start_date = date_i18n( 'Y-m-d', strtotime( "first day of January $year", current_time( 'timestamp' ) ) );
126
+ $end_date = date_i18n( 'Y-m-d', strtotime( "last day of December $year", current_time( 'timestamp' ) ) );
127
  }
128
 
129
+ // add times to dates
130
+ $start_date = $start_date . ' 00:00:00';
131
+ $end_date = $end_date . ' 23:59:59';
132
 
133
  $condition = "timestamp BETWEEN '" . esc_sql( $start_date ) . "' AND '" . esc_sql( $end_date ) . "'";
134
+ } elseif ( $filter == 'within-a-level' ) {
135
+ $condition = 'membership_id = ' . esc_sql( $l );
136
+ } elseif ( $filter == 'within-a-status' ) {
137
  $condition = "status = '" . esc_sql( $status ) . "' ";
138
  }
139
 
140
+ // emailing?
141
  if ( ! empty( $_REQUEST['email'] ) && ! empty( $_REQUEST['order'] ) ) {
142
  $email = new PMProEmail();
143
+ $user = get_user_by( 'email', sanitize_email( $_REQUEST['email'] ) );
144
  $order = new MemberOrder( $_REQUEST['order'] );
145
  if ( $email->sendBillableInvoiceEmail( $user, $order ) ) {
146
+ $pmpro_msg = __( 'Invoice emailed successfully.', 'paid-memberships-pro' );
147
+ $pmpro_msgt = 'success';
148
  } else {
149
+ $pmpro_msg = __( 'Error emailing invoice.', 'paid-memberships-pro' );
150
+ $pmpro_msgt = 'error';
151
  }
152
 
153
+ // clean up so we stay on the orders list view
154
  unset( $_REQUEST['order'] );
155
  $order = null;
156
  }
157
 
158
+ // deleting?
159
  if ( ! empty( $_REQUEST['delete'] ) ) {
160
  $dorder = new MemberOrder( intval( $_REQUEST['delete'] ) );
161
  if ( $dorder->deleteMe() ) {
162
+ $pmpro_msg = __( 'Order deleted successfully.', 'paid-memberships-pro' );
163
+ $pmpro_msgt = 'success';
164
  } else {
165
+ $pmpro_msg = __( 'Error deleting order.', 'paid-memberships-pro' );
166
+ $pmpro_msgt = 'error';
167
  }
168
  }
169
 
170
+ $thisyear = date_i18n( 'Y' );
171
 
172
+ // this array stores fields that should be read only
173
+ $read_only_fields = apply_filters(
174
+ 'pmpro_orders_read_only_fields', array(
175
+ 'code',
176
+ 'payment_transaction_id',
177
+ 'subscription_transaction_id',
178
+ )
179
+ );
180
 
181
+ // if this is a new order or copy of one, let's make all fields editable
182
+ if ( ! empty( $_REQUEST['order'] ) && $_REQUEST['order'] < 0 ) {
183
  $read_only_fields = array();
184
  }
185
 
186
+ // saving?
187
  if ( ! empty( $_REQUEST['save'] ) ) {
188
+ // start with old order if applicable
189
  $order_id = intval( $_REQUEST['order'] );
190
  if ( $order_id > 0 ) {
191
  $order = new MemberOrder( $order_id );
194
  $order->billing = new stdClass();
195
  }
196
 
197
+ // update values
198
+ if ( ! in_array( 'code', $read_only_fields ) && isset( $_POST['code'] ) ) {
199
  $order->code = sanitize_text_field( $_POST['code'] );
200
  }
201
+ if ( ! in_array( 'user_id', $read_only_fields ) && isset( $_POST['user_id'] ) ) {
202
  $order->user_id = intval( $_POST['user_id'] );
203
  }
204
+ if ( ! in_array( 'membership_id', $read_only_fields ) && isset( $_POST['membership_id'] ) ) {
205
  $order->membership_id = intval( $_POST['membership_id'] );
206
  }
207
+ if ( ! in_array( 'billing_name', $read_only_fields ) && isset( $_POST['billing_name'] ) ) {
208
+ $order->billing->name = sanitize_text_field( wp_unslash( $_POST['billing_name'] ) );
209
  }
210
+ if ( ! in_array( 'billing_street', $read_only_fields ) && isset( $_POST['billing_street'] ) ) {
211
+ $order->billing->street = sanitize_text_field( wp_unslash( $_POST['billing_street'] ) );
212
  }
213
+ if ( ! in_array( 'billing_city', $read_only_fields ) && isset( $_POST['billing_city'] ) ) {
214
+ $order->billing->city = sanitize_text_field( wp_unslash( $_POST['billing_city'] ) );
215
  }
216
+ if ( ! in_array( 'billing_state', $read_only_fields ) && isset( $_POST['billing_state'] ) ) {
217
+ $order->billing->state = sanitize_text_field( wp_unslash( $_POST['billing_state'] ) );
218
  }
219
+ if ( ! in_array( 'billing_zip', $read_only_fields ) && isset( $_POST['billing_zip'] ) ) {
220
  $order->billing->zip = sanitize_text_field( $_POST['billing_zip'] );
221
  }
222
+ if ( ! in_array( 'billing_country', $read_only_fields ) && isset( $_POST['billing_country'] ) ) {
223
+ $order->billing->country = sanitize_text_field( wp_unslash( $_POST['billing_country'] ) );
224
  }
225
+ if ( ! in_array( 'billing_phone', $read_only_fields ) && isset( $_POST['billing_phone'] ) ) {
226
  $order->billing->phone = sanitize_text_field( $_POST['billing_phone'] );
227
  }
228
+ if ( ! in_array( 'subtotal', $read_only_fields ) && isset( $_POST['subtotal'] ) ) {
229
  $order->subtotal = sanitize_text_field( $_POST['subtotal'] );
230
  }
231
+ if ( ! in_array( 'tax', $read_only_fields ) && isset( $_POST['tax'] ) ) {
232
  $order->tax = sanitize_text_field( $_POST['tax'] );
233
  }
234
+ if ( ! in_array( 'couponamount', $read_only_fields ) && isset( $_POST['couponamount'] ) ) {
235
  $order->couponamount = sanitize_text_field( $_POST['couponamount'] );
236
  }
237
+ if ( ! in_array( 'total', $read_only_fields ) && isset( $_POST['total'] ) ) {
238
  $order->total = sanitize_text_field( $_POST['total'] );
239
  }
240
+ if ( ! in_array( 'payment_type', $read_only_fields ) && isset( $_POST['payment_type'] ) ) {
241
  $order->payment_type = sanitize_text_field( $_POST['payment_type'] );
242
  }
243
+ if ( ! in_array( 'cardtype', $read_only_fields ) && isset( $_POST['cardtype'] ) ) {
244
  $order->cardtype = sanitize_text_field( $_POST['cardtype'] );
245
  }
246
+ if ( ! in_array( 'accountnumber', $read_only_fields ) && isset( $_POST['accountnumber'] ) ) {
247
  $order->accountnumber = sanitize_text_field( $_POST['accountnumber'] );
248
  }
249
+ if ( ! in_array( 'expirationmonth', $read_only_fields ) && isset( $_POST['expirationmonth'] ) ) {
250
  $order->expirationmonth = sanitize_text_field( $_POST['expirationmonth'] );
251
  }
252
+ if ( ! in_array( 'expirationyear', $read_only_fields ) && isset( $_POST['expirationyear'] ) ) {
253
  $order->expirationyear = sanitize_text_field( $_POST['expirationyear'] );
254
  }
255
+
256
+ if ( ! in_array( 'status', $read_only_fields ) && isset( $_POST['status'] ) ) {
257
  $order->status = pmpro_sanitize_with_safelist( $_POST['status'], pmpro_getOrderStatuses() );
258
  }
259
+ if ( ! in_array( 'gateway', $read_only_fields ) && isset( $_POST['gateway'] ) ) {
260
  $order->gateway = sanitize_text_field( $_POST['gateway'] );
261
  }
262
+ if ( ! in_array( 'gateway_environment', $read_only_fields ) && isset( $_POST['gateway_environment'] ) ) {
263
  $order->gateway_environment = sanitize_text_field( $_POST['gateway_environment'] );
264
  }
265
+ if ( ! in_array( 'payment_transaction_id', $read_only_fields ) && isset( $_POST['payment_transaction_id'] ) ) {
266
  $order->payment_transaction_id = sanitize_text_field( $_POST['payment_transaction_id'] );
267
  }
268
+ if ( ! in_array( 'subscription_transaction_id', $read_only_fields ) && isset( $_POST['subscription_transaction_id'] ) ) {
269
  $order->subscription_transaction_id = sanitize_text_field( $_POST['subscription_transaction_id'] );
270
  }
271
+ if ( ! in_array( 'notes', $read_only_fields ) && isset( $_POST['notes'] ) ) {
272
  global $allowedposttags;
273
+ $order->notes = wp_kses( wp_unslash( $_REQUEST['notes'] ), $allowedposttags );
274
  }
275
 
276
+ // affiliate stuff
277
+ $affiliates = apply_filters( 'pmpro_orders_show_affiliate_ids', false );
278
  if ( ! empty( $affiliates ) ) {
279
+ if ( ! in_array( 'affiliate_id', $read_only_fields ) ) {
280
  $order->affiliate_id = sanitize_text_field( $_POST['affiliate_id'] );
281
  }
282
+ if ( ! in_array( 'affiliate_subid', $read_only_fields ) ) {
283
  $order->affiliate_subid = sanitize_text_field( $_POST['affiliate_subid'] );
284
  }
285
  }
286
 
287
+ // check nonce for saving
288
  $nonceokay = true;
289
+ if ( empty( $_REQUEST['pmpro_orders_nonce'] ) || ! check_admin_referer( 'save', 'pmpro_orders_nonce' ) ) {
290
  $nonceokay = false;
291
  }
292
+
293
+ // save
294
+ if ( $order->saveOrder() !== false && $nonceokay ) {
295
+ // handle timestamp
296
+ if ( $order->updateTimestamp( intval( $_POST['ts_year'] ), intval( $_POST['ts_month'] ), intval( $_POST['ts_day'] ) ) !== false ) {
297
+ $pmpro_msg = __( 'Order saved successfully.', 'paid-memberships-pro' );
298
+ $pmpro_msgt = 'success';
299
  } else {
300
+ $pmpro_msg = __( 'Error updating order timestamp.', 'paid-memberships-pro' );
301
+ $pmpro_msgt = 'error';
302
  }
303
  } else {
304
+ $pmpro_msg = __( 'Error saving order.', 'paid-memberships-pro' );
305
+ $pmpro_msgt = 'error';
306
  }
307
  } else {
308
+ // order passed?
309
  if ( ! empty( $_REQUEST['order'] ) ) {
310
  $order_id = intval( $_REQUEST['order'] );
311
  if ( $order_id > 0 ) {
313
  } elseif ( ! empty( $_REQUEST['copy'] ) ) {
314
  $order = new MemberOrder( intval( $_REQUEST['copy'] ) );
315
 
316
+ // new id
317
  $order->id = null;
318
 
319
+ // new code
320
  $order->code = $order->getRandomCode();
321
  } else {
322
+ $order = new MemberOrder(); // new order
323
 
324
+ // defaults
325
  $order->code = $order->getRandomCode();
326
+ $order->user_id = '';
327
+ $order->membership_id = '';
328
  $order->billing = new stdClass();
329
+ $order->billing->name = '';
330
+ $order->billing->street = '';
331
+ $order->billing->city = '';
332
+ $order->billing->state = '';
333
+ $order->billing->zip = '';
334
+ $order->billing->country = '';
335
+ $order->billing->phone = '';
336
+ $order->subtotal = '';
337
+ $order->tax = '';
338
+ $order->couponamount = '';
339
+ $order->total = '';
340
+ $order->payment_type = '';
341
+ $order->cardtype = '';
342
+ $order->accountnumber = '';
343
+ $order->expirationmonth = '';
344
+ $order->expirationyear = '';
345
+ $order->status = 'success';
346
+ $order->gateway = pmpro_getOption( 'gateway' );
347
+ $order->gateway_environment = pmpro_getOption( 'gateway_environment' );
348
+ $order->payment_transaction_id = '';
349
+ $order->subscription_transaction_id = '';
350
+ $order->affiliate_id = '';
351
+ $order->affiliate_subid = '';
352
+ $order->notes = '';
353
  }
354
  }
355
  }
356
 
357
+ require_once( dirname( __FILE__ ) . '/admin_header.php' );
358
  ?>
359
 
360
  <?php if ( ! empty( $order ) ) { ?>
361
 
362
  <h2>
363
  <?php if ( ! empty( $order->id ) ) { ?>
364
+ <?php _e( 'Order', 'paid-memberships-pro' ); ?> #<?php echo $order->id; ?>: <?php echo $order->code; ?>
365
  <?php } else { ?>
366
  <?php _e( 'New Order', 'paid-memberships-pro' ); ?>
367
  <?php } ?>
368
  </h2>
369
 
370
  <?php if ( ! empty( $pmpro_msg ) ) { ?>
371
+ <div id="message" class="
372
+ <?php
373
+ if ( $pmpro_msgt == 'success' ) {
374
+ echo 'updated fade';
375
  } else {
376
+ echo 'error';
377
+ }
378
+ ?>
379
+ "><p><?php echo $pmpro_msg; ?></p></div>
380
  <?php } ?>
381
 
382
  <form method="post" action="">
383
+ <?php wp_nonce_field( 'save', 'pmpro_orders_nonce' ); ?>
384
 
385
  <table class="form-table">
386
  <tbody>
387
  <tr>
388
  <th scope="row" valign="top"><label>ID:</label></th>
389
+ <td>
390
+ <?php
391
+ if ( ! empty( $order->id ) ) {
392
  echo $order->id;
393
+ } else {
394
+ echo __( 'This will be generated when you save.', 'paid-memberships-pro' );
395
+ }
396
+ ?>
397
+ </td>
398
  </tr>
399
 
400
  <tr>
401
  <th scope="row" valign="top"><label for="code"><?php _e( 'Code', 'paid-memberships-pro' ); ?>:</label></th>
402
  <td>
403
+ <?php
404
+ if ( in_array( 'code', $read_only_fields ) ) {
405
  echo $order->code;
406
+ } else {
407
+ ?>
408
+ <input id="code" name="code" type="text" size="50"
409
+ value="<?php echo esc_attr( $order->code ); ?>"/>
410
  <?php } ?>
411
  <?php if ( $order_id < 0 ) { ?>
412
  <small
417
  <tr>
418
  <th scope="row" valign="top"><label for="user_id"><?php _e( 'User ID', 'paid-memberships-pro' ); ?>:</label></th>
419
  <td>
420
+ <?php
421
+ if ( in_array( 'user_id', $read_only_fields ) && $order_id > 0 ) {
422
  echo $order->user_id;
423
+ } else {
424
+ ?>
425
+ <input id="user_id" name="user_id" type="text" size="50"
426
+ value="<?php echo esc_attr( $order->user_id ); ?>"/>
427
  <?php } ?>
428
  </td>
429
  </tr>
432
  <th scope="row" valign="top"><label for="membership_id"><?php _e( 'Membership Level ID', 'paid-memberships-pro' ); ?>
433
  :</label></th>
434
  <td>
435
+ <?php
436
+ if ( in_array( 'membership_id', $read_only_fields ) && $order_id > 0 ) {
437
  echo $order->membership_id;
438
+ } else {
439
+ ?>
440
+ <input id="membership_id" name="membership_id" type="text" size="50"
441
+ value="<?php echo esc_attr( $order->membership_id ); ?>"/>
442
  <?php } ?>
443
  </td>
444
  </tr>
447
  <th scope="row" valign="top"><label for="billing_name"><?php _e( 'Billing Name', 'paid-memberships-pro' ); ?>:</label>
448
  </th>
449
  <td>
450
+ <?php
451
+ if ( in_array( 'billing_name', $read_only_fields ) && $order_id > 0 ) {
452
  echo $order->billing_name;
453
+ } else {
454
+ ?>
455
+ <input id="billing_name" name="billing_name" type="text" size="50"
456
+ value="<?php echo esc_attr( $order->billing->name ); ?>"/>
457
  <?php } ?>
458
  </td>
459
  </tr>
461
  <th scope="row" valign="top"><label for="billing_street"><?php _e( 'Billing Street', 'paid-memberships-pro' ); ?>
462
  :</label></th>
463
  <td>
464
+ <?php
465
+ if ( in_array( 'billing_street', $read_only_fields ) && $order_id > 0 ) {
466
  echo $order->billing_street;
467
+ } else {
468
+ ?>
469
+ <input id="billing_street" name="billing_street" type="text" size="50"
470
+ value="<?php echo esc_attr( $order->billing->street ); ?>"/></td>
471
+ <?php } ?>
472
  </tr>
473
  <tr>
474
  <th scope="row" valign="top"><label for="billing_city"><?php _e( 'Billing City', 'paid-memberships-pro' ); ?>:</label>
475
  </th>
476
  <td>
477
+ <?php
478
+ if ( in_array( 'billing_city', $read_only_fields ) && $order_id > 0 ) {
479
  echo $order->billing_city;
480
+ } else {
481
+ ?>
482
+ <input id="billing_city" name="billing_city" type="text" size="50"
483
+ value="<?php echo esc_attr( $order->billing->city ); ?>"/></td>
484
+ <?php } ?>
485
  </tr>
486
  <tr>
487
  <th scope="row" valign="top"><label for="billing_state"><?php _e( 'Billing State', 'paid-memberships-pro' ); ?>
488
  :</label></th>
489
  <td>
490
+ <?php
491
+ if ( in_array( 'billing_state', $read_only_fields ) && $order_id > 0 ) {
492
  echo $order->billing_state;
493
+ } else {
494
+ ?>
495
+ <input id="billing_state" name="billing_state" type="text" size="50"
496
+ value="<?php echo esc_attr( $order->billing->state ); ?>"/></td>
497
+ <?php } ?>
498
  </tr>
499
  <tr>
500
  <th scope="row" valign="top"><label for="billing_zip"><?php _e( 'Billing Postal Code', 'paid-memberships-pro' ); ?>
501
  :</label></th>
502
  <td>
503
+ <?php
504
+ if ( in_array( 'billing_zip', $read_only_fields ) && $order_id > 0 ) {
505
  echo $order->billing_zip;
506
+ } else {
507
+ ?>
508
+ <input id="billing_zip" name="billing_zip" type="text" size="50"
509
+ value="<?php echo esc_attr( $order->billing->zip ); ?>"/></td>
510
+ <?php } ?>
511
  </tr>
512
  <tr>
513
  <th scope="row" valign="top"><label for="billing_country"><?php _e( 'Billing Country', 'paid-memberships-pro' ); ?>
514
  :</label></th>
515
  <td>
516
+ <?php
517
+ if ( in_array( 'billing_country', $read_only_fields ) && $order_id > 0 ) {
518
  echo $order->billing_country;
519
+ } else {
520
+ ?>
521
+ <input id="billing_country" name="billing_country" type="text" size="50"
522
+ value="<?php echo esc_attr( $order->billing->country ); ?>"/>
523
  <?php } ?>
524
  </td>
525
  </tr>
527
  <th scope="row" valign="top"><label for="billing_phone"><?php _e( 'Billing Phone', 'paid-memberships-pro' ); ?>
528
  :</label></th>
529
  <td>
530
+ <?php
531
+ if ( in_array( 'billing_phone', $read_only_fields ) && $order_id > 0 ) {
532
  echo $order->billing_phone;
533
+ } else {
534
+ ?>
535
+ <input id="billing_phone" name="billing_phone" type="text" size="50"
536
+ value="<?php echo esc_attr( $order->billing->phone ); ?>"/>
537
  <?php } ?>
538
  </td>
539
  </tr>
541
  <tr>
542
  <th scope="row" valign="top"><label for="subtotal"><?php _e( 'Sub Total', 'paid-memberships-pro' ); ?>:</label></th>
543
  <td>
544
+ <?php
545
+ if ( in_array( 'subtotal', $read_only_fields ) && $order_id > 0 ) {
546
  echo $order->subtotal;
547
+ } else {
548
+ ?>
549
+ <input id="subtotal" name="subtotal" type="text" size="10"
550
+ value="<?php echo esc_attr( $order->subtotal ); ?>"/>
551
  <?php } ?>
552
  </td>
553
  </tr>
554
  <tr>
555
  <th scope="row" valign="top"><label for="tax"><?php _e( 'Tax', 'paid-memberships-pro' ); ?>:</label></th>
556
  <td>
557
+ <?php
558
+ if ( in_array( 'tax', $read_only_fields ) && $order_id > 0 ) {
559
  echo $order->tax;
560
+ } else {
561
+ ?>
562
+ <input id="tax" name="tax" type="text" size="10"
563
+ value="<?php echo esc_attr( $order->tax ); ?>"/>
564
  <?php } ?>
565
  </td>
566
  </tr>
568
  <th scope="row" valign="top"><label for="couponamount"><?php _e( 'Coupon Amount', 'paid-memberships-pro' ); ?>:</label>
569
  </th>
570
  <td>
571
+ <?php
572
+ if ( in_array( 'couponamount', $read_only_fields ) && $order_id > 0 ) {
573
  echo $order->couponamount;
574
+ } else {
575
+ ?>
576
+ <input id="couponamount" name="couponamount" type="text" size="10"
577
+ value="<?php echo esc_attr( $order->couponamount ); ?>"/>
578
  <?php } ?>
579
  </td>
580
  </tr>
581
  <tr>
582
  <th scope="row" valign="top"><label for="total"><?php _e( 'Total', 'paid-memberships-pro' ); ?>:</label></th>
583
  <td>
584
+ <?php
585
+ if ( in_array( 'total', $read_only_fields ) && $order_id > 0 ) {
586
  echo $order->total;
587
+ } else {
588
+ ?>
589
+ <input id="total" name="total" type="text" size="10"
590
+ value="<?php echo esc_attr( $order->total ); ?>"/>
591
  <?php } ?>
592
  <small
593
  class="pmpro_lite"><?php _e( 'Should be subtotal + tax - couponamount.', 'paid-memberships-pro' ); ?></small>
598
  <th scope="row" valign="top"><label for="payment_type"><?php _e( 'Payment Type', 'paid-memberships-pro' ); ?>:</label>
599
  </th>
600
  <td>
601
+ <?php
602
+ if ( in_array( 'payment_type', $read_only_fields ) && $order_id > 0 ) {
603
  echo $order->payment_type;
604
+ } else {
605
+ ?>
606
+ <input id="payment_type" name="payment_type" type="text" size="50"
607
+ value="<?php echo esc_attr( $order->payment_type ); ?>"/>
608
  <?php } ?>
609
  <small
610
  class="pmpro_lite"><?php _e( 'e.g. PayPal Express, PayPal Standard, Credit Card.', 'paid-memberships-pro' ); ?></small>
613
  <tr>
614
  <th scope="row" valign="top"><label for="cardtype"><?php _e( 'Card Type', 'paid-memberships-pro' ); ?></label></th>
615
  <td>
616
+ <?php
617
+ if ( in_array( 'cardtype', $read_only_fields ) && $order_id > 0 ) {
618
  echo $order->cardtype;
619
+ } else {
620
+ ?>
621
+ <input id="cardtype" name="cardtype" type="text" size="50"
622
+ value="<?php echo esc_attr( $order->cardtype ); ?>"/>
623
  <?php } ?>
624
  <small class="pmpro_lite"><?php _e( 'e.g. Visa, MasterCard, AMEX, etc', 'paid-memberships-pro' ); ?></small>
625
  </td>
628
  <th scope="row" valign="top"><label for="accountnumber"><?php _e( 'Account Number', 'paid-memberships-pro' ); ?>
629
  :</label></th>
630
  <td>
631
+ <?php
632
+ if ( in_array( 'accountnumber', $read_only_fields ) && $order_id > 0 ) {
633
  echo $order->accountnumber;
634
+ } else {
635
+ ?>
636
+ <input id="accountnumber" name="accountnumber" type="text" size="50"
637
+ value="<?php echo esc_attr( $order->accountnumber ); ?>"/>
638
  <?php } ?>
639
  <small class="pmpro_lite"><?php _e( 'Obscure all but last 4 digits.', 'paid-memberships-pro' ); ?></small>
640
  </td>
641
  </tr>
642
+ <?php
643
+ if ( in_array( 'ExpirationDate', $read_only_fields ) && $order_id > 0 ) {
644
  echo $order->ExpirationDate;
645
+ } else {
646
+ ?>
647
+ <tr>
648
+ <th scope="row" valign="top"><label
649
  for="expirationmonth"><?php _e( 'Expiration Month', 'paid-memberships-pro' ); ?>:</label></th>
650
  <td>
651
  <input id="expirationmonth" name="expirationmonth" type="text" size="10"
652
+ value="<?php echo esc_attr( $order->expirationmonth ); ?>"/>
653
  <small class="pmpro_lite">MM</small>
654
  </td>
655
  </tr>
656
  <tr>
657
  <th scope="row" valign="top"><label for="expirationyear"><?php _e( 'Expiration Year', 'paid-memberships-pro' ); ?>
658
+ :</label></th>
659
  <td>
660
  <input id="expirationyear" name="expirationyear" type="text" size="10"
661
+ value="<?php echo esc_attr( $order->expirationyear ); ?>"/>
662
  <small class="pmpro_lite">YYYY</small>
663
  </td>
664
  </tr>
666
  <tr>
667
  <th scope="row" valign="top"><label for="status"><?php _e( 'Status', 'paid-memberships-pro' ); ?>:</label></th>
668
  <td>
669
+ <?php
670
+ if ( in_array( 'status', $read_only_fields ) && $order_id > 0 ) {
671
  echo $order->status;
672
+ } else {
673
+ ?>
674
+ <?php
675
+ $statuses = array();
676
+ $default_statuses = array(
677
+ '',
678
+ 'success',
679
+ 'cancelled',
680
+ 'review',
681
+ 'token',
682
+ 'refunded',
683
+ 'pending',
684
+ 'error',
685
+ );
686
+ $used_statuses = $wpdb->get_col( "SELECT DISTINCT(status) FROM $wpdb->pmpro_membership_orders" );
687
+ $statuses = array_unique( array_merge( $default_statuses, $used_statuses ) );
688
+ asort( $statuses );
689
+ $statuses = apply_filters( 'pmpro_order_statuses', $statuses );
690
  ?>
691
  <select id="status" name="status">
692
+ <?php foreach ( $statuses as $status ) { ?>
693
  <option
694
  value="<?php echo esc_attr( $status ); ?>" <?php selected( $order->status, $status ); ?>><?php echo $status; ?></option>
695
  <?php } ?>
701
  <tr>
702
  <th scope="row" valign="top"><label for="gateway"><?php _e( 'Gateway', 'paid-memberships-pro' ); ?>:</label></th>
703
  <td>
704
+ <?php
705
+ if ( in_array( 'gateway', $read_only_fields ) && $order_id > 0 ) {
706
  echo $order->gateway;
707
+ } else {
708
+ ?>
709
+ <select id="gateway" name="gateway" onchange="pmpro_changeGateway(jQuery(this).val());">
710
+ <?php
711
+ $pmpro_gateways = pmpro_gateways();
712
+ foreach ( $pmpro_gateways as $pmpro_gateway_name => $pmpro_gateway_label ) {
713
+ ?>
714
+ <option
715
+ value="<?php echo esc_attr( $pmpro_gateway_name ); ?>" <?php selected( $order->gateway, $pmpro_gateway_name ); ?>><?php echo $pmpro_gateway_label; ?></option>
716
  <?php
717
+ }
718
+ ?>
719
+ </select>
720
+ <?php } ?>
721
  </td>
722
  </tr>
723
  <tr>
724
  <th scope="row" valign="top"><label
725
  for="gateway_environment"><?php _e( 'Gateway Environment', 'paid-memberships-pro' ); ?>:</label></th>
726
  <td>
727
+ <?php
728
+ if ( in_array( 'gateway_environment', $read_only_fields ) && $order_id > 0 ) {
729
  echo $order->gateway_environment;
730
+ } else {
731
+ ?>
732
+ <select name="gateway_environment">
733
+ <option value="sandbox"
734
+ <?php
735
+ if ( $order->gateway_environment == 'sandbox' ) {
736
+ ?>
737
+ selected="selected"<?php } ?>><?php _e( 'Sandbox/Testing', 'paid-memberships-pro' ); ?></option>
738
  <option value="live"
739
+ <?php
740
+ if ( $order->gateway_environment == 'live' ) {
741
+ ?>
742
+ selected="selected"<?php } ?>><?php _e( 'Live/Production', 'paid-memberships-pro' ); ?></option>
743
  </select>
744
  <?php } ?>
745
  </td>
749
  <th scope="row" valign="top"><label
750
  for="payment_transaction_id"><?php _e( 'Payment Transaction ID', 'paid-memberships-pro' ); ?>:</label></th>
751
  <td>
752
+ <?php
753
+ if ( in_array( 'payment_transaction_id', $read_only_fields ) && $order_id > 0 ) {
754
  echo $order->payment_transaction_id;
755
+ } else {
756
+ ?>
757
+ <input id="payment_transaction_id" name="payment_transaction_id" type="text" size="50"
758
+ value="<?php echo esc_attr( $order->payment_transaction_id ); ?>"/>
759
  <?php } ?>
760
  <small
761
  class="pmpro_lite"><?php _e( 'Generated by the gateway. Useful to cross reference orders.', 'paid-memberships-pro' ); ?></small>
766
  for="subscription_transaction_id"><?php _e( 'Subscription Transaction ID', 'paid-memberships-pro' ); ?>
767
  :</label></th>
768
  <td>
769
+ <?php
770
+ if ( in_array( 'subscription_transaction_id', $read_only_fields ) && $order_id > 0 ) {
771
  echo $order->subscription_transaction_id;
772
+ } else {
773
+ ?>
774
+ <input id="subscription_transaction_id" name="subscription_transaction_id" type="text" size="50"
775
+ value="<?php echo esc_attr( $order->subscription_transaction_id ); ?>"/>
776
  <?php } ?>
777
  <small
778
  class="pmpro_lite"><?php _e( 'Generated by the gateway. Useful to cross reference subscriptions.', 'paid-memberships-pro' ); ?></small>
782
  <tr>
783
  <th scope="row" valign="top"><label for="ts_month"><?php _e( 'Date', 'paid-memberships-pro' ); ?>:</label></th>
784
  <td>
785
+ <?php
786
+ if ( in_array( 'timestamp', $read_only_fields ) && $order_id > 0 ) {
787
+ echo date_i18n( get_option( 'date_format' ) . ' ' . get_option( 'time_format' ), $order->timestamp );
788
+ } else {
789
+ ?>
790
+ <?php
791
+ // set up date vars
792
+ if ( ! empty( $order->timestamp ) ) {
793
+ $timestamp = $order->timestamp;
794
+ } else {
795
+ $timestamp = current_time( 'timestamp' );
796
+ }
797
+ $year = date_i18n( 'Y', $timestamp );
798
+ $month = date_i18n( 'n', $timestamp );
799
+ $day = date_i18n( 'j', $timestamp );
800
+ ?>
801
+ <select id="ts_month" name="ts_month">
802
  <?php
803
  for ( $i = 1; $i < 13; $i ++ ) {
804
  ?>
805
+ <option value="<?php echo $i; ?>"
806
+ <?php
807
+ if ( $i == $month ) {
808
+ ?>
809
+ selected="selected"<?php } ?>><?php echo date_i18n( 'M', strtotime( $i . '/1/' . $year, current_time( 'timestamp' ) ) ); ?></option>
810
  <?php
811
  }
812
  ?>
818
  </tr>
819
 
820
  <?php
821
+ $affiliates = apply_filters( 'pmpro_orders_show_affiliate_ids', false );
822
  if ( ! empty( $affiliates ) ) {
823
  ?>
824
  <tr>
825
  <th scope="row" valign="top"><label for="affiliate_id"><?php _e( 'Affiliate ID', 'paid-memberships-pro' ); ?>
826
  :</label></th>
827
  <td>
828
+ <?php
829
+ if ( in_array( 'affiliate_id', $read_only_fields ) && $order_id > 0 ) {
830
  echo $order->affiliate_id;
831
+ } else {
832
+ ?>
833
+ <input id="affiliate_id" name="affiliate_id" type="text" size="50"
834
+ value="<?php echo esc_attr( $order->affiliate_id ); ?>"/>
835
  <?php } ?>
836
  </td>
837
  </tr>
839
  <th scope="row" valign="top"><label for="affiliate_subid"><?php _e( 'Affiliate SubID', 'paid-memberships-pro' ); ?>
840
  :</label></th>
841
  <td>
842
+ <?php
843
+ if ( in_array( 'affiliate_subid', $read_only_fields ) && $order_id > 0 ) {
844
  echo $order->affiliate_subid;
845
+ } else {
846
+ ?>
847
+ <input id="affiliate_subid" name="affiliate_subid" type="text" size="50"
848
+ value="<?php echo esc_attr( $order->affiliate_subid ); ?>"/>
849
  <?php } ?>
850
  </td>
851
  </tr>
854
  <tr>
855
  <th scope="row" valign="top"><label for="notes"><?php _e( 'Notes', 'paid-memberships-pro' ); ?>:</label></th>
856
  <td>
857
+ <?php
858
+ if ( in_array( 'notes', $read_only_fields ) && $order_id > 0 ) {
859
  echo $order->notes;
860
+ } else {
861
+ ?>
862
+ <textarea id="notes" name="notes" rows="5"
863
+ cols="80"><?php echo esc_textarea( $order->notes ); ?></textarea>
864
  <?php } ?>
865
  </td>
866
  </tr>
867
 
868
+ <?php do_action( 'pmpro_after_order_settings', $order ); ?>
869
 
870
  </tbody>
871
  </table>
872
 
873
  <p class="submit topborder">
874
+ <input name="order" type="hidden" value="
875
+ <?php
876
+ if ( ! empty( $order->id ) ) {
877
  echo $order->id;
878
  } else {
879
  echo $order_id;
880
+ }
881
+ ?>
882
+ "/>
883
  <input name="save" type="submit" class="button-primary" value="<?php _e( 'Save Order', 'paid-memberships-pro' ); ?>"/>
884
  <input name="cancel" type="button" class="cancel button-secondary" value="<?php _e( 'Cancel', 'paid-memberships-pro' ); ?>"
885
+ onclick="location.href='<?php echo get_admin_url( null, '/admin.php?page=pmpro-orders' ); ?>';"/>
886
  </p>
887
 
888
  </form>
931
  class="add-new-h2">+ <?php _e( 'Add New Order', 'paid-memberships-pro' ); ?></a>
932
 
933
  <?php
934
+ // build the export URL
935
  $export_url = admin_url( 'admin-ajax.php?action=orders_csv' );
936
  $url_params = array(
937
+ 'filter' => $filter,
938
+ 's' => $s,
939
+ 'l' => $l,
940
+ 'start-month' => $start_month,
941
+ 'start-day' => $start_day,
942
+ 'start-year' => $start_year,
943
+ 'end-month' => $end_month,
944
+ 'end-day' => $end_day,
945
+ 'end-year' => $end_year,
946
+ 'predefined-date' => $predefined_date,
947
+ 'status' => $status,
948
  );
949
  $export_url = add_query_arg( $url_params, $export_url );
950
  ?>
954
 
955
 
956
  <?php if ( ! empty( $pmpro_msg ) ) { ?>
957
+ <div id="message" class="
958
+ <?php
959
+ if ( $pmpro_msgt == 'success' ) {
960
+ echo 'updated fade';
961
  } else {
962
+ echo 'error';
963
+ }
964
+ ?>
965
+ "><p><?php echo $pmpro_msg; ?></p></div>
966
  <?php } ?>
967
 
968
 
969
  <ul class="subsubsub">
970
  <li>
971
+ <?php _e( 'Show', 'paid-memberships-pro' ); ?>
972
  <select id="filter" name="filter">
973
+ <option value="all" <?php selected( $filter, 'all' ); ?>><?php _e( 'All', 'paid-memberships-pro' ); ?></option>
974
  <option
975
+ value="within-a-date-range" <?php selected( $filter, 'within-a-date-range' ); ?>><?php _e( 'Within a Date Range', 'paid-memberships-pro' ); ?></option>
976
  <option
977
+ value="predefined-date-range" <?php selected( $filter, 'predefined-date-range' ); ?>><?php _e( 'Predefined Date Range', 'paid-memberships-pro' ); ?></option>
978
  <option
979
+ value="within-a-level" <?php selected( $filter, 'within-a-level' ); ?>><?php _e( 'Within a Level', 'paid-memberships-pro' ); ?></option>
980
  <option
981
+ value="within-a-status" <?php selected( $filter, 'within-a-status' ); ?>><?php _e( 'Within a Status', 'paid-memberships-pro' ); ?></option>
982
  </select>
983
 
984
+ <span id="from"><?php _e( 'From', 'paid-memberships-pro' ); ?></span>
985
 
986
  <select id="start-month" name="start-month">
987
  <?php for ( $i = 1; $i < 13; $i ++ ) { ?>
988
  <option
989
+ value="<?php echo $i; ?>" <?php selected( $start_month, $i ); ?>><?php echo date_i18n( 'F', mktime( 0, 0, 0, $i, 2 ) ); ?></option>
990
  <?php } ?>
991
  </select>
992
 
993
  <input id='start-day' name="start-day" type="text" size="2"
994
+ value="<?php echo esc_attr( $start_day ); ?>"/>
995
  <input id='start-year' name="start-year" type="text" size="4"
996
+ value="<?php echo esc_attr( $start_year ); ?>"/>
997
 
998
 
999
+ <span id="to"><?php _e( 'To', 'paid-memberships-pro' ); ?></span>
1000
 
1001
  <select id="end-month" name="end-month">
1002
  <?php for ( $i = 1; $i < 13; $i ++ ) { ?>
1003
  <option
1004
+ value="<?php echo $i; ?>" <?php selected( $end_month, $i ); ?>><?php echo date_i18n( 'F', mktime( 0, 0, 0, $i, 2 ) ); ?></option>
1005
  <?php } ?>
1006
  </select>
1007
 
1009
  <input id='end-day' name="end-day" type="text" size="2" value="<?php echo esc_attr( $end_day ); ?>"/>
1010
  <input id='end-year' name="end-year" type="text" size="4" value="<?php echo esc_attr( $end_year ); ?>"/>
1011
 
1012
+ <span id="filterby"><?php _e( 'filter by ', 'paid-memberships-pro' ); ?></span>
1013
 
1014
  <select id="predefined-date" name="predefined-date">
1015
 
1016
  <option
1017
+ value="<?php echo 'This Month'; ?>" <?php selected( $predefined_date, 'This Month' ); ?>><?php echo 'This Month'; ?></option>
1018
  <option
1019
+ value="<?php echo 'Last Month'; ?>" <?php selected( $predefined_date, 'Last Month' ); ?>><?php echo 'Last Month'; ?></option>
1020
  <option
1021
+ value="<?php echo 'This Year'; ?>" <?php selected( $predefined_date, 'This Year' ); ?>><?php echo 'This Year'; ?></option>
1022
  <option
1023
+ value="<?php echo 'Last Year'; ?>" <?php selected( $predefined_date, 'Last Year' ); ?>><?php echo 'Last Year'; ?></option>
1024
 
1025
  </select>
1026
 
1027
  <?php
1028
+ // Note: only orders belonging to current levels can be filtered. There is no option for orders belonging to deleted levels
1029
  $levels = pmpro_getAllLevels( true, true );
1030
  ?>
1031
  <select id="l" name="l">
1036
 
1037
  </select>
1038
 
1039
+ <?php
1040
  $statuses = pmpro_getOrderStatuses();
1041
  ?>
1042
  <select id="status" name="status">
1151
  </p>
1152
 
1153
  <?php
1154
+ // string search
1155
  if ( $s ) {
1156
  $sqlQuery = "SELECT SQL_CALC_FOUND_ROWS o.id FROM $wpdb->pmpro_membership_orders o LEFT JOIN $wpdb->users u ON o.user_id = u.ID LEFT JOIN $wpdb->pmpro_membership_levels l ON o.membership_id = l.id ";
1157
 
1158
+ $join_with_usermeta = apply_filters( 'pmpro_orders_search_usermeta', false );
1159
  if ( $join_with_usermeta ) {
1160
  $sqlQuery .= "LEFT JOIN $wpdb->usermeta um ON o.user_id = um.user_id ";
1161
  }
1162
 
1163
+ $sqlQuery .= 'WHERE (1=2 ';
1164
 
1165
  $fields = array(
1166
+ 'o.id',
1167
+ 'o.code',
1168
+ 'o.billing_name',
1169
+ 'o.billing_street',
1170
+ 'o.billing_city',
1171
+ 'o.billing_state',
1172
+ 'o.billing_zip',
1173
+ 'o.billing_phone',
1174
+ 'o.payment_type',
1175
+ 'o.cardtype',
1176
+ 'o.accountnumber',
1177
+ 'o.status',
1178
+ 'o.gateway',
1179
+ 'o.gateway_environment',
1180
+ 'o.payment_transaction_id',
1181
+ 'o.subscription_transaction_id',
1182
+ 'u.user_login',
1183
+ 'u.user_email',
1184
+ 'u.display_name',
1185
+ 'l.name',
1186
  );
1187
 
1188
  if ( $join_with_usermeta ) {
1189
+ $fields[] = 'um.meta_value';
1190
  }
1191
 
1192
+ $fields = apply_filters( 'pmpro_orders_search_fields', $fields );
1193
 
1194
  foreach ( $fields as $field ) {
1195
+ $sqlQuery .= ' OR ' . $field . " LIKE '%" . esc_sql( $s ) . "%' ";
1196
  }
1197
+ $sqlQuery .= ') ';
1198
 
1199
+ $sqlQuery .= 'AND ' . $condition . ' ';
1200
 
1201
+ $sqlQuery .= 'GROUP BY o.id ORDER BY o.id DESC, o.timestamp DESC ';
1202
  } else {
1203
+ $sqlQuery = "SELECT SQL_CALC_FOUND_ROWS id FROM $wpdb->pmpro_membership_orders WHERE " . $condition . ' ORDER BY id DESC, timestamp DESC ';
1204
  }
1205
 
1206
  $sqlQuery .= "LIMIT $start, $limit";
1207
 
1208
  $order_ids = $wpdb->get_col( $sqlQuery );
1209
 
1210
+ $totalrows = $wpdb->get_var( 'SELECT FOUND_ROWS() as found_rows' );
1211
 
1212
  if ( $order_ids ) {
1213
  ?>
1214
+ <p class="clear"><?php printf( __( '%d orders found.', 'paid-memberships-pro' ), $totalrows ); ?></span></p>
1215
  <?php
1216
  }
1217
  ?>
1221
  <th><?php _e( 'ID', 'paid-memberships-pro' ); ?></th>
1222
  <th><?php _e( 'Code', 'paid-memberships-pro' ); ?></th>
1223
  <th><?php _e( 'User', 'paid-memberships-pro' ); ?></th>
1224
+ <?php do_action( 'pmpro_orders_extra_cols_header', $order_ids ); ?>
1225
  <th><?php _e( 'Membership Level', 'paid-memberships-pro' ); ?></th>
1226
  <th><?php _e( 'Total', 'paid-memberships-pro' ); ?></th>
1227
  <th><?php _e( 'Payment', 'paid-memberships-pro' ); ?></th>
1244
  $order->nogateway = true;
1245
  $order->getMemberOrderByID( $order_id );
1246
  ?>
1247
+ <tr
1248
+ <?php
1249
+ if ( $count ++ % 2 == 0 ) {
1250
+ ?>
1251
+ class="alternate"<?php } ?>>
1252
  <td>
1253
+ <a href="admin.php?page=pmpro-orders&order=<?php echo $order->id; ?>"><?php echo $order->id; ?></a>
1254
  </td>
1255
  <td>
1256
+ <a href="admin.php?page=pmpro-orders&order=<?php echo $order->id; ?>"><?php echo $order->code; ?></a>
1257
  </td>
1258
  <td class="username column-username">
1259
  <?php $order->getUser(); ?>
1260
  <?php if ( ! empty( $order->user ) ) { ?>
1261
+ <a href="user-edit.php?user_id=<?php echo $order->user->ID; ?>"><?php echo $order->user->user_login; ?></a>
1262
+ <?php } elseif ( $order->user_id > 0 ) { ?>
1263
  [<?php _e( 'deleted', 'paid-memberships-pro' ); ?>]
1264
+ <?php } else { ?>
1265
+ [<?php _e( 'none', 'paid-memberships-pro' ); ?>]
1266
  <?php } ?>
1267
  <br/>
1268
  <?php
1282
  }
1283
  ?>
1284
  </td>
1285
+ <?php do_action( 'pmpro_orders_extra_cols_body', $order ); ?>
1286
  <td><?php echo $order->membership_id; ?></td>
1287
  <td><?php echo pmpro_formatPrice( $order->total ); ?></td>
1288
  <td>
1289
+ <?php
1290
+ if ( ! empty( $order->payment_type ) ) {
1291
+ echo $order->payment_type . '<br />';
1292
+ }
1293
+ ?>
1294
  <?php if ( ! empty( $order->accountnumber ) ) { ?>
1295
  <?php echo $order->cardtype; ?>: x<?php echo last4( $order->accountnumber ); ?><br/>
1296
  <?php } ?>
1300
  <?php if ( ! empty( $order->billing->street ) ) { ?>
1301
  <?php echo $order->billing->street; ?><br/>
1302
  <?php if ( $order->billing->city && $order->billing->state ) { ?>
1303
+ <?php echo $order->billing->city; ?>, <?php echo $order->billing->state; ?><?php echo $order->billing->zip; ?>
1304
+ <?php
1305
+ if ( ! empty( $order->billing->country ) ) {
1306
+ echo $order->billing->country; }
1307
+ ?>
1308
+ <br/>
1309
  <?php } ?>
1310
  <?php } ?>
1311
+ <?php
1312
+ if ( ! empty( $order->billing->phone ) ) {
1313
  echo formatPhone( $order->billing->phone );
1314
+ }
1315
+ ?>
1316
  </td>
1317
+ <td><?php echo $order->gateway; ?>
1318
+ <?php
1319
+ if ( $order->gateway_environment == 'test' ) {
1320
+ echo '(test)';
1321
+ }
1322
+ ?>
1323
+ </td>
1324
  <td>
1325
+ <?php _e( 'Payment', 'paid-memberships-pro' ); ?>:
1326
+ <?php
1327
+ if ( ! empty( $order->payment_transaction_id ) ) {
1328
+ echo $order->payment_transaction_id;
1329
+ } else {
1330
+ _e( 'N/A', 'paid-memberships-pro' );
1331
+ }
1332
+ ?>
1333
  <br/>
1334
  <?php _e( 'Subscription', 'paid-memberships-pro' ); ?>
1335
+ :
1336
+ <?php
1337
+ if ( ! empty( $order->subscription_transaction_id ) ) {
1338
  echo $order->subscription_transaction_id;
1339
  } else {
1340
+ _e( 'N/A', 'paid-memberships-pro' );
1341
+ }
1342
+ ?>
1343
  </td>
1344
  <td><?php echo $order->status; ?></td>
1345
  <td>
1353
  <a href="admin.php?page=pmpro-orders&order=-1&copy=<?php echo $order->id; ?>"><?php _e( 'copy', 'paid-memberships-pro' ); ?></a>
1354
  </td>
1355
  <td align="center">
1356
+ <a href="javascript:askfirst('<?php echo str_replace( "'", "\'", sprintf( __( 'Deleting orders is permanent and can affect active users. Are you sure you want to delete order %s?', 'paid-memberships-pro' ), str_replace( "'", '', $order->code ) ) ); ?>', 'admin.php?page=pmpro-orders&delete=<?php echo $order->id; ?>'); void(0);"><?php _e( 'delete', 'paid-memberships-pro' ); ?></a>
1357
  </td>
1358
  <td align="center">
1359
  <a href="admin-ajax.php?action=pmpro_orders_print_view&order=<?php echo $order->id; ?>"
1379
  </table>
1380
  </form>
1381
  <?php
1382
+ // add normal args
1383
+ $pagination_url = add_query_arg( $url_params, get_admin_url( null, '/admin.php?page=pmpro-orders' ) );
1384
  echo pmpro_getPaginationString( $pn, $totalrows, $limit, 1, $pagination_url, "&limit=$limit&pn=" );
1385
  ?>
1386
 
1387
  <?php } ?>
1388
  <?php
1389
+ require_once( dirname( __FILE__ ) . '/admin_footer.php' );
 
classes/class.memberorder.php CHANGED
@@ -723,6 +723,26 @@
723
  //get some data
724
  $order_user = get_userdata($this->user_id);
725
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
726
  //cancel the gateway subscription first
727
  if (is_object($this->Gateway)) {
728
  $result = $this->Gateway->cancel( $this );
@@ -752,23 +772,7 @@
752
  $wpdb->query($sqlQuery);
753
  }
754
 
755
- //cancel orders for the same subscription
756
- $sqlQuery = $wpdb->prepare(
757
- "UPDATE $wpdb->pmpro_membership_orders
758
- SET `status` = 'cancelled'
759
- WHERE user_id = %d
760
- AND membership_id = %d
761
- AND gateway = %s
762
- AND gateway_environment = %s
763
- AND subscription_transaction_id = %s
764
- AND `status` IN('success', '') ",
765
- $this->user_id,
766
- $this->membership_id,
767
- $this->gateway,
768
- $this->gateway_environment,
769
- $this->subscription_transaction_id
770
- );
771
- $wpdb->query($sqlQuery);
772
 
773
  return $result;
774
  }
723
  //get some data
724
  $order_user = get_userdata($this->user_id);
725
 
726
+ //cancel orders for the same subscription
727
+ //Note: We do this early to avoid race conditions if and when the
728
+ //gateway send the cancel webhook after cancelling the subscription.
729
+ $sqlQuery = $wpdb->prepare(
730
+ "UPDATE $wpdb->pmpro_membership_orders
731
+ SET `status` = 'cancelled'
732
+ WHERE user_id = %d
733
+ AND membership_id = %d
734
+ AND gateway = %s
735
+ AND gateway_environment = %s
736
+ AND subscription_transaction_id = %s
737
+ AND `status` IN('success', '') ",
738
+ $this->user_id,
739
+ $this->membership_id,
740
+ $this->gateway,
741
+ $this->gateway_environment,
742
+ $this->subscription_transaction_id
743
+ );
744
+ $wpdb->query($sqlQuery);
745
+
746
  //cancel the gateway subscription first
747
  if (is_object($this->Gateway)) {
748
  $result = $this->Gateway->cancel( $this );
772
  $wpdb->query($sqlQuery);
773
  }
774
 
775
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
776
 
777
  return $result;
778
  }
classes/class.pmproemail.php CHANGED
@@ -98,12 +98,19 @@
98
  {
99
  foreach($this->data as $key => $value)
100
  {
101
- $this->body = str_replace("!!" . $key . "!!", $value, $this->body);
 
 
102
  }
103
  }
104
 
105
  //filters
106
  $temail = apply_filters("pmpro_email_filter", $this); //allows filtering entire email at once
 
 
 
 
 
107
  $this->email = apply_filters("pmpro_email_recipient", $temail->email, $this);
108
  $this->from = apply_filters("pmpro_email_sender", $temail->from, $this);
109
  $this->fromname = apply_filters("pmpro_email_sender_name", $temail->fromname, $this);
98
  {
99
  foreach($this->data as $key => $value)
100
  {
101
+ if ( 'body' != $key ) {
102
+ $this->body = str_replace("!!" . $key . "!!", $value, $this->body);
103
+ }
104
  }
105
  }
106
 
107
  //filters
108
  $temail = apply_filters("pmpro_email_filter", $this); //allows filtering entire email at once
109
+
110
+ if ( empty( $temail ) ) {
111
+ return false;
112
+ }
113
+
114
  $this->email = apply_filters("pmpro_email_recipient", $temail->email, $this);
115
  $this->from = apply_filters("pmpro_email_sender", $temail->from, $this);
116
  $this->fromname = apply_filters("pmpro_email_sender_name", $temail->fromname, $this);
classes/gateways/class.pmprogateway_stripe.php CHANGED
@@ -264,7 +264,7 @@
264
  <input type="text" id="stripe_publishablekey" name="stripe_publishablekey" size="60" value="<?php echo esc_attr($values['stripe_publishablekey'])?>" />
265
  <?php
266
  $public_key_prefix = substr($values['stripe_publishablekey'] , 0, 3);
267
- if($public_key_prefix != 'pk_') {
268
  ?>
269
  <br /><small class="pmpro_message pmpro_error"><?php _e('Your Publishable Key appears incorrect.', 'paid-memberships-pro');?></small>
270
  <?php
@@ -278,15 +278,6 @@
278
  </th>
279
  <td>
280
  <input type="text" id="stripe_secretkey" name="stripe_secretkey" size="60" value="<?php echo esc_attr($values['stripe_secretkey'])?>" />
281
- <?php
282
- $secret_key_prefix = substr($values['stripe_secretkey'] , 0, 3);
283
- //note the false here to disable this for now until we figure out a better check
284
- if(false && $secret_key_prefix != 'sk_') {
285
- ?>
286
- <br /><small class="pmpro_message pmpro_error"><?php _e('Your Secret Key appears incorrect.', 'paid-memberships-pro');?></small>
287
- <?php
288
- }
289
- ?>
290
  </td>
291
  </tr>
292
  <tr class="gateway gateway_stripe" <?php if($gateway != "stripe") { ?>style="display: none;"<?php } ?>>
264
  <input type="text" id="stripe_publishablekey" name="stripe_publishablekey" size="60" value="<?php echo esc_attr($values['stripe_publishablekey'])?>" />
265
  <?php
266
  $public_key_prefix = substr($values['stripe_publishablekey'] , 0, 3);
267
+ if(!empty($values['stripe_publishablekey']) && $public_key_prefix != 'pk_') {
268
  ?>
269
  <br /><small class="pmpro_message pmpro_error"><?php _e('Your Publishable Key appears incorrect.', 'paid-memberships-pro');?></small>
270
  <?php
278
  </th>
279
  <td>
280
  <input type="text" id="stripe_secretkey" name="stripe_secretkey" size="60" value="<?php echo esc_attr($values['stripe_secretkey'])?>" />
 
 
 
 
 
 
 
 
 
281
  </td>
282
  </tr>
283
  <tr class="gateway gateway_stripe" <?php if($gateway != "stripe") { ?>style="display: none;"<?php } ?>>
includes/filters.php CHANGED
@@ -7,224 +7,231 @@
7
  If checking out for the same level, add remaining days to the enddate.
8
  Pulled in from: https://gist.github.com/3678054
9
  */
10
- function pmpro_checkout_level_extend_memberships($level)
11
- {
12
  global $pmpro_msg, $pmpro_msgt;
13
 
14
- //does this level expire? are they an existing user of this level?
15
- if(!empty($level) && !empty($level->expiration_number) && pmpro_hasMembershipLevel($level->id))
16
- {
17
- //get the current enddate of their membership
18
  global $current_user;
19
- $expiration_date = $current_user->membership_level->enddate;
20
 
21
- //calculate days left
22
- $todays_date = current_time('timestamp');
 
 
 
 
 
 
23
  $time_left = $expiration_date - $todays_date;
24
 
25
- //time left?
26
- if($time_left > 0)
27
- {
28
- //convert to days and add to the expiration date (assumes expiration was 1 year)
29
- $days_left = floor($time_left/(60*60*24));
30
 
31
- //figure out days based on period
32
- if($level->expiration_period == "Day")
33
  $total_days = $days_left + $level->expiration_number;
34
- elseif($level->expiration_period == "Week")
35
  $total_days = $days_left + $level->expiration_number * 7;
36
- elseif($level->expiration_period == "Month")
37
  $total_days = $days_left + $level->expiration_number * 30;
38
- elseif($level->expiration_period == "Year")
39
  $total_days = $days_left + $level->expiration_number * 365;
 
40
 
41
- //update number and period
42
  $level->expiration_number = $total_days;
43
- $level->expiration_period = "Day";
44
  }
45
  }
46
 
47
  return $level;
48
  }
49
- add_filter("pmpro_checkout_level", "pmpro_checkout_level_extend_memberships");
50
  /*
51
  Same thing as above but when processed by the ipnhandler for PayPal standard.
52
  */
53
- function pmpro_ipnhandler_level_extend_memberships($level, $user_id)
54
- {
55
  global $pmpro_msg, $pmpro_msgt;
56
 
57
- //does this level expire? are they an existing user of this level?
58
- if(!empty($level) && !empty($level->expiration_number) && pmpro_hasMembershipLevel($level->id, $user_id))
59
- {
60
- //get the current enddate of their membership
61
- $user_level = pmpro_getMembershipLevelForUser($user_id);
62
- $expiration_date = $user_level->enddate;
 
 
 
63
 
64
- //calculate days left
65
- $todays_date = current_time('timestamp');
 
66
  $time_left = $expiration_date - $todays_date;
67
 
68
- //time left?
69
- if($time_left > 0)
70
- {
71
- //convert to days and add to the expiration date (assumes expiration was 1 year)
72
- $days_left = floor($time_left/(60*60*24));
73
 
74
- //figure out days based on period
75
- if($level->expiration_period == "Day")
76
  $total_days = $days_left + $level->expiration_number;
77
- elseif($level->expiration_period == "Week")
78
  $total_days = $days_left + $level->expiration_number * 7;
79
- elseif($level->expiration_period == "Month")
80
  $total_days = $days_left + $level->expiration_number * 30;
81
- elseif($level->expiration_period == "Year")
82
  $total_days = $days_left + $level->expiration_number * 365;
 
83
 
84
- //update number and period
85
  $level->expiration_number = $total_days;
86
- $level->expiration_period = "Day";
87
  }
88
  }
89
 
90
  return $level;
91
  }
92
- add_filter("pmpro_ipnhandler_level", "pmpro_ipnhandler_level_extend_memberships", 10, 2);
93
 
94
  /*
95
  If checking out for the same level, keep your old startdate.
96
  Added with 1.5.5
97
  */
98
- function pmpro_checkout_start_date_keep_startdate($startdate, $user_id, $level)
99
- {
100
- if(pmpro_hasMembershipLevel($level->id, $user_id))
101
- {
102
  global $wpdb;
103
- $sqlQuery = "SELECT startdate FROM $wpdb->pmpro_memberships_users WHERE user_id = '" . esc_sql($user_id) . "' AND membership_id = '" . esc_sql($level->id) . "' AND status = 'active' ORDER BY id DESC LIMIT 1";
104
- $old_startdate = $wpdb->get_var($sqlQuery);
105
-
106
- if(!empty($old_startdate))
107
  $startdate = "'" . $old_startdate . "'";
 
108
  }
109
-
110
  return $startdate;
111
  }
112
- add_filter("pmpro_checkout_start_date", "pmpro_checkout_start_date_keep_startdate", 10, 3);
113
 
114
  /*
115
  Stripe Lite Pulled into Core Plugin
116
  */
117
- //Stripe Lite, Set the Globals/etc
118
- $stripe_billingaddress = pmpro_getOption("stripe_billingaddress");
119
- if(empty($stripe_billingaddress))
120
- {
121
  global $pmpro_stripe_lite;
122
  $pmpro_stripe_lite = true;
123
- add_filter("pmpro_stripe_lite", "__return_true");
124
- add_filter("pmpro_required_billing_fields", "pmpro_required_billing_fields_stripe_lite");
125
  }
126
 
127
- //Stripe Lite, Don't Require Billing Fields
128
- function pmpro_required_billing_fields_stripe_lite($fields)
129
- {
130
  global $gateway;
131
-
132
- //ignore if not using stripe
133
- if($gateway != "stripe")
134
  return $fields;
135
-
136
- //some fields to remove
137
- $remove = array('bfirstname', 'blastname', 'baddress1', 'bcity', 'bstate', 'bzipcode', 'bphone', 'bcountry', 'CardType');
138
-
139
- //if a user is logged in, don't require bemail either
 
140
  global $current_user;
141
- if(!empty($current_user->user_email))
142
  $remove[] = 'bemail';
143
-
144
- //remove the fields
145
- foreach($remove as $field)
146
- unset($fields[$field]);
147
-
148
- //ship it!
 
 
149
  return $fields;
150
  }
151
 
152
- //copy other discount code to discount code if latter is not set
153
- if(empty($_REQUEST['discount_code']) && !empty($_REQUEST['other_discount_code']))
154
- {
155
  $_REQUEST['discount_code'] = $_REQUEST['other_discount_code'];
156
  $_POST['discount_code'] = $_POST['other_discount_code'];
157
  $_GET['discount_code'] = $_GET['other_discount_code'];
158
  }
159
 
160
- //apply all the_content filters to confirmation messages for levels
161
- function pmpro_pmpro_confirmation_message($message) {
162
- return apply_filters('the_content', $message);
163
  }
164
- add_filter('pmpro_confirmation_message', 'pmpro_pmpro_confirmation_message');
165
 
166
- //apply all the_content filters to level descriptions
167
- function pmpro_pmpro_level_description($description) {
168
- return apply_filters('the_content', $description);
169
  }
170
- add_filter('pmpro_level_description', 'pmpro_pmpro_level_description');
171
 
172
  /*
173
  PayPal doesn't allow start dates > 1 year out.
174
  So if we detect that, let's try to squeeze some of
175
  that time into a trial.
176
-
177
  Otherwise, let's cap at 1 year out.
178
-
179
  Note that this affects PayPal Standard as well, but the fix
180
  for that flavor of PayPal is different and may be included in future
181
  updates.
182
  */
183
- function pmpro_pmpro_subscribe_order_startdate_limit($order, $gateway) {
184
- $affected_gateways = array('paypalexpress', 'paypal');
185
-
186
- if(in_array($gateway->gateway, $affected_gateways)) {
187
- $original_start_date = strtotime($order->ProfileStartDate, current_time('timestamp'));
188
- $one_year_out = strtotime('+1 Year', current_time('timestamp'));
189
- $two_years_out = strtotime('+2 Year', current_time('timestamp'));
190
- $one_year_out_date = date_i18n('Y-m-d', $one_year_out) . 'T0:0:0';
191
- if(!empty($order->ProfileStartDate) && $order->ProfileStartDate > $one_year_out_date) {
192
- //try to squeeze into the trial
193
- if(empty($order->TrialBillingPeriod)) {
194
- //update the order
195
  $order->TrialAmount = 0;
196
  $order->TrialBillingPeriod = 'Day';
197
- $order->TrialBillingFrequency = min(365, strtotime($order->ProfileStartDate, current_time('timestamp')));
198
  $order->TrialBillingCycles = 1;
199
  }
200
-
201
- //max out at 1 year out no matter what
202
  $order->ProfileStartDate = $one_year_out_date;
203
-
204
- //if we were going to try to push it more than 2 years out, let's notify the admin
205
- if(!empty($order->TrialBillilngPeriod) || $original_start_date > $two_years_out) {
206
- //setup user data
207
  global $current_user;
208
- if(empty($order->user_id))
209
  $order->user_id = $current_user->ID;
 
210
  $order->getUser();
211
-
212
- //get level data
213
- $level = pmpro_getLevel($order->membership_id);
214
-
215
- //create email
216
  $pmproemail = new PMProEmail();
217
- $body = '<p>' . __("There was a potential issue while setting the 'Profile Start Date' for a user's subscription at checkout. PayPal does not allow one to set a Profile Start Date further than 1 year out. Typically, this is not an issue, but sometimes a combination of custom code or add ons for PMPro (e.g. the Prorating or Auto-renewal Checkbox add ons) will try to set a Profile Start Date out past 1 year in order to respect an existing user's original expiration date before they checked out. The user's information is below. PMPro has allowed the checkout and simply restricted the Profile Start Date to 1 year out with a possible additional free Trial of up to 1 year. You should double check this information to determine if maybe the user has overpaid or otherwise needs to be addressed. If you get many of these emails, you should consider adjusting your custom code to avoid these situations.", 'paid-memberships-pro') . '</p>';
218
- $body .= '<p>' . sprintf(__("User: %s<br />Email: %s<br />Membership Level: %s<br />Order #: %s<br />Original Profile Start Date: %s<br />Adjusted Profile Start Date: %s<br />Trial Period: %s<br />Trial Frequency: %s<br />", 'paid-memberships-pro'), $order->user->user_nicename, $order->user->user_email, $level->name, $order->code, date('c', $original_start_date), $one_year_out_date, $order->TrialBillingPeriod, $order->TrialBillingFrequency) . '</p>';
219
  $pmproemail->template = 'profile_start_date_limit_check';
220
- $pmproemail->subject = sprintf(__('Profile Start Date Issue Detected and Fixed at %s', 'paid-memberships-pro'), get_bloginfo('name'));
221
- $pmproemail->data = array('body'=>$body);
222
- $pmproemail->sendEmail(get_bloginfo("admin_email"));
223
  }
224
  }
225
  }
226
-
227
  return $order;
228
  }
229
- add_filter('pmpro_subscribe_order', 'pmpro_pmpro_subscribe_order_startdate_limit', 99, 2);
230
 
7
  If checking out for the same level, add remaining days to the enddate.
8
  Pulled in from: https://gist.github.com/3678054
9
  */
10
+ function pmpro_checkout_level_extend_memberships( $level ) {
 
11
  global $pmpro_msg, $pmpro_msgt;
12
 
13
+ // does this level expire? are they an existing user of this level?
14
+ if ( ! empty( $level ) && ! empty( $level->expiration_number ) && pmpro_hasMembershipLevel( $level->id ) ) {
15
+ // get the current enddate of their membership
 
16
  global $current_user;
17
+ $user_level = pmpro_getSpecificMembershipLevelForUser( $current_user->ID, $level->id );
18
 
19
+ // bail if their existing level doesn't have an end date
20
+ if ( empty( $user_level ) || empty( $user_level->enddate ) ) {
21
+ return $level;
22
+ }
23
+
24
+ // calculate days left
25
+ $todays_date = current_time( 'timestamp' );
26
+ $expiration_date = $user_level->enddate;
27
  $time_left = $expiration_date - $todays_date;
28
 
29
+ // time left?
30
+ if ( $time_left > 0 ) {
31
+ // convert to days and add to the expiration date (assumes expiration was 1 year)
32
+ $days_left = floor( $time_left / ( 60 * 60 * 24 ) );
 
33
 
34
+ // figure out days based on period
35
+ if ( $level->expiration_period == 'Day' ) {
36
  $total_days = $days_left + $level->expiration_number;
37
+ } elseif ( $level->expiration_period == 'Week' ) {
38
  $total_days = $days_left + $level->expiration_number * 7;
39
+ } elseif ( $level->expiration_period == 'Month' ) {
40
  $total_days = $days_left + $level->expiration_number * 30;
41
+ } elseif ( $level->expiration_period == 'Year' ) {
42
  $total_days = $days_left + $level->expiration_number * 365;
43
+ }
44
 
45
+ // update number and period
46
  $level->expiration_number = $total_days;
47
+ $level->expiration_period = 'Day';
48
  }
49
  }
50
 
51
  return $level;
52
  }
53
+ add_filter( 'pmpro_checkout_level', 'pmpro_checkout_level_extend_memberships' );
54
  /*
55
  Same thing as above but when processed by the ipnhandler for PayPal standard.
56
  */
57
+ function pmpro_ipnhandler_level_extend_memberships( $level, $user_id ) {
 
58
  global $pmpro_msg, $pmpro_msgt;
59
 
60
+ // does this level expire? are they an existing user of this level?
61
+ if ( ! empty( $level ) && ! empty( $level->expiration_number ) && pmpro_hasMembershipLevel( $level->id, $user_id ) ) {
62
+ // get the current enddate of their membership
63
+ $user_level = pmpro_getSpecificMembershipLevelForUser( $current_user->ID, $level->id );
64
+
65
+ // bail if their existing level doesn't have an end date
66
+ if ( empty( $user_level ) || empty( $user_level->enddate ) ) {
67
+ return $level;
68
+ }
69
 
70
+ // calculate days left
71
+ $todays_date = current_time( 'timestamp' );
72
+ $expiration_date = $user_level->enddate;
73
  $time_left = $expiration_date - $todays_date;
74
 
75
+ // time left?
76
+ if ( $time_left > 0 ) {
77
+ // convert to days and add to the expiration date (assumes expiration was 1 year)
78
+ $days_left = floor( $time_left / ( 60 * 60 * 24 ) );
 
79
 
80
+ // figure out days based on period
81
+ if ( $level->expiration_period == 'Day' ) {
82
  $total_days = $days_left + $level->expiration_number;
83
+ } elseif ( $level->expiration_period == 'Week' ) {
84
  $total_days = $days_left + $level->expiration_number * 7;
85
+ } elseif ( $level->expiration_period == 'Month' ) {
86
  $total_days = $days_left + $level->expiration_number * 30;
87
+ } elseif ( $level->expiration_period == 'Year' ) {
88
  $total_days = $days_left + $level->expiration_number * 365;
89
+ }
90
 
91
+ // update number and period
92
  $level->expiration_number = $total_days;
93
+ $level->expiration_period = 'Day';
94
  }
95
  }
96
 
97
  return $level;
98
  }
99
+ add_filter( 'pmpro_ipnhandler_level', 'pmpro_ipnhandler_level_extend_memberships', 10, 2 );
100
 
101
  /*
102
  If checking out for the same level, keep your old startdate.
103
  Added with 1.5.5
104
  */
105
+ function pmpro_checkout_start_date_keep_startdate( $startdate, $user_id, $level ) {
106
+ if ( pmpro_hasMembershipLevel( $level->id, $user_id ) ) {
 
 
107
  global $wpdb;
108
+ $sqlQuery = "SELECT startdate FROM $wpdb->pmpro_memberships_users WHERE user_id = '" . esc_sql( $user_id ) . "' AND membership_id = '" . esc_sql( $level->id ) . "' AND status = 'active' ORDER BY id DESC LIMIT 1";
109
+ $old_startdate = $wpdb->get_var( $sqlQuery );
110
+
111
+ if ( ! empty( $old_startdate ) ) {
112
  $startdate = "'" . $old_startdate . "'";
113
+ }
114
  }
115
+
116
  return $startdate;
117
  }
118
+ add_filter( 'pmpro_checkout_start_date', 'pmpro_checkout_start_date_keep_startdate', 10, 3 );
119
 
120
  /*
121
  Stripe Lite Pulled into Core Plugin
122
  */
123
+ // Stripe Lite, Set the Globals/etc
124
+ $stripe_billingaddress = pmpro_getOption( 'stripe_billingaddress' );
125
+ if ( empty( $stripe_billingaddress ) ) {
 
126
  global $pmpro_stripe_lite;
127
  $pmpro_stripe_lite = true;
128
+ add_filter( 'pmpro_stripe_lite', '__return_true' );
129
+ add_filter( 'pmpro_required_billing_fields', 'pmpro_required_billing_fields_stripe_lite' );
130
  }
131
 
132
+ // Stripe Lite, Don't Require Billing Fields
133
+ function pmpro_required_billing_fields_stripe_lite( $fields ) {
 
134
  global $gateway;
135
+
136
+ // ignore if not using stripe
137
+ if ( $gateway != 'stripe' ) {
138
  return $fields;
139
+ }
140
+
141
+ // some fields to remove
142
+ $remove = array( 'bfirstname', 'blastname', 'baddress1', 'bcity', 'bstate', 'bzipcode', 'bphone', 'bcountry', 'CardType' );
143
+
144
+ // if a user is logged in, don't require bemail either
145
  global $current_user;
146
+ if ( ! empty( $current_user->user_email ) ) {
147
  $remove[] = 'bemail';
148
+ }
149
+
150
+ // remove the fields
151
+ foreach ( $remove as $field ) {
152
+ unset( $fields[ $field ] );
153
+ }
154
+
155
+ // ship it!
156
  return $fields;
157
  }
158
 
159
+ // copy other discount code to discount code if latter is not set
160
+ if ( empty( $_REQUEST['discount_code'] ) && ! empty( $_REQUEST['other_discount_code'] ) ) {
 
161
  $_REQUEST['discount_code'] = $_REQUEST['other_discount_code'];
162
  $_POST['discount_code'] = $_POST['other_discount_code'];
163
  $_GET['discount_code'] = $_GET['other_discount_code'];
164
  }
165
 
166
+ // apply all the_content filters to confirmation messages for levels
167
+ function pmpro_pmpro_confirmation_message( $message ) {
168
+ return apply_filters( 'the_content', $message );
169
  }
170
+ add_filter( 'pmpro_confirmation_message', 'pmpro_pmpro_confirmation_message' );
171
 
172
+ // apply all the_content filters to level descriptions
173
+ function pmpro_pmpro_level_description( $description ) {
174
+ return apply_filters( 'the_content', $description );
175
  }
176
+ add_filter( 'pmpro_level_description', 'pmpro_pmpro_level_description' );
177
 
178
  /*
179
  PayPal doesn't allow start dates > 1 year out.
180
  So if we detect that, let's try to squeeze some of
181
  that time into a trial.
182
+
183
  Otherwise, let's cap at 1 year out.
184
+
185
  Note that this affects PayPal Standard as well, but the fix
186
  for that flavor of PayPal is different and may be included in future
187
  updates.
188
  */
189
+ function pmpro_pmpro_subscribe_order_startdate_limit( $order, $gateway ) {
190
+ $affected_gateways = array( 'paypalexpress', 'paypal' );
191
+
192
+ if ( in_array( $gateway->gateway, $affected_gateways ) ) {
193
+ $original_start_date = strtotime( $order->ProfileStartDate, current_time( 'timestamp' ) );
194
+ $one_year_out = strtotime( '+1 Year', current_time( 'timestamp' ) );
195
+ $two_years_out = strtotime( '+2 Year', current_time( 'timestamp' ) );
196
+ $one_year_out_date = date_i18n( 'Y-m-d', $one_year_out ) . 'T0:0:0';
197
+ if ( ! empty( $order->ProfileStartDate ) && $order->ProfileStartDate > $one_year_out_date ) {
198
+ // try to squeeze into the trial
199
+ if ( empty( $order->TrialBillingPeriod ) ) {
200
+ // update the order
201
  $order->TrialAmount = 0;
202
  $order->TrialBillingPeriod = 'Day';
203
+ $order->TrialBillingFrequency = min( 365, strtotime( $order->ProfileStartDate, current_time( 'timestamp' ) ) );
204
  $order->TrialBillingCycles = 1;
205
  }
206
+
207
+ // max out at 1 year out no matter what
208
  $order->ProfileStartDate = $one_year_out_date;
209
+
210
+ // if we were going to try to push it more than 2 years out, let's notify the admin
211
+ if ( ! empty( $order->TrialBillilngPeriod ) || $original_start_date > $two_years_out ) {
212
+ // setup user data
213
  global $current_user;
214
+ if ( empty( $order->user_id ) ) {
215
  $order->user_id = $current_user->ID;
216
+ }
217
  $order->getUser();
218
+
219
+ // get level data
220
+ $level = pmpro_getLevel( $order->membership_id );
221
+
222
+ // create email
223
  $pmproemail = new PMProEmail();
224
+ $body = '<p>' . __( "There was a potential issue while setting the 'Profile Start Date' for a user's subscription at checkout. PayPal does not allow one to set a Profile Start Date further than 1 year out. Typically, this is not an issue, but sometimes a combination of custom code or add ons for PMPro (e.g. the Prorating or Auto-renewal Checkbox add ons) will try to set a Profile Start Date out past 1 year in order to respect an existing user's original expiration date before they checked out. The user's information is below. PMPro has allowed the checkout and simply restricted the Profile Start Date to 1 year out with a possible additional free Trial of up to 1 year. You should double check this information to determine if maybe the user has overpaid or otherwise needs to be addressed. If you get many of these emails, you should consider adjusting your custom code to avoid these situations.", 'paid-memberships-pro' ) . '</p>';
225
+ $body .= '<p>' . sprintf( __( 'User: %1$s<br />Email: %2$s<br />Membership Level: %3$s<br />Order #: %4$s<br />Original Profile Start Date: %5$s<br />Adjusted Profile Start Date: %6$s<br />Trial Period: %7$s<br />Trial Frequency: %8$s<br />', 'paid-memberships-pro' ), $order->user->user_nicename, $order->user->user_email, $level->name, $order->code, date( 'c', $original_start_date ), $one_year_out_date, $order->TrialBillingPeriod, $order->TrialBillingFrequency ) . '</p>';
226
  $pmproemail->template = 'profile_start_date_limit_check';
227
+ $pmproemail->subject = sprintf( __( 'Profile Start Date Issue Detected and Fixed at %s', 'paid-memberships-pro' ), get_bloginfo( 'name' ) );
228
+ $pmproemail->data = array( 'body' => $body );
229
+ $pmproemail->sendEmail( get_bloginfo( 'admin_email' ) );
230
  }
231
  }
232
  }
233
+
234
  return $order;
235
  }
236
+ add_filter( 'pmpro_subscribe_order', 'pmpro_pmpro_subscribe_order_startdate_limit', 99, 2 );
237
 
includes/functions.php CHANGED
@@ -1,2673 +1,2621 @@
1
- <?php
2
- /****************************************************************
3
-
4
- IMPORTANT. PLEASE READ.
5
-
6
- DO NOT EDIT THIS FILE or any other file in the /wp-content/plugins/paid-memberships-pro/ directory.
7
- Doing so could break the PMPro plugin and/or keep you from upgrading this plugin in the future.
8
- We regularly release updates to the plugin, including important security fixes and new features.
9
- You want to be able to upgrade.
10
-
11
- If you were asked to insert code into "your functions.php file", it was meant that you edit the functions.php
12
- in the root folder of your active theme. e.g. /wp-content/themes/twentytwelve/functions.php
13
- You can also create a custom plugin to place customization code into. Instructions are here:
14
- http://www.paidmembershipspro.com/2012/08/create-a-plugin-for-pmpro-customizations/
15
-
16
- Further documentation for customizing Paid Memberships Pro can be found here:
17
- http://www.paidmembershipspro.com/documentation/
18
-
19
- ****************************************************************/
20
- if(!function_exists("sornot"))
21
- {
22
- function sornot($t, $n)
23
- {
24
- if($n == 1)
25
- return $t;
26
- else
27
- return $t . "s";
28
- }
29
- }
30
-
31
- //set up wpdb for the tables we need
32
- function pmpro_setDBTables()
33
- {
34
- global $wpdb;
35
- $wpdb->hide_errors();
36
- $wpdb->pmpro_membership_levels = $wpdb->prefix . 'pmpro_membership_levels';
37
- $wpdb->pmpro_memberships_users = $wpdb->prefix . 'pmpro_memberships_users';
38
- $wpdb->pmpro_memberships_categories = $wpdb->prefix . 'pmpro_memberships_categories';
39
- $wpdb->pmpro_memberships_pages = $wpdb->prefix . 'pmpro_memberships_pages';
40
- $wpdb->pmpro_membership_orders = $wpdb->prefix . 'pmpro_membership_orders';
41
- $wpdb->pmpro_discount_codes = $wpdb->prefix . 'pmpro_discount_codes';
42
- $wpdb->pmpro_discount_codes_levels = $wpdb->prefix . 'pmpro_discount_codes_levels';
43
- $wpdb->pmpro_discount_codes_uses = $wpdb->prefix . 'pmpro_discount_codes_uses';
44
- $wpdb->pmpro_membership_levelmeta = $wpdb->prefix . 'pmpro_membership_levelmeta';
45
- }
46
- pmpro_setDBTables();
47
-
48
- //from: http://stackoverflow.com/questions/5266945/wordpress-how-detect-if-current-page-is-the-login-page/5892694#5892694
49
- function pmpro_is_login_page() {
50
- return (in_array($GLOBALS['pagenow'], array('wp-login.php', 'wp-register.php')) || is_page("login"));
51
- }
52
-
53
- //thanks: http://wordpress.org/support/topic/is_plugin_active
54
- function pmpro_is_plugin_active( $plugin ) {
55
- return in_array( $plugin, (array) get_option( 'active_plugins', array() ) );
56
- }
57
-
58
- //scraping - override n if you have more than 1 group of matches and don't want the first group
59
- function pmpro_getMatches($p, $s, $firstvalue = FALSE, $n = 1)
60
- {
61
- $ok = preg_match_all($p, $s, $matches);
62
-
63
- if(!$ok)
64
- return false;
65
- else
66
- {
67
- if($firstvalue)
68
- return $matches[$n][0];
69
- else
70
- return $matches[$n];
71
- }
72
- }
73
-
74
- function pmpro_br2nl($text, $tags = "br")
75
- {
76
- if(!is_array($tags))
77
- $tags = explode(" ", $tags);
78
-
79
- foreach($tags as $tag)
80
- {
81
- $text = preg_replace("/<{$tag}[^>]*>/", "\n", $text);
82
- $text = preg_replace("/<\/{$tag}[^>]*>/", "\n", $text);
83
- }
84
-
85
- return($text);
86
- }
87
-
88
- function pmpro_getOption($s, $force = false)
89
- {
90
- if(get_option("pmpro_" . $s))
91
- return get_option("pmpro_" . $s);
92
- else
93
- return "";
94
- }
95
-
96
- function pmpro_setOption($s, $v = NULL, $sanitize_function = 'sanitize_text_field')
97
- {
98
- //no value is given, set v to the p var
99
- if($v === NULL && isset($_POST[$s]))
100
- {
101
- if(is_array($_POST[$s]))
102
- $v = array_map($sanitize_function, $_POST[$s]);
103
- else
104
- $v = call_user_func($sanitize_function, $_POST[$s]);
105
- }
106
-
107
- if(is_array($v))
108
- $v = implode(",", $v);
109
- else
110
- $v = trim($v);
111
-
112
- return update_option("pmpro_" . $s, $v);
113
- }
114
-
115
- function pmpro_get_slug($post_id)
116
- {
117
- global $pmpro_slugs, $wpdb;
118
-
119
- //make sure post id is int for security
120
- $post_id = intval($post_id);
121
-
122
- if(!$pmpro_slugs[$post_id])
123
- $pmpro_slugs[$post_id] = $wpdb->get_var("SELECT post_name FROM $wpdb->posts WHERE ID = '" . $post_id . "' LIMIT 1");
124
-
125
- return $pmpro_slugs[$post_id];
126
- }
127
-
128
- function pmpro_url($page = NULL, $querystring = "", $scheme = NULL)
129
- {
130
- global $besecure;
131
- $besecure = apply_filters("besecure", $besecure);
132
-
133
- if(!$scheme && $besecure)
134
- $scheme = "https";
135
- elseif(!$scheme)
136
- $scheme = "http";
137
-
138
- if(!$page)
139
- $page = "levels";
140
-
141
- global $pmpro_pages;
142
-
143
- //start with the permalink
144
- $url = get_permalink($pmpro_pages[$page]);
145
-
146
- //WPML/etc support
147
- if(function_exists("icl_object_id") && defined("ICL_LANGUAGE_CODE"))
148
- {
149
- $trans_id = icl_object_id($pmpro_pages[$page], "page", false, ICL_LANGUAGE_CODE);
150
- if(!empty($trans_id))
151
- {
152
- $url = get_permalink($trans_id);
153
- }
154
- }
155
-
156
- //figure out querystring
157
- $querystring = str_replace("?", "", $querystring);
158
- parse_str( $querystring, $query_args );
159
-
160
- if(!empty($url)) {
161
-
162
- $url = esc_url_raw( add_query_arg( $query_args, $url ) );
163
-
164
- //figure out scheme
165
- if(is_ssl())
166
- $url = str_replace("http:", "https:", $url);
167
- }
168
-
169
- return $url;
170
- }
171
-
172
- function pmpro_isLevelFree(&$level)
173
- {
174
- if(!empty($level) && $level->initial_payment <= 0 && $level->billing_amount <= 0 && $level->trial_amount <= 0)
175
- return true;
176
- else
177
- return false;
178
- }
179
-
180
- // Given an array of levels, will return true if all of them are free.
181
- function pmpro_areLevelsFree($levelarr) {
182
- if(! is_array($levelarr)) { return false; }
183
- foreach($levelarr as $curlevel) {
184
- if(!empty($curlevel) && ($curlevel->initial_payment > 0 || $curlevel->billing_amount > 0 || $curlevel->trial_amount > 0)) {
185
- return false;
186
- }
187
- }
188
- return true;
189
- }
190
-
191
- function pmpro_isLevelRecurring(&$level)
192
- {
193
- if(!empty($level) && ($level->billing_amount > 0 || $level->trial_amount > 0))
194
- return true;
195
- else
196
- return false;
197
- }
198
-
199
- function pmpro_isLevelTrial(&$level)
200
- {
201
- if(!empty($level) && !empty($level->trial_limit) && $level->trial_limit > 0)
202
- {
203
- return true;
204
- }
205
- else
206
- return false;
207
- }
208
-
209
- function pmpro_isLevelExpiring(&$level)
210
- {
211
- if(!empty($level) && (!empty($level->expiration_number) && $level->expiration_number > 0) || !empty($level->enddate))
212
- return true;
213
- else
214
- return false;
215
- }
216
-
217
- /**
218
- * Is this level expiring within one pay period
219
- *
220
- * @since 1.8.6.3
221
- *
222
- * @param object $level PMPro Level Object to test
223
- */
224
- function pmpro_isLevelExpiringSoon( &$level ) {
225
- if( !pmpro_isLevelExpiring( $level ) || empty( $level->enddate ) )
226
- $r = false;
227
- else {
228
- //days til expiration for the standard level
229
- $standard = pmpro_getLevel( $level->id );
230
-
231
- if( !empty( $standard->expiration_number ) ){
232
- if( $standard->expiration_period == 'Day' )
233
- $days = $level->expiration_number;
234
- elseif( $standard->expiration_period == 'Week' )
235
- $days = $level->expiration_number * 7;
236
- elseif( $standard->expiration_period == 'Month' )
237
- $days = $level->expiration_number * 30;
238
- elseif( $standard->expiration_period == 'Year' )
239
- $days = $level->expiration_number * 365;
240
- }
241
- else
242
- $days = 30;
243
-
244
- //are we within the days til expiration?
245
- $now = current_time('timestamp');
246
-
247
- if( $now + ($days*3600*24) >= $level->enddate )
248
- $r = true;
249
- else
250
- $r = false;
251
- }
252
-
253
- //filter
254
- $r = apply_filters('pmpro_is_level_expiring_soon', $r, $level);
255
-
256
- return $r;
257
- }
258
-
259
- /**
260
- * Loads a template from one of the default paths (PMPro plugin or theme), or from filtered path
261
- *
262
- * @param null $page_name - Name of the page/template
263
- * @param string $where - `local` or `url` (whether to load from FS or over http)
264
- * @param string $type - Type of template (valid: 'email' or 'pages', 'adminpages', 'preheader')
265
- * @param string $ext - File extension ('php', 'html', 'htm', etc)
266
- * @return string - The HTML for the template.
267
- *
268
- * TODO - Allow localized template files to be loaded?
269
- *
270
- * @since 1.8.9
271
- */
272
- function pmpro_loadTemplate($page_name = null, $where = 'local', $type = 'pages', $ext = 'php' )
273
- {
274
- // called from page handler shortcode
275
- if (is_null($page_name))
276
- {
277
- global $pmpro_page_name;
278
- $page_name = $pmpro_page_name;
279
- }
280
-
281
- if ($where == 'local') {
282
- // template paths in order of priority (array gets reversed)
283
- $default_templates = array(
284
- PMPRO_DIR . "/{$type}/{$page_name}.{$ext}", // default plugin path
285
- get_template_directory() . "/paid-memberships-pro/{$type}/{$page_name}.{$ext}", // parent theme
286
- get_stylesheet_directory() . "/paid-memberships-pro/{$type}/{$page_name}.{$ext}", // child / active theme
287
- );
288
- } elseif( $where == 'url' ) {
289
- // template paths in order of priority (array gets reversed)
290
- $default_templates = array(
291
- PMPRO_URL . "/{$type}/{$page_name}.{$ext}", // default plugin path
292
- get_template_directory_uri() . "/paid-memberships-pro/{$type}/{$page_name}.{$ext}", // parent theme
293
- get_stylesheet_directory_uri() . "/paid-memberships-pro/{$type}/{$page_name}.{$ext}", // child / active theme
294
- );
295
-
296
- }
297
- // Valid types: 'email', 'pages'
298
- $templates = apply_filters("pmpro_{$type}_custom_template_path", $default_templates, $page_name, $type, $where, $ext);
299
- $user_templates = array_diff($templates, $default_templates);
300
-
301
- //user specified a custom template path, so it has priority.
302
- if (!empty($user_templates))
303
- $templates = $user_templates;
304
-
305
- //last element included in the array is the most first one we try to load
306
- $templates = array_reverse($templates);
307
-
308
- // look for template file to include
309
- ob_start();
310
- foreach($templates as $template_path)
311
- {
312
- // If loading a local file, check if it exists first
313
- if($where == 'url' || file_exists($template_path))
314
- {
315
- include $template_path;
316
- break;
317
- }
318
- }
319
- $template = ob_get_clean();
320
-
321
- // return template content
322
- return $template;
323
- }
324
-
325
- function pmpro_getLevelCost(&$level, $tags = true, $short = false)
326
- {
327
- //initial payment
328
- if(!$short)
329
- $r = sprintf(__('The price for membership is <strong>%s</strong> now', 'paid-memberships-pro' ), pmpro_formatPrice($level->initial_payment));
330
- else
331
- $r = sprintf(__('<strong>%s</strong> now', 'paid-memberships-pro' ), pmpro_formatPrice($level->initial_payment));
332
-
333
- //recurring part
334
- if($level->billing_amount != '0.00')
335
- {
336
- if($level->billing_limit > 1)
337
- {
338
- if($level->cycle_number == '1')
339
- {
340
- $r .= sprintf(__(' and then <strong>%s per %s for %d more %s</strong>.', 'paid-memberships-pro' ), pmpro_formatPrice($level->billing_amount), pmpro_translate_billing_period($level->cycle_period), $level->billing_limit, pmpro_translate_billing_period($level->cycle_period, $level->billing_limit));
341
- }
342
- else
343
- {
344
- $r .= sprintf(__(' and then <strong>%s every %d %s for %d more payments</strong>.', 'paid-memberships-pro' ), pmpro_formatPrice($level->billing_amount), $level->cycle_number, pmpro_translate_billing_period($level->cycle_period, $level->cycle_number), $level->billing_limit);
345
- }
346
- }
347
- elseif($level->billing_limit == 1)
348
- {
349
- $r .= sprintf(__(' and then <strong>%s after %d %s</strong>.', 'paid-memberships-pro' ), pmpro_formatPrice($level->billing_amount), $level->cycle_number, pmpro_translate_billing_period($level->cycle_period, $level->cycle_number));
350
- }
351
- else
352
- {
353
- if( $level->billing_amount === $level->initial_payment ) {
354
- if($level->cycle_number == '1')
355
- {
356
- if(!$short)
357
- $r = sprintf(__('The price for membership is <strong>%s per %s</strong>.', 'paid-memberships-pro' ), pmpro_formatPrice($level->initial_payment), pmpro_translate_billing_period($level->cycle_period) );
358
- else
359
- $r = sprintf(__('<strong>%s per %s</strong>.', 'paid-memberships-pro' ), pmpro_formatPrice($level->initial_payment), pmpro_translate_billing_period($level->cycle_period) );
360
- }
361
- else
362
- {
363
- if(!$short)
364
- $r = sprintf(__('The price for membership is <strong>%s every %d %s</strong>.', 'paid-memberships-pro' ), pmpro_formatPrice($level->initial_payment), $level->cycle_number, pmpro_translate_billing_period($level->cycle_period, $level->cycle_number) );
365
- else
366
- $r = sprintf(__('<strong>%s every %d %s</strong>.', 'paid-memberships-pro' ), pmpro_formatPrice($level->initial_payment), $level->cycle_number, pmpro_translate_billing_period($level->cycle_period, $level->cycle_number) );
367
- }
368
- } else {
369
- if($level->cycle_number == '1')
370
- {
371
- $r .= sprintf(__(' and then <strong>%s per %s</strong>.', 'paid-memberships-pro' ), pmpro_formatPrice($level->billing_amount), pmpro_translate_billing_period($level->cycle_period));
372
- }
373
- else
374
- {
375
- $r .= sprintf(__(' and then <strong>%s every %d %s</strong>.', 'paid-memberships-pro' ), pmpro_formatPrice($level->billing_amount), $level->cycle_number, pmpro_translate_billing_period($level->cycle_period, $level->cycle_number));
376
- }
377
- }
378
- }
379
- }
380
- else
381
- $r .= '.';
382
-
383
- //add a space
384
- $r .= ' ';
385
-
386
- //trial part
387
- if($level->trial_limit)
388
- {
389
- if($level->trial_amount == '0.00')
390
- {
391
- if($level->trial_limit == '1')
392
- {
393
- $r .= ' ' . __('After your initial payment, your first payment is Free.', 'paid-memberships-pro' );
394
- }
395
- else
396
- {
397
- $r .= ' ' . sprintf(__('After your initial payment, your first %d payments are Free.', 'paid-memberships-pro' ), $level->trial_limit);
398
- }
399
- }
400
- else
401
- {
402
- if($level->trial_limit == '1')
403
- {
404
- $r .= ' ' . sprintf(__('After your initial payment, your first payment will cost %s.', 'paid-memberships-pro' ), pmpro_formatPrice($level->trial_amount));
405
- }
406
- else
407
- {
408
- $r .= ' ' . sprintf(__('After your initial payment, your first %d payments will cost %s.', 'paid-memberships-pro' ), $level->trial_limit, pmpro_formatPrice($level->trial_amount));
409
- }
410
- }
411
- }
412
-
413
- //taxes part
414
- $tax_state = pmpro_getOption("tax_state");
415
- $tax_rate = pmpro_getOption("tax_rate");
416
-
417
- if($tax_state && $tax_rate && !pmpro_isLevelFree($level))
418
- {
419
- $r .= sprintf(__('Customers in %s will be charged %s%% tax.', 'paid-memberships-pro' ), $tax_state, round($tax_rate * 100, 2));
420
- }
421
-
422
- if(!$tags)
423
- $r = strip_tags($r);
424
-
425
- $r = apply_filters("pmpro_level_cost_text", $r, $level, $tags, $short); //passing $tags and $short since v1.8
426
- return $r;
427
- }
428
-
429
- // Similar to pmpro_getLevelCost, but loops through all levels in the incoming array and puts it all together.
430
- function pmpro_getLevelsCost(&$levels, $tags = true, $short = false)
431
- {
432
- // let's build the array to work from to consolidate recurring info.
433
- // recurpmts[cycle_period][cycle_number][billing_limit] = total_amount
434
- $initpmt = 0;
435
- $recurpmts = array();
436
- $trialperiods = 0;
437
- foreach($levels as $curlevel) {
438
- $initpmt += $curlevel->initial_payment;
439
- if($curlevel->billing_amount != '0.00') {
440
- if(array_key_exists($curlevel->cycle_period, $recurpmts)) {
441
- if(array_key_exists($curlevel->cycle_number, $recurpmts[$curlevel->cycle_period])) {
442
- if(array_key_exists($curlevel->billing_limit, $recurpmts[$curlevel->cycle_period][$curlevel->cycle_number])) {
443
- $recurpmts[$curlevel->cycle_period][$curlevel->cycle_number][$curlevel->billing_limit] += $curlevel->billing_amount;
444
- } else {
445
- $recurpmts[$curlevel->cycle_period][$curlevel->cycle_number][$curlevel->billing_limit] = $curlevel->billing_amount;
446
- }
447
- } else {
448
- $recurpmts[$curlevel->cycle_period][$curlevel->cycle_number] = array();
449
- $recurpmts[$curlevel->cycle_period][$curlevel->cycle_number][$curlevel->billing_limit] = $curlevel->billing_amount;
450
- }
451
- } else {
452
- $recurpmts[$curlevel->cycle_period] = array();
453
- $recurpmts[$curlevel->cycle_period][$curlevel->cycle_number] = array();
454
- $recurpmts[$curlevel->cycle_period][$curlevel->cycle_number][$curlevel->billing_limit] = $curlevel->billing_amount;
455
- }
456
- }
457
- if($curlevel->trial_limit && intval($curlevel->trial_limit)>$trialperiods) {
458
- $trialperiods = intval($curlevel->trial_limit);
459
- }
460
- }
461
-
462
- // initial payment
463
- if(!$short)
464
- $r = sprintf(__('The price for membership is <strong>%s</strong> now', 'paid-memberships-pro' ), pmpro_formatPrice($initpmt));
465
- else
466
- $r = sprintf(__('<strong>%s</strong> now', 'paid-memberships-pro' ), pmpro_formatPrice($initpmt));
467
-
468
- //recurring part
469
- $billtextparts = array();
470
- if(count($recurpmts)>0) {
471
- foreach($recurpmts as $curperiod => $curpddata) {
472
- foreach($curpddata as $curcyclenum => $curcycledata) {
473
- foreach($curcycledata as $curbilllimit => $curtotal) {
474
- if($curbilllimit > 1)
475
- {
476
- if($curcyclenum == '1')
477
- {
478
- $billtextparts[] = sprintf(__('<strong>%s per %s for %d more %s</strong>', 'paid-memberships-pro' ), pmpro_formatPrice($curtotal), pmpro_translate_billing_period($curperiod), $curbilllimit, pmpro_translate_billing_period($curperiod, $curbilllimit));
479
- }
480
- else
481
- {
482
- $billtextparts[] = sprintf(__('<strong>%s every %d %s for %d more payments</strong>', 'paid-memberships-pro' ), pmpro_formatPrice($curtotal), $curcyclenum, pmpro_translate_billing_period($curperiod, $curcyclenum), $curbilllimit);
483
- }
484
- }
485
- elseif($curbilllimit == 1)
486
- {
487
- $billtextparts[] = sprintf(__('<strong>%s after %d %s</strong>', 'paid-memberships-pro' ), pmpro_formatPrice($curtotal), $curcyclenum, pmpro_translate_billing_period($curperiod, $curcyclenum));
488
- }
489
- else
490
- {
491
- if($curcyclenum == '1')
492
- {
493
- $billtextparts[] = sprintf(__('<strong>%s every %s</strong>', 'paid-memberships-pro' ), pmpro_formatPrice($curtotal), pmpro_translate_billing_period($curperiod));
494
- }
495
- else
496
- {
497
- $billtextparts[] = sprintf(__('<strong>%s every %d %s</strong>', 'paid-memberships-pro' ), pmpro_formatPrice($curtotal), $curcyclenum, pmpro_translate_billing_period($curperiod, $curcyclenum));
498
- }
499
- }
500
- }
501
- }
502
- }
503
- $laststanza = array_pop($billtextparts);
504
- if(count($billtextparts)>0) {
505
- $r .= ", ";
506
- $r .= implode(', ', $billtextparts);
507
- }
508
- $r .= ", and ".$laststanza.".";
509
- } else {
510
- $r .= ".";
511
- }
512
-
513
-
514
- //add a space
515
- $r .= ' ';
516
-
517
- //trial part - not as detailed as the single-level counterpart. Could be improved in the future.
518
- if($trialperiods>0) {
519
- if($trialperiods==1) {
520
- $r .= __('Trial pricing has been applied to the first payment.', 'mmpu');
521
- } else {
522
- $r .= sprintf(__('Trial pricing has been applied to the first %d payments.', 'mmpu'), $trialperiods);
523
- }
524
- }
525
-
526
- //taxes part
527
- $tax_state = pmpro_getOption("tax_state");
528
- $tax_rate = pmpro_getOption("tax_rate");
529
-
530
- if($tax_state && $tax_rate && !pmpro_areLevelsFree($levels))
531
- {
532
- $r .= sprintf(__('Customers in %s will be charged %s%% tax.', 'paid-memberships-pro' ), $tax_state, round($tax_rate * 100, 2));
533
- }
534
-
535
- if(!$tags)
536
- $r = strip_tags($r);
537
-
538
- /**
539
- * Filter the levels cost text. Note the s in levels. Similar to pmpro_levels_cost_text
540
- */
541
- $r = apply_filters("pmpro_levels_cost_text", $r, $levels, $tags, $short);
542
- return $r;
543
- }
544
-
545
- function pmpro_getLevelExpiration(&$level)
546
- {
547
- if($level->expiration_number)
548
- {
549
- $expiration_text = sprintf(__("Membership expires after %d %s.", 'paid-memberships-pro' ), $level->expiration_number, pmpro_translate_billing_period($level->expiration_period, $level->expiration_number));
550
- }
551
- else
552
- $expiration_text = "";
553
-
554
- $expiration_text = apply_filters("pmpro_levels_expiration_text", $expiration_text, $level);
555
- $expiration_text = apply_filters("pmpro_level_expiration_text", $expiration_text, $level); // Backwards compatible
556
- return $expiration_text;
557
- }
558
-
559
- function pmpro_getLevelsExpiration(&$levels)
560
- {
561
- $expirystrings = array();
562
- $ongoinglevelnum = 0;
563
- if(!empty($levels) && !is_array($levels)) { $levels = array($levels); } elseif(empty($levels)) { $levels = array(); }
564
- foreach($levels as $curlevel) {
565
- if($curlevel->expiration_number) {
566
- $expirystrings[] = sprintf(__("%s membership expires after %d %s", 'paid-memberships-pro' ), $curlevel->name, $curlevel->expiration_number, pmpro_translate_billing_period($curlevel->expiration_period, $curlevel->expiration_number));
567
- } else {
568
- $ongoinglevelnum++;
569
- }
570
- }
571
-
572
- $expiration_text = "";
573
- if(count($expirystrings)>0) {
574
- $laststanza = array_pop($expirystrings);
575
- $expiration_text = implode(', ', $expirystrings);
576
- if(count($expirystrings)>0) { $expiration_text .= ", and "; }
577
- $expiration_text .= $laststanza;
578
- $expiration_text .= ". ";
579
- if($ongoinglevelnum>0) {
580
- $expiration_text .= "The remaining membership";
581
- if($ongoinglevelnum>1) { $expiration_text .= "s are"; } else { $expiration_text .= " is"; }
582
- $expiration_text .= " ongoing.";
583
- }
584
- }
585
-
586
- /**
587
- * Filter the levels expiration text. Note the s in levels. Similar to pmpro_levels_expiration_text
588
- */
589
- $expiration_text = apply_filters("pmpro_levels_expiration_text", $expiration_text, $levels);
590
- $expiration_text = apply_filters("pmpro_level_expiration_text", $expiration_text, $levels); // Backwards compatible
591
- return $expiration_text;
592
- }
593
-
594
- /**
595
- * pmpro_membership_level Meta Functions
596
- *
597
- * @ssince 1.8.6.5
598
- */
599
- function add_pmpro_membership_level_meta($level_id, $meta_key, $meta_value, $unique = false) {
600
- return add_metadata('pmpro_membership_level', $level_id, $meta_key, $meta_value, $unique);
601
- }
602
-
603
- function get_pmpro_membership_level_meta($level_id, $key, $single = false) {
604
- return get_metadata('pmpro_membership_level', $level_id, $key, $single);
605
- }
606
-
607
- function update_pmpro_membership_level_meta($level_id, $meta_key, $meta_value, $prev_value = '') {
608
- return update_metadata('pmpro_membership_level', $level_id, $meta_key, $meta_value, $prev_value);
609
- }
610
-
611
- function delete_pmpro_membership_level_meta($level_id, $meta_key, $meta_value = '') {
612
- return delete_metadata('pmpro_membership_level', $level_id, $meta_key, $meta_value);
613
- }
614
-
615
- function pmpro_hideAds()
616
- {
617
- global $pmpro_display_ads;
618
- return !$pmpro_display_ads;
619
- }
620
-
621
- function pmpro_displayAds()
622
- {
623
- global $pmpro_display_ads;
624
- return $pmpro_display_ads;
625
- }
626
-
627
- function pmpro_next_payment($user_id = NULL, $order_status = "success", $format = "timestamp")
628
- {
629
- global $wpdb, $current_user;
630
- if(!$user_id)
631
- $user_id = $current_user->ID;
632
-
633
- if(!$user_id)
634
- $r = false;
635
- else
636
- {
637
- //get last order
638
- $order = new MemberOrder();
639
- $order->getLastMemberOrder($user_id, $order_status);
640
-
641
- //get current membership level
642
- $level = pmpro_getMembershipLevelForUser($user_id);
643
-
644
- if(!empty($order) && !empty($order->id) && !empty($level) && !empty($level->id) && !empty($level->cycle_number))
645
- {
646
- //last payment date
647
- $lastdate = date_i18n("Y-m-d", $order->timestamp);
648
-
649
- //next payment date
650
- $nextdate = $wpdb->get_var("SELECT UNIX_TIMESTAMP('" . $lastdate . "' + INTERVAL " . $level->cycle_number . " " . $level->cycle_period . ")");
651
-
652
- $r = $nextdate;
653
- }
654
- else
655
- {
656
- //no order or level found, or level was not recurring
657
- $r = false;
658
- }
659
- }
660
-
661
- /**
662
- * Filter the next payment date.
663
- *
664
- * @since 1.8.5
665
- *
666
- * @param mixed $r false or the next payment date timestamp
667
- * @param int $user_id The user id to get the next payment date for
668
- * @param string $order_status Status or array of statuses to find the last order based on.
669
- */
670
- $r = apply_filters('pmpro_next_payment', $r, $user_id, $order_status);
671
-
672
- //return in desired format
673
- if($r === false)
674
- return false; //always return false when no date found
675
- elseif($format == "timestamp")
676
- return $r;
677
- elseif($format == "date_format")
678
- return date_i18n(get_option('date_format'), $r);
679
- else
680
- return date_i18n($format, $r); //assume a PHP date format
681
- }
682
-
683
- if(!function_exists("last4"))
684
- {
685
- function last4($t)
686
- {
687
- return substr($t, strlen($t) - 4, 4);
688
- }
689
- }
690
-
691
- if(!function_exists("hideCardNumber"))
692
- {
693
- function hideCardNumber($c, $dashes = true)
694
- {
695
- if($c)
696
- {
697
- if($dashes)
698
- return "XXXX-XXXX-XXXX-" . substr($c, strlen($c) - 4, 4);
699
- else
700
- return "XXXXXXXXXXXX" . substr($c, strlen($c) - 4, 4);
701
- }
702
- else
703
- {
704
- return "";
705
- }
706
- }
707
- }
708
-
709
- //check for existing functions since we didn't use a prefix for this function
710
- if(!function_exists("cleanPhone"))
711
- {
712
- /**
713
- * Function to remove special characters from a phone number.
714
- * NOTE: Could probably replace with preg_replace("[^0-9]", "", $phone)
715
- *
716
- * @since 1.0
717
- *
718
- * @param string $phone The phone number to clean.
719
- */
720
- function cleanPhone($phone)
721
- {
722
- //if a + is passed, just pass it along
723
- if(strpos($phone, "+") !== false)
724
- return $phone;
725
- //clean the phone
726
- $phone = str_replace("-", "", $phone);
727
- $phone = str_replace(".", "", $phone);
728
- $phone = str_replace("(", "", $phone);
729
- $phone = str_replace(")", "", $phone);
730
- $phone = str_replace(" ", "", $phone);
731
- return $phone;
732
- }
733
- }
734
-
735
- //check for existing functions since we didn't use a prefix for this function
736
- if(!function_exists("formatPhone"))
737
- {
738
- /**
739
- * Function to format a phone number.
740
- *
741
- * @since 1.0
742
- *
743
- * @param string $phone The phone number to format.
744
- */
745
- function formatPhone($phone)
746
- {
747
- $r = cleanPhone($phone);
748
-
749
- if(strlen($r) == 11)
750
- $r = substr($r, 0, 1) . " (" . substr($r, 1, 3) . ") " . substr($r, 4, 3) . "-" . substr($r, 7, 4);
751
- elseif(strlen($r) == 10)
752
- $r = "(" . substr($r, 0, 3) . ") " . substr($r, 3, 3) . "-" . substr($r, 6, 4);
753
- elseif(strlen($r) == 7)
754
- $r = substr($r, 0, 3) . "-" . substr($r, 3, 4);
755
-
756
- /**
757
- * Filter to do more or less cleaning of phone numbers.
758
- *
759
- * @since 1.8.4.4
760
- *
761
- * @param string $r The formatted phone number.
762
- * @param string $phone The original phone number.
763
- */
764
- return apply_filters('pmpro_format_phone', $r, $phone);
765
- }
766
- }
767
-
768
- function pmpro_showRequiresMembershipMessage()
769
- {
770
- //TODO $current_user $post_membership_levels_names are undefined variables
771
- //get the correct message
772
- if(is_feed())
773
- {
774
- $content = pmpro_getOption("rsstext");
775
- $content = str_replace("!!levels!!", implode(", ", $post_membership_levels_names), $content);
776
- }
777
- elseif($current_user->ID)
778
- {
779
- //not a member
780
- $content = pmpro_getOption("nonmembertext");
781
- $content = str_replace("!!levels!!", implode(", ", $post_membership_levels_names), $content);
782
- }
783
- else
784
- {
785
- //not logged in!
786
- $content = pmpro_getOption("notloggedintext");
787
- $content = str_replace("!!levels!!", implode(", ", $post_membership_levels_names), $content);
788
- }
789
- }
790
-
791
- /**
792
- * Function to check if a user has specified membership levels.
793
- *
794
- * pmpro_hasMembershipLevel() checks if the passed user is a member of the passed level
795
- * $level may either be the ID or name of the desired membership_level. (or an array of such)
796
- * If $user_id is omitted, the value will be retrieved from $current_user.
797
- *
798
- * Return values:
799
- * * Success returns boolean true.
800
- * * Failure returns a string containing the error message.
801
- *
802
- * @since 1.8.5 Added 'e' option for expired members.
803
- * @since 1.0.0
804
- *
805
- * @param mixed $levels The levels to check.
806
- * @param int $user_id The user ID to check.
807
- *
808
- * @return bool Result of membership query.
809
- */
810
- function pmpro_hasMembershipLevel($levels = NULL, $user_id = NULL)
811
- {
812
- global $current_user, $wpdb;
813
-
814
- $return = false;
815
-
816
- if(empty($user_id)) //no user_id passed, check the current user
817
- {
818
- $user_id = $current_user->ID;
819
- }
820
-
821
- if(!empty($user_id) && is_numeric($user_id)) //get membership levels for given user
822
- $membership_levels = pmpro_getMembershipLevelsForUser($user_id);
823
- else
824
- $membership_levels = NULL; //non-users don't have levels
825
-
826
- if($levels === "0" || $levels === 0) //if 0 was passed, return true if they have no level and false if they have any
827
- {
828
- $return = empty($membership_levels);
829
- }
830
- elseif(empty($levels)) //if no level var was passed, we're just checking if they have any level
831
- {
832
- $return = !empty($membership_levels);
833
- }
834
- else
835
- {
836
- if(!is_array($levels)) //make an array out of a single element so we can use the same code
837
- {
838
- $levels = array($levels);
839
- }
840
-
841
- if(empty($membership_levels)) //user has no levels just check if 0, L, -1, or e was sent in one of the levels
842
- {
843
- //check for negative level
844
- $negative_level = false;
845
- foreach($levels as $level) {
846
- if(intval($level) < 0) {
847
- $negative_level = true;
848
- break;
849
- }
850
- }
851
-
852
- //are we looking for non-members or not?
853
- if($negative_level)
854
- return true; //-1/etc, negative level
855
- elseif(in_array(0, $levels, true) || in_array("0", $levels))
856
- $return = true; //0 level
857
- elseif(in_array("L", $levels) || in_array("l", $levels))
858
- $return = (!empty($user_id) && $user_id == $current_user->ID); //L, logged in users
859
- elseif(in_array("-L", $levels) || in_array("-l", $levels))
860
- $return = (empty($user_id) || $user_id != $current_user->ID); //-L, not logged in users
861
- elseif(in_array("E", $levels) || in_array("e", $levels)) {
862
- $sql = "SELECT id FROM $wpdb->pmpro_memberships_users WHERE user_id=$user_id AND status='expired' LIMIT 1";
863
- $expired = $wpdb->get_var($sql); //E, expired members
864
- $return = !empty($expired);
865
- }
866
- }
867
- else
868
- {
869
- foreach($levels as $level)
870
- {
871
- if(strtoupper($level) == "L")
872
- {
873
- //checking if user is logged in
874
- if(!empty($user_id) && $user_id == $current_user->ID)
875
- $return = true;
876
- }
877
- elseif(strtoupper($level) == "-L")
878
- {
879
- //checking if user is logged out
880
- if(empty($user_id) || $user_id != $current_user->ID)
881
- $return = true;
882
- }
883
- elseif($level === "0" || $level === 0 || strtoupper($level) === "E")
884
- {
885
- continue; //user with levels so not a "non-member" or expired
886
- }
887
- else
888
- {
889
- //checking a level id
890
- $level_obj = pmpro_getLevel(is_numeric($level) ? abs(intval($level)) : $level); //make sure our level is in a proper format
891
- if(empty($level_obj)){continue;} //invalid level
892
- $found_level = false;
893
-
894
- foreach($membership_levels as $membership_level)
895
- {
896
- if($membership_level->id == $level_obj->id) //found a match
897
- {
898
- $found_level = true;
899
- }
900
- }
901
-
902
- if(is_numeric($level) && intval($level) < 0 && !$found_level) //checking for the absence of this level and they don't have it
903
- {
904
- $return = true;
905
- }
906
- elseif(is_numeric($level) && intval($level) > 0 && $found_level) //checking for the presence of this level and they have it
907
- {
908
- $return = true;
909
- }
910
- elseif(!is_numeric($level)) //if a level name was passed
911
- $return = $found_level;
912
- }
913
- }
914
- }
915
- }
916
-
917
- $return = apply_filters("pmpro_has_membership_level", $return, $user_id, $levels);
918
- return $return;
919
- }
920
-
921
- /**
922
- * Wrapper for pmpro_changeMembershipLevel to cancel one level.
923
- * @since 1.8.11
924
- */
925
- function pmpro_cancelMembershipLevel($cancel_level, $user_id = NULL, $old_level_status = 'inactive') {
926
- return pmpro_changeMembershipLevel(0, $user_id, $old_level_status, $cancel_level);
927
- }
928
-
929
- /**
930
- * Create, add, remove or updates the membership level of the given user to the given level.
931
- *
932
- * $level may either be the ID or name of the desired membership_level.
933
- * If $user_id is omitted, the value will be retrieved from $current_user.
934
- *
935
- * @param int $level ID of level to set as new level, use 0 to cancel membership
936
- * @param int $user_id ID of the user to change levels for
937
- * @param string $old_level_status The status to set for the row in the memberships users table. (e.g. inactive, cancelled, admin_cancelled, expired) Defaults to 'inactive'.
938
- * $param int $cancel_level If set cancel just this one level instead of all active levels (to support Multiple Memberships per User)
939
- *
940
- * Return values:
941
- * Success returns boolean true.
942
- * Failure returns boolean false.
943
- */
944
- function pmpro_changeMembershipLevel($level, $user_id = NULL, $old_level_status = 'inactive', $cancel_level = NULL)
945
- {
946
- global $wpdb;
947
- global $current_user, $pmpro_error;
948
-
949
- if(empty($user_id))
950
- {
951
- $user_id = $current_user->ID;
952
- }
953
-
954
- if(empty($user_id))
955
- {
956
- $pmpro_error = __("User ID not found.", 'paid-memberships-pro' );
957
- return false;
958
- }
959
-
960
- //make sure user id is int for security
961
- $user_id = intval($user_id);
962
-
963
- if(empty($level)) //cancelling membership
964
- {
965
- $level = 0;
966
- }
967
- else if(is_array($level))
968
- {
969
- //custom level
970
- }
971
- else
972
- {
973
- $level_obj = pmpro_getLevel($level);
974
- if(empty($level_obj))
975
- {
976
- $pmpro_error = __("Invalid level.", 'paid-memberships-pro' );
977
- return false;
978
- }
979
- $level = $level_obj->id;
980
- }
981
-
982
- //if it's a custom level, they're changing
983
- if(!is_array($level))
984
- {
985
- //are they even changing?
986
- if(pmpro_hasMembershipLevel($level, $user_id)) {
987
- $pmpro_error = __("not changing?", 'paid-memberships-pro' );
988
- return false; //not changing
989
- }
990
- }
991
-
992
- //get all active membershipships for this user
993
- $old_levels = pmpro_getMembershipLevelsForUser($user_id);
994
-
995
-
996
- //get level id
997
- if(is_array($level))
998
- $level_id = $level['membership_id']; //custom level
999
- else
1000
- $level_id = $level; //just id
1001
-
1002
- /**
1003
- * Action to run before the membership level changes.
1004
- *
1005
- * @param int $level_id ID of the level changed to.
1006
- * @param int $user_id ID of the user changed.
1007
- * @param array $old_levels array of prior levels the user belonged to.
1008
- * $param int $cancel_level ID of the level being cancelled if specified
1009
- */
1010
- do_action("pmpro_before_change_membership_level", $level_id, $user_id, $old_levels, $cancel_level);
1011
-
1012
-
1013
- //deactivate old memberships based on the old_level_status passed in (updates pmpro_memberships_users table)
1014
- $pmpro_deactivate_old_levels = true;
1015
- /**
1016
- * Filter whether old levels should be deactivated or not. This supports the MMPU addon.
1017
- * Typically you'll want to hook into pmpro_before_change_membership_level
1018
- * or pmpro_after_change_membership_level later to run your own deactivation logic.
1019
- *
1020
- * @since 1.8.11
1021
- * @var $pmpro_deactivate_old_levels bool True or false if levels should be deactivated. Defaults to true.
1022
- */
1023
- $pmpro_deactivate_old_levels = apply_filters("pmpro_deactivate_old_levels", $pmpro_deactivate_old_levels);
1024
-
1025
- //make sure we deactivate the specified level if it's passed in
1026
- if(!empty($cancel_level)) {
1027
- $pmpro_deactivate_old_levels = true;
1028
- $new_old_levels = array();
1029
- foreach($old_levels as $key => $old_level) {
1030
- if($old_level->id == $cancel_level) {
1031
- $new_old_levels[] = $old_levels[$key];
1032
- break;
1033
- }
1034
- }
1035
- $old_levels = $new_old_levels;
1036
- }
1037
-
1038
- if($old_levels && $pmpro_deactivate_old_levels)
1039
- {
1040
- foreach($old_levels as $old_level) {
1041
-
1042
- $sql = "UPDATE $wpdb->pmpro_memberships_users SET `status`='$old_level_status', `enddate`='" . current_time('mysql') . "' WHERE `id`=".$old_level->subscription_id;
1043
-
1044
- if(!$wpdb->query($sql))
1045
- {
1046
- $pmpro_error = __("Error interacting with database", 'paid-memberships-pro' ) . ": ".($wpdb->last_error?$wpdb->last_error:'unavailable');
1047
-
1048
- return false;
1049
- }
1050
- }
1051
- }
1052
-
1053
- //should we cancel their gateway subscriptions?
1054
- if(!empty($cancel_level)) {
1055
- $pmpro_cancel_previous_subscriptions = true; //don't filter cause we're doing just the one
1056
-
1057
- $other_order_ids = $wpdb->get_col("SELECT id FROM $wpdb->pmpro_membership_orders WHERE user_id = '" . $user_id . "' AND status = 'success' AND membership_id = '" . esc_sql($cancel_level) . "' ORDER BY id DESC LIMIT 1");
1058
- } else {
1059
- $pmpro_cancel_previous_subscriptions = true;
1060
- if(isset($_REQUEST['cancel_membership']) && $_REQUEST['cancel_membership'] == false)
1061
- $pmpro_cancel_previous_subscriptions = false;
1062
- $pmpro_cancel_previous_subscriptions = apply_filters("pmpro_cancel_previous_subscriptions", $pmpro_cancel_previous_subscriptions);
1063
-
1064
- $other_order_ids = $wpdb->get_col("SELECT id, IF(subscription_transaction_id = '', CONCAT('UNIQUE_SUB_ID_', id), subscription_transaction_id) as unique_sub_id
1065
- FROM $wpdb->pmpro_membership_orders
1066
- WHERE user_id = '" . $user_id . "'
1067
- AND status = 'success'
1068
- GROUP BY unique_sub_id
1069
- ORDER BY id DESC");
1070
- }
1071
-
1072
- $other_order_ids = apply_filters("pmpro_other_order_ids_to_cancel", $other_order_ids);
1073
-
1074
- //cancel any other subscriptions they have (updates pmpro_membership_orders table)
1075
- if($pmpro_cancel_previous_subscriptions && !empty($other_order_ids))
1076
- {
1077
- foreach($other_order_ids as $order_id)
1078
- {
1079
- $c_order = new MemberOrder($order_id);
1080
- $c_order->cancel();
1081
-
1082
- if(!empty($c_order->error))
1083
- $pmpro_error = $c_order->error;
1084
- }
1085
- }
1086
-
1087
- //insert current membership
1088
- if(!empty($level)) //are we getting a new one or just cancelling the old ones
1089
- {
1090
- //make sure the dates are in good formats
1091
- if(is_array($level))
1092
- {
1093
- //Better support mySQL Strict Mode by passing a proper enum value for cycle_period
1094
- if ($level['cycle_period'] == '') { $level['cycle_period'] = 0; }
1095
-
1096
- // clean up date formatting (string/not string)
1097
- $level['startdate'] = preg_replace('/\'/', '', $level['startdate']);
1098
- $level['enddate'] = preg_replace('/\'/', '', $level['enddate']);
1099
-
1100
- $sql = $wpdb->prepare("
1101
- INSERT INTO {$wpdb->pmpro_memberships_users}
1102
- (`user_id`, `membership_id`, `code_id`, `initial_payment`, `billing_amount`, `cycle_number`, `cycle_period`, `billing_limit`, `trial_amount`, `trial_limit`, `startdate`, `enddate`)
1103
- VALUES
1104
- ( %d, %d, %d, %s, %s, %d, %s, %d, %s, %d, %s, %s )",
1105
- $level['user_id'], // integer
1106
- $level['membership_id'], // integer
1107
- $level['code_id'], // integer
1108
- $level['initial_payment'], // float (string)
1109
- $level['billing_amount'], // float (string)
1110
- $level['cycle_number'], // integer
1111
- $level['cycle_period'], // string (enum)
1112
- $level['billing_limit'], // integer
1113
- $level['trial_amount'], // float (string)
1114
- $level['trial_limit'], // integer
1115
- $level['startdate'], // string (date)
1116
- $level['enddate'] // string (date)
1117
- );
1118
- }
1119
- else
1120
- {
1121
- $sql = $wpdb->prepare("
1122
- INSERT INTO {$wpdb->pmpro_memberships_users}
1123
- ( `user_id`, `membership_id`, `code_id`, `initial_payment`, `billing_amount`, `cycle_number`, `cycle_period`, `billing_limit`, `trial_amount`, `trial_limit`, `startdate`, `enddate`)
1124
- VALUES
1125
- ( %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %s, %s )",
1126
- $user_id,
1127
- $level_id,
1128
- '0',
1129
- '0',
1130
- '0',
1131
- '0',
1132
- '0',
1133
- '0',
1134
- '0',
1135
- '0',
1136
- current_time('mysql'),
1137
- '0000-00-00 00:00:00'
1138
- );
1139
- }
1140
-
1141
- if( false === $wpdb->query($sql) )
1142
- {
1143
- $pmpro_error = sprintf( __("Error interacting with database: %s", 'paid-memberships-pro' ), (!empty($wpdb->last_error) ? $wpdb->last_error : 'unavailable' ));
1144
- return false;
1145
- }
1146
- }
1147
-
1148
- //remove cached level
1149
- global $all_membership_levels;
1150
- unset($all_membership_levels[$user_id]);
1151
-
1152
- //update user data and call action
1153
- pmpro_set_current_user();
1154
-
1155
- /**
1156
- * Action to run after the membership level changes.
1157
- *
1158
- * @param int $level_id ID of the level changed to.
1159
- * @param int $user_id ID of the user changed.
1160
- * $param int $cancel_level ID of the level being cancelled if specified.
1161
- */
1162
- do_action("pmpro_after_change_membership_level", $level_id, $user_id, $cancel_level);
1163
- return true;
1164
- }
1165
-
1166
- /**
1167
- * Function to list WordPress categories in hierarchical format.
1168
- *
1169
- * This is a helper function for the Membership Categories section in adminpages/membershiplevels.php
1170
- *
1171
- * @since 1.8.11
1172
- *
1173
- * @param int $parent_id
1174
- * @param array $level_categories
1175
- */
1176
- function pmpro_listCategories($parent_id = 0, $level_categories = array()) {
1177
-
1178
- $args = array(
1179
- 'parent' => $parent_id,
1180
- 'hide_empty' => false,
1181
- );
1182
-
1183
- $cats = get_categories(apply_filters('pmpro_list_categories_args', $args));
1184
-
1185
- if($cats) {
1186
- foreach($cats as $cat) {
1187
- $name = 'membershipcategory_' . $cat->term_id;
1188
- if(!empty($level_categories))
1189
- $checked = checked(in_array($cat->term_id, $level_categories), true, false);
1190
- else
1191
- $checked = "";
1192
- echo "<ul><li class=membershipcategory><input type=checkbox name={$name} id={$name} value=yes {$checked}><label for={$name}>{$cat->name}</label>";
1193
- pmpro_listCategories($cat->term_id, $level_categories);
1194
- echo '</li></ul>';
1195
- }
1196
- }
1197
- }
1198
-
1199
- /* pmpro_toggleMembershipCategory() creates or deletes a linking entry between the membership level and post category tables.
1200
- *
1201
- * $level may either be the ID or name of the desired membership_level.
1202
- * $category must be a valid post category ID.
1203
- *
1204
- * Return values:
1205
- * Success returns boolean true.
1206
- * Failure returns a string containing the error message.
1207
- */
1208
- function pmpro_toggleMembershipCategory( $level, $category, $value )
1209
- {
1210
- global $wpdb;
1211
- $category = intval($category);
1212
-
1213
- if ( ($level = intval($level)) <= 0 )
1214
- {
1215
- $safe = addslashes($level);
1216
- if ( ($level = intval($wpdb->get_var("SELECT id FROM {$wpdb->pmpro_membership_levels} WHERE name = '$safe' LIMIT 1"))) <= 0 )
1217
- {
1218
- return __("Membership level not found.", 'paid-memberships-pro' );
1219
- }
1220
- }
1221
-
1222
- if ( $value )
1223
- {
1224
- $sql = "REPLACE INTO {$wpdb->pmpro_memberships_categories} (`membership_id`,`category_id`) VALUES ('$level','$category')";
1225
- $wpdb->query($sql);
1226
- if($wpdb->last_error) return $wpdb->last_error;
1227
- }
1228
- else
1229
- {
1230
- $sql = "DELETE FROM {$wpdb->pmpro_memberships_categories} WHERE `membership_id` = '$level' AND `category_id` = '$category' LIMIT 1";
1231
- $wpdb->query($sql);
1232
- if($wpdb->last_error) return $wpdb->last_error;
1233
- }
1234
-
1235
- return true;
1236
- }
1237
-
1238
- /* pmpro_updateMembershipCategories() ensures that all those and only those categories given
1239
- * are associated with the given membership level.
1240
- *
1241
- * $level is a valid membership level ID or name
1242
- * $categories is an array of post category IDs
1243
- *
1244
- * Return values:
1245
- * Success returns boolean true.
1246
- * Failure returns a string containing the error message.
1247
- */
1248
- function pmpro_updateMembershipCategories($level, $categories)
1249
- {
1250
- global $wpdb;
1251
-
1252
- if(!is_numeric($level))
1253
- {
1254
- $level = $wpdb->get_var("SELECT id FROM $wpdb->pmpro_membership_levels WHERE name = '" . esc_sql($level) . "' LIMIT 1");
1255
- if(empty($level))
1256
- {
1257
- return __("Membership level not found.", 'paid-memberships-pro' );
1258
- }
1259
- }
1260
-
1261
- // remove all existing links...
1262
- $sqlQuery = "DELETE FROM $wpdb->pmpro_memberships_categories WHERE `membership_id` = '" . esc_sql($level) . "'";
1263
- $wpdb->query($sqlQuery);
1264
- if($wpdb->last_error) return $wpdb->last_error;
1265
-
1266
- // add the given links [back?] in...
1267
- foreach($categories as $cat)
1268
- {
1269
- if(is_string($r = pmpro_toggleMembershipCategory( $level, $cat, true)))
1270
- {
1271
- //uh oh, error
1272
- return $r;
1273
- }
1274
- }
1275
-
1276
- //all good
1277
- return true;
1278
- }
1279
-
1280
- /* pmpro_getMembershipCategories() returns the categories for a given level
1281
- *
1282
- * $level_id is a valid membership level ID
1283
- *
1284
- * Return values:
1285
- * Success returns boolean true.
1286
- * Failure returns boolean false.
1287
- */
1288
- function pmpro_getMembershipCategories($level_id)
1289
- {
1290
- $level_id = intval($level_id);
1291
-
1292
- global $wpdb;
1293
- $categories = $wpdb->get_col("SELECT c.category_id
1294
- FROM {$wpdb->pmpro_memberships_categories} AS c
1295
- WHERE c.membership_id = '" . $level_id . "'");
1296
-
1297
- return $categories;
1298
- }
1299
-
1300
-
1301
- function pmpro_isAdmin($user_id = NULL)
1302
- {
1303
- global $current_user, $wpdb;
1304
- if(!$user_id)
1305
- $user_id = $current_user->ID;
1306
-
1307
- if(!$user_id)
1308
- return false;
1309
-
1310
- $admincap = user_can($user_id, "manage_options");
1311
- if($admincap)
1312
- return true;
1313
- else
1314
- return false;
1315
- }
1316
-
1317
- function pmpro_replaceUserMeta($user_id, $meta_keys, $meta_values, $prev_values = NULL)
1318
- {
1319
- //expects all arrays for last 3 params or all strings
1320
- if(!is_array($meta_keys))
1321
- {
1322
- $meta_keys = array($meta_keys);
1323
- $meta_values = array($meta_values);
1324
- $prev_values = array($prev_values);
1325
- }
1326
-
1327
- for($i = 0; $i < count($meta_values); $i++)
1328
- {
1329
- if($prev_values[$i])
1330
- {
1331
- update_user_meta($user_id, $meta_keys[$i], $meta_values[$i], $prev_values[$i]);
1332
- }
1333
- else
1334
- {
1335
- $old_value = get_user_meta($user_id, $meta_keys[$i], true);
1336
- if($old_value)
1337
- {
1338
- update_user_meta($user_id, $meta_keys[$i], $meta_values[$i], $old_value);
1339
- }
1340
- else
1341
- {
1342
- update_user_meta($user_id, $meta_keys[$i], $meta_values[$i]);
1343
- }
1344
- }
1345
- }
1346
-
1347
- return $i;
1348
- }
1349
-
1350
- function pmpro_getMetavalues($query)
1351
- {
1352
- global $wpdb;
1353
-
1354
- $results = $wpdb->get_results($query);
1355
- $r = new stdClass();
1356
- foreach($results as $result)
1357
- {
1358
- if(!empty($r) && !empty($result->key))
1359
- $r->{$result->key} = $result->value;
1360
- }
1361
-
1362
- return $r;
1363
- }
1364
-
1365
- //function to return the pagination string
1366
- function pmpro_getPaginationString($page = 1, $totalitems, $limit = 15, $adjacents = 1, $targetpage = "/", $pagestring = "&pn=")
1367
- {
1368
- //defaults
1369
- if(!$adjacents) $adjacents = 1;
1370
- if(!$limit) $limit = 15;
1371
- if(!$page) $page = 1;
1372
- if(!$targetpage) $targetpage = "/";
1373
-
1374
- //other vars
1375
- $prev = $page - 1; //previous page is page - 1
1376
- $next = $page + 1; //next page is page + 1
1377
- $lastpage = ceil($totalitems / $limit); //lastpage is = total items / items per page, rounded up.
1378
- $lpm1 = $lastpage - 1; //last page minus 1
1379
-
1380
- /*
1381
- Now we apply our rules and draw the pagination object.
1382
- We're actually saving the code to a variable in case we want to draw it more than once.
1383
- */
1384
- $pagination = "";
1385
- if($lastpage > 1)
1386
- {
1387
- $pagination .= "<div class=\"pmpro_pagination\"";
1388
- if(!empty($margin) || !empty($padding))
1389
- {
1390
- $pagination .= " style=\"";
1391
- if($margin)
1392
- $pagination .= "margin: $margin;";
1393
- if($padding)
1394
- $pagination .= "padding: $padding;";
1395
- $pagination .= "\"";
1396
- }
1397
- $pagination .= ">";
1398
-
1399
- //previous button
1400
- if ($page > 1)
1401
- $pagination .= "<a href=\"$targetpage$pagestring$prev\">&laquo; prev</a>";
1402
- else
1403
- $pagination .= "<span class=\"disabled\">&laquo; prev</span>";
1404
-
1405
- //pages
1406
- if ($lastpage < 7 + ($adjacents * 2)) //not enough pages to bother breaking it up
1407
- {
1408
- for ($counter = 1; $counter <= $lastpage; $counter++)
1409
- {
1410
- if ($counter == $page)
1411
- $pagination .= "<span class=\"current\">$counter</span>";
1412
- else
1413
- $pagination .= "<a href=\"" . $targetpage . $pagestring . $counter . "\">$counter</a>";
1414
- }
1415
- }
1416
- elseif($lastpage >= 7 + ($adjacents * 2)) //enough pages to hide some
1417
- {
1418
- //close to beginning; only hide later pages
1419
- if($page < 1 + ($adjacents * 3))
1420
- {
1421
- for ($counter = 1; $counter < 4 + ($adjacents * 2); $counter++)
1422
- {
1423
- if ($counter == $page)
1424
- $pagination .= "<span class=\"current\">$counter</span>";
1425
- else
1426
- $pagination .= "<a href=\"" . $targetpage . $pagestring . $counter . "\">$counter</a>";
1427
- }
1428
- $pagination .= "...";
1429
- $pagination .= "<a href=\"" . $targetpage . $pagestring . $lpm1 . "\">$lpm1</a>";
1430
- $pagination .= "<a href=\"" . $targetpage . $pagestring . $lastpage . "\">$lastpage</a>";
1431
- }
1432
- //in middle; hide some front and some back
1433
- elseif($lastpage - ($adjacents * 2) > $page && $page > ($adjacents * 2))
1434
- {
1435
- $pagination .= "<a href=\"" . $targetpage . $pagestring . "1\">1</a>";
1436
- $pagination .= "<a href=\"" . $targetpage . $pagestring . "2\">2</a>";
1437
- $pagination .= "...";
1438
- for ($counter = $page - $adjacents; $counter <= $page + $adjacents; $counter++)
1439
- {
1440
- if ($counter == $page)
1441
- $pagination .= "<span class=\"current\">$counter</span>";
1442
- else
1443
- $pagination .= "<a href=\"" . $targetpage . $pagestring . $counter . "\">$counter</a>";
1444
- }
1445
- $pagination .= "...";
1446
- $pagination .= "<a href=\"" . $targetpage . $pagestring . $lpm1 . "\">$lpm1</a>";
1447
- $pagination .= "<a href=\"" . $targetpage . $pagestring . $lastpage . "\">$lastpage</a>";
1448
- }
1449
- //close to end; only hide early pages
1450
- else
1451
- {
1452
- $pagination .= "<a href=\"" . $targetpage . $pagestring . "1\">1</a>";
1453
- $pagination .= "<a href=\"" . $targetpage . $pagestring . "2\">2</a>";
1454
- $pagination .= "...";
1455
- for ($counter = $lastpage - (1 + ($adjacents * 3)); $counter <= $lastpage; $counter++)
1456
- {
1457
- if ($counter == $page)
1458
- $pagination .= "<span class=\"current\">$counter</span>";
1459
- else
1460
- $pagination .= "<a href=\"" . $targetpage . $pagestring . $counter . "\">$counter</a>";
1461
- }
1462
- }
1463
- }
1464
-
1465
- //next button
1466
- if ($page < $counter - 1)
1467
- $pagination .= "<a href=\"" . $targetpage . $pagestring . $next . "\">next &raquo;</a>";
1468
- else
1469
- $pagination .= "<span class=\"disabled\">next &raquo;</span>";
1470
- $pagination .= "</div>\n";
1471
- }
1472
-
1473
- return $pagination;
1474
-
1475
- }
1476
-
1477
- function pmpro_calculateInitialPaymentRevenue($s = NULL, $l = NULL)
1478
- {
1479
- global $wpdb;
1480
-
1481
- //if we're limiting users by search
1482
- if($s || $l)
1483
- {
1484
- $user_ids_query = "SELECT u.ID FROM $wpdb->users u LEFT JOIN $wpdb->usermeta um ON u.ID = um.user_id LEFT JOIN $wpdb->pmpro_memberships_users mu ON u.ID = mu.user_id WHERE mu.status = 'active' ";
1485
- if($s)
1486
- $user_ids_query .= "AND (u.user_login LIKE '%" . esc_sql($s) . "%' OR u.user_email LIKE '%" . esc_sql($s) . "%' OR um.meta_value LIKE '%$" . esc_sql(s) . "%') ";
1487
- if($l)
1488
- $user_ids_query .= "AND mu.membership_id = '" . esc_sql($l) . "' ";
1489
- }
1490
-
1491
- //query to sum initial payments
1492
- $sqlQuery = "SELECT SUM(initial_payment) FROM $wpdb->pmpro_memberships_users WHERE `status` = 'active' ";
1493
- if(!empty($user_ids_query))
1494
- $sqlQuery .= "AND user_id IN(" . $user_ids_query . ") ";
1495
-
1496
- $total = $wpdb->get_var($sqlQuery);
1497
-
1498
- return (double)$total;
1499
- }
1500
-
1501
- function pmpro_calculateRecurringRevenue($s, $l)
1502
- {
1503
- global $wpdb;
1504
-
1505
- //if we're limiting users by search
1506
- if($s || $l)
1507
- {
1508
- $user_ids_query = "AND user_id IN(SELECT u.ID FROM $wpdb->users u LEFT JOIN $wpdb->usermeta um ON u.ID = um.user_id LEFT JOIN $wpdb->pmpro_memberships_users mu ON u.ID = mu.user_id WHERE mu.status = 'active' ";
1509
- if($s)
1510
- $user_ids_query .= "AND (u.user_login LIKE '%" . esc_sql($s) . "%' OR u.user_email LIKE '%" . esc_sql($s) . "%' OR um.meta_value LIKE '%" . esc_sql($s) . "%') ";
1511
- if($l)
1512
- $user_ids_query .= "AND mu.membership_id = '" . esc_sql($l) . "' ";
1513
- $user_ids_query .= ")";
1514
- }
1515
- else
1516
- $user_ids_query = "";
1517
-
1518
- //4 queries to get annual earnings for each cycle period. currently ignoring trial periods and billing limits.
1519
- $sqlQuery = "
1520
- SELECT SUM((12/cycle_number)*billing_amount) FROM $wpdb->pmpro_memberships_users WHERE status = 'active' AND cycle_period = 'Month' AND cycle_number <> 12 $user_ids_query
1521
- UNION
1522
- SELECT SUM((365/cycle_number)*billing_amount) FROM $wpdb->pmpro_memberships_users WHERE status = 'active' AND cycle_period = 'Day' AND cycle_number <> 365 $user_ids_query
1523
- UNION
1524
- SELECT SUM((52/cycle_number)*billing_amount) FROM $wpdb->pmpro_memberships_users WHERE status = 'active' AND cycle_period = 'Week' AND cycle_number <> 52 $user_ids_query
1525
- UNION
1526
- SELECT SUM(billing_amount) FROM $wpdb->pmpro_memberships_users WHERE status = 'active' AND cycle_period = 'Year' $user_ids_query
1527
- ";
1528
-
1529
- $annual_revenues = $wpdb->get_col($sqlQuery);
1530
-
1531
- $total = 0;
1532
- foreach($annual_revenues as $r)
1533
- {
1534
- $total += $r;
1535
- }
1536
-
1537
- return $total;
1538
- }
1539
-
1540
- function pmpro_generateUsername($firstname = "", $lastname = "", $email = "")
1541
- {
1542
- global $wpdb;
1543
-
1544
- //try first initial + last name, firstname, lastname
1545
- $firstname = preg_replace("/[^A-Za-z]/", "", $firstname);
1546
- $lastname = preg_replace("/[^A-Za-z]/", "", $lastname);
1547
- if($firstname && $lastname)
1548
- {
1549
- $username = substr($firstname, 0, 1) . $lastname;
1550
- }
1551
- elseif($firstname)
1552
- {
1553
- $username = $firstname;
1554
- }
1555
- elseif($lastname)
1556
- {
1557
- $username = $lastname;
1558
- }
1559
-
1560
- //is it taken?
1561
- $taken = $wpdb->get_var("SELECT user_login FROM $wpdb->users WHERE user_login = '" . esc_sql($username) . "' LIMIT 1");
1562
-
1563
- if(!$taken)
1564
- return $username;
1565
-
1566
- //try the beginning of the email address
1567
- $emailparts = explode("@", $email);
1568
- if(is_array($emailparts))
1569
- $email = preg_replace("/[^A-Za-z]/", "", $emailparts[0]);
1570
-
1571
- if(!empty($email))
1572
- {
1573
- $username = $email;
1574
- }
1575
-
1576
- //is this taken? if not, add numbers until it works
1577
- $taken = true;
1578
- $count = 0;
1579
- while($taken)
1580
- {
1581
- //add a # to the end
1582
- if($count)
1583
- {
1584
- $username = preg_replace("/[0-9]/", "", $username) . $count;
1585
- }
1586
-
1587
- //taken?
1588
- $taken = $wpdb->get_var("SELECT user_login FROM $wpdb->users WHERE user_login = '" . esc_sql($username) . "' LIMIT 1");
1589
-
1590
- //increment the number
1591
- $count++;
1592
- }
1593
-
1594
- //must have a good username now
1595
- return $username;
1596
- }
1597
-
1598
- //get a new random code for discount codes
1599
- function pmpro_getDiscountCode($seed = NULL)
1600
- {
1601
- global $wpdb;
1602
-
1603
- while(empty($code))
1604
- {
1605
- $scramble = md5(AUTH_KEY . current_time('timestamp') . $seed . SECURE_AUTH_KEY);
1606
- $code = substr($scramble, 0, 10);
1607
- $check = $wpdb->get_var("SELECT code FROM $wpdb->pmpro_discount_codes WHERE code = '" . esc_sql($code) . "' LIMIT 1");
1608
- if($check || is_numeric($code))
1609
- $code = NULL;
1610
- }
1611
-
1612
- return strtoupper($code);
1613
- }
1614
-
1615
- //is a discount code valid - level_id could be a scalar or an array (or unset)
1616
- function pmpro_checkDiscountCode($code, $level_id = NULL, $return_errors = false)
1617
- {
1618
- global $wpdb;
1619
-
1620
- $error = false;
1621
- $dbcode = false;
1622
-
1623
- //no code, no code
1624
- if(empty($code))
1625
- $error = __("No code was given to check.", 'paid-memberships-pro' );
1626
-
1627
- //get code from db
1628
- if(!$error)
1629
- {
1630
- $dbcode = $wpdb->get_row("SELECT *, UNIX_TIMESTAMP(starts) as starts, UNIX_TIMESTAMP(expires) as expires FROM $wpdb->pmpro_discount_codes WHERE code ='" . esc_sql($code) . "' LIMIT 1");
1631
-
1632
- //did we find it?
1633
- if(empty($dbcode->id))
1634
- $error = __("The discount code could not be found.", 'paid-memberships-pro' );
1635
- }
1636
-
1637
- //check if the code has started
1638
- if(!$error)
1639
- {
1640
- //fix the date timestamps
1641
- $dbcode->starts = strtotime(date_i18n("m/d/Y", $dbcode->starts));
1642
- $dbcode->expires = strtotime(date_i18n("m/d/Y", $dbcode->expires));
1643
-
1644
- //today
1645
- $today = strtotime(date_i18n("m/d/Y 00:00:00", current_time("timestamp")));
1646
-
1647
- //has this code started yet?
1648
- if(!empty($dbcode->starts) && $dbcode->starts > $today)
1649
- $error = sprintf(__("This discount code goes into effect on %s.", 'paid-memberships-pro' ), date_i18n(get_option('date_format'), $dbcode->starts));
1650
- }
1651
-
1652
- //check if the code is expired
1653
- if(!$error)
1654
- {
1655
- if(!empty($dbcode->expires) && $dbcode->expires < $today)
1656
- $error = sprintf(__("This discount code expired on %s.", 'paid-memberships-pro' ), date_i18n(get_option('date_format'), $dbcode->expires));
1657
- }
1658
-
1659
- //have we run out of uses?
1660
- if(!$error)
1661
- {
1662
- if($dbcode->uses > 0)
1663
- {
1664
- $used = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->pmpro_discount_codes_uses WHERE code_id = '" . $dbcode->id . "'");
1665
- if($used >= $dbcode->uses)
1666
- $error = __("This discount code is no longer valid.", 'paid-memberships-pro' );
1667
- }
1668
- }
1669
-
1670
- //if a level was passed check if this code applies
1671
- if(!$error)
1672
- {
1673
- $pmpro_check_discount_code_levels = apply_filters("pmpro_check_discount_code_levels", true, $dbcode->id);
1674
- if(!empty($level_id) && $pmpro_check_discount_code_levels)
1675
- {
1676
- // clean up level id for security before the database call
1677
- if(is_array($level_id)) {
1678
- $levelnums = array_map('intval', $level_id);
1679
- $level_id = implode(',', $levelnums);
1680
- } else {
1681
- $level_id = intval($level_id);
1682
- }
1683
- $code_level = $wpdb->get_row("SELECT l.id, cl.*, l.name, l.description, l.allow_signups FROM $wpdb->pmpro_discount_codes_levels cl LEFT JOIN $wpdb->pmpro_membership_levels l ON cl.level_id = l.id WHERE cl.code_id = '" . $dbcode->id . "' AND cl.level_id IN (" . $level_id . ") LIMIT 1");
1684
-
1685
- if(empty($code_level))
1686
- $error = __("This discount code does not apply to this membership level.", 'paid-memberships-pro' );
1687
- }
1688
- }
1689
-
1690
- /**
1691
- * Filter the results of the discount code check.
1692
- * @since 1.7.13.1
1693
- *
1694
- * @param bool $okay true if code check is okay or false if there was an error
1695
- * @param object $dbcode Object containing code data from the database row
1696
- * @param int $level_id ID of the level the user is checking out for.
1697
- * @param string $code Discount code string.
1698
- *
1699
- * @return mixed $okay true if okay, false or error message string if not okay
1700
- */
1701
- $okay = !$error;
1702
- $pmpro_check_discount_code = apply_filters("pmpro_check_discount_code", $okay, $dbcode, $level_id, $code);
1703
- if(is_string($pmpro_check_discount_code))
1704
- $error = $pmpro_check_discount_code; //string returned, this is an error
1705
- elseif(!$pmpro_check_discount_code && !$error)
1706
- $error = true; //no error before, but filter returned error
1707
- elseif($pmpro_check_discount_code)
1708
- $error = false; //filter is true, so error false
1709
-
1710
- //return
1711
- if($error)
1712
- {
1713
- //there was an error
1714
- if(!empty($return_errors))
1715
- return array(false, $error);
1716
- else
1717
- return false;
1718
- }
1719
- else
1720
- {
1721
- //guess we're all good
1722
- if(!empty($return_errors))
1723
- return array(true, __("This discount code is okay.", 'paid-memberships-pro' ));
1724
- else
1725
- return true;
1726
- }
1727
- }
1728
-
1729
- function pmpro_no_quotes($s, $quotes = array("'", '"'))
1730
- {
1731
- return str_replace($quotes, "", $s);
1732
- }
1733
-
1734
- //from: http://www.php.net/manual/en/function.implode.php#86845
1735
- function pmpro_implodeToEnglish($array, $conjunction = 'and')
1736
- {
1737
- // sanity check
1738
- if (!$array || !count ($array))
1739
- return '';
1740
-
1741
- // get last element
1742
- $last = array_pop ($array);
1743
-
1744
- // if it was the only element - return it
1745
- if (!count ($array))
1746
- return $last;
1747
-
1748
- //possibly translate the conjunction
1749
- if($conjunction == 'and')
1750
- $conjunction = __('and', 'paid-memberships-pro' );
1751
-
1752
- return implode (', ', $array).' ' . $conjunction . ' '.$last;
1753
- }
1754
-
1755
- //from yoast wordpress seo
1756
- function pmpro_text_limit( $text, $limit, $finish = '&hellip;')
1757
- {
1758
- if( strlen( $text ) > $limit ) {
1759
- $text = substr( $text, 0, $limit );
1760
- $text = substr( $text, 0, - ( strlen( strrchr( $text,' ') ) ) );
1761
- $text .= $finish;
1762
- }
1763
- return $text;
1764
- }
1765
-
1766
- /* pmpro_getMembershipLevelForUser() returns the first active membership level for a user
1767
- *
1768
- * If $user_id is omitted, the value will be retrieved from $current_user.
1769
- *
1770
- * Return values:
1771
- * Success returns the level object.
1772
- * Failure returns false.
1773
- */
1774
- function pmpro_getMembershipLevelForUser($user_id = NULL, $force = false)
1775
- {
1776
- if(empty($user_id))
1777
- {
1778
- global $current_user;
1779
- $user_id = $current_user->ID;
1780
- }
1781
-
1782
- if(empty($user_id))
1783
- {
1784
- return false;
1785
- }
1786
-
1787
- //make sure user id is int for security
1788
- $user_id = intval($user_id);
1789
-
1790
- global $all_membership_levels;
1791
-
1792
- if(isset($all_membership_levels[$user_id]) && !$force)
1793
- {
1794
- return $all_membership_levels[$user_id];
1795
- }
1796
- else
1797
- {
1798
- global $wpdb;
1799
- $all_membership_levels[$user_id] = $wpdb->get_row("SELECT
1800
- l.id AS ID,
1801
- l.id as id,
1802
- mu.id as subscription_id,
1803
- l.name AS name,
1804
- l.description,
1805
- l.expiration_number,
1806
- l.expiration_period,
1807
- l.allow_signups,
1808
- mu.initial_payment,
1809
- mu.billing_amount,
1810
- mu.cycle_number,
1811
- mu.cycle_period,
1812
- mu.billing_limit,
1813
- mu.trial_amount,
1814
- mu.trial_limit,
1815
- mu.code_id as code_id,
1816
- UNIX_TIMESTAMP(startdate) as startdate,
1817
- UNIX_TIMESTAMP(enddate) as enddate
1818
- FROM {$wpdb->pmpro_membership_levels} AS l
1819
- JOIN {$wpdb->pmpro_memberships_users} AS mu ON (l.id = mu.membership_id)
1820
- WHERE mu.user_id = $user_id AND mu.status = 'active'
1821
- LIMIT 1");
1822
-
1823
- /**
1824
- * pmpro_get_membership_level_for_user filter.
1825
- *
1826
- * Filters the returned level.
1827
- *
1828
- * @since 1.8.5.4
1829
- *
1830
- * @param object $level Level object.
1831
- */
1832
- $all_membership_levels[$user_id] = apply_filters('pmpro_get_membership_level_for_user', $all_membership_levels[$user_id], $user_id);
1833
-
1834
- return $all_membership_levels[$user_id];
1835
- }
1836
- }
1837
-
1838
- /* pmpro_getMembershipLevelsForUser() returns the membership levels for a user
1839
- *
1840
- * If $user_id is omitted, the value will be retrieved from $current_user.
1841
- * By default it only includes actvie memberships.
1842
- *
1843
- * Return values:
1844
- * Success returns an array of level objects.
1845
- * Failure returns false.
1846
- */
1847
- function pmpro_getMembershipLevelsForUser($user_id = NULL, $include_inactive = false)
1848
- {
1849
- if(empty($user_id))
1850
- {
1851
- global $current_user;
1852
- $user_id = $current_user->ID;
1853
- }
1854
-
1855
- if(empty($user_id))
1856
- {
1857
- return false;
1858
- }
1859
-
1860
- //make sure user id is int for security
1861
- $user_id = intval($user_id);
1862
-
1863
- global $wpdb;
1864
-
1865
- $levels = $wpdb->get_results("SELECT
1866
- l.id AS ID,
1867
- l.id as id,
1868
- mu.id as subscription_id,
1869
- l.name,
1870
- l.description,
1871
- l.expiration_number,
1872
- l.expiration_period,
1873
- mu.initial_payment,
1874
- mu.billing_amount,
1875
- mu.cycle_number,
1876
- mu.cycle_period,
1877
- mu.billing_limit,
1878
- mu.trial_amount,
1879
- mu.trial_limit,
1880
- mu.code_id as code_id,
1881
- UNIX_TIMESTAMP(startdate) as startdate,
1882
- UNIX_TIMESTAMP(enddate) as enddate
1883
- FROM {$wpdb->pmpro_membership_levels} AS l
1884
- JOIN {$wpdb->pmpro_memberships_users} AS mu ON (l.id = mu.membership_id)
1885
- WHERE mu.user_id = $user_id".($include_inactive?"":" AND mu.status = 'active'
1886
- GROUP BY ID"));
1887
- /**
1888
- * pmpro_get_membership_levels_for_user filter.
1889
- *
1890
- * Filters the returned levels.
1891
- *
1892
- * @since 1.8.5.4
1893
- *
1894
- * @param array $levels Array of level objects.
1895
- */
1896
- $levels = apply_filters('pmpro_get_membership_levels_for_user', $levels, $user_id);
1897
-
1898
- return $levels;
1899
- }
1900
-
1901
- /* pmpro_getLevel() returns the level object for a level
1902
- *
1903
- * $level may be the level id or name
1904
- *
1905
- * Return values:
1906
- * Success returns the level object.
1907
- * Failure returns false.
1908
- */
1909
- function pmpro_getLevel($level)
1910
- {
1911
- global $pmpro_levels;
1912
-
1913
- if(is_object($level) && !empty($level->id))
1914
- $level = $level->id;
1915
-
1916
- //was a name passed? (Todo: make sure level names have at least one non-numeric character.
1917
- if(is_numeric($level))
1918
- {
1919
- $level_id = intval($level);
1920
- if(isset($pmpro_levels[$level_id]))
1921
- {
1922
- return $pmpro_levels[$level_id];
1923
- }
1924
- else
1925
- {
1926
- global $wpdb;
1927
- $pmpro_levels[$level_id] = $wpdb->get_row("SELECT * FROM $wpdb->pmpro_membership_levels WHERE id = '" . $level_id . "' LIMIT 1");
1928
- return $pmpro_levels[$level_id];
1929
- }
1930
- }
1931
- else
1932
- {
1933
- global $wpdb;
1934
- $level_obj = $wpdb->get_row("SELECT * FROM $wpdb->pmpro_membership_levels WHERE name = '" . esc_sql($level) . "' LIMIT 1");
1935
-
1936
- if(!empty($level_obj))
1937
- $level_id = $level_obj->id;
1938
- else
1939
- return false;
1940
-
1941
- $pmpro_levels[$level_id] = $level_obj;
1942
- return $pmpro_levels[$level_id];
1943
- }
1944
- }
1945
-
1946
- /*
1947
- Function to populate pmpro_levels with all levels. We query the DB every time just to be sure we have the latest.
1948
- This should be called if you want to be sure you get all levels as $pmpro_levels may only have a subset of levels.
1949
- */
1950
- function pmpro_getAllLevels($include_hidden = false, $force = false)
1951
- {
1952
- global $pmpro_levels, $wpdb;
1953
-
1954
- //just use what's cached (doesn't take into account include_hidden setting)
1955
- if(!empty($pmpro_levels) && !$force)
1956
- return $pmpro_levels;
1957
-
1958
- //build query
1959
- $sqlQuery = "SELECT * FROM $wpdb->pmpro_membership_levels ";
1960
- if(!$include_hidden)
1961
- $sqlQuery .= " WHERE allow_signups = 1 ORDER BY id";
1962
-
1963
- //get levels from the DB
1964
- $raw_levels = $wpdb->get_results($sqlQuery);
1965
-
1966
- //lets put them into an array where the key is the id of the level
1967
- $pmpro_levels = array();
1968
- foreach($raw_levels as $raw_level)
1969
- {
1970
- $pmpro_levels[$raw_level->id] = $raw_level;
1971
- }
1972
-
1973
- return $pmpro_levels;
1974
- }
1975
-
1976
- /**
1977
- * Get level at checkout and place into $pmpro_level global.
1978
- */
1979
- function pmpro_getLevelAtCheckout($level_id = NULL, $discount_code = NULL) {
1980
- global $pmpro_level, $wpdb, $post;
1981
-
1982
- //reset pmpro_level
1983
- $pmpro_level = NULL;
1984
-
1985
- //default to level passed in via URL
1986
- if(empty($level_id) && !empty($_REQUEST['level'])) {
1987
- $level_id = intval($_REQUEST['level']);
1988
- }
1989
-
1990
- //no level, check for a default level in the custom fields for this post
1991
- if(empty($level_id) && !empty($post)) {
1992
- $level_id = get_post_meta( $post->ID, "pmpro_default_level", true );
1993
- }
1994
-
1995
- //default to discount code passed in
1996
- if(empty($discount_code) && !empty($_REQUEST['discount_code'])) {
1997
- $discount_code = preg_replace( "/[^A-Za-z0-9\-]/", "", $_REQUEST['discount_code'] );
1998
- }
1999
-
2000
- //what level are they purchasing? (discount code passed)
2001
- if (!empty($level_id) && !empty($discount_code)) {
2002
- $discount_code_id = $wpdb->get_var( "SELECT id FROM $wpdb->pmpro_discount_codes WHERE code = '" . $discount_code . "' LIMIT 1" );
2003
-
2004
- //check code
2005
- $code_check = pmpro_checkDiscountCode( $discount_code, $level_id, true );
2006
- if ( $code_check[0] != false ) {
2007
- $sqlQuery = "SELECT l.id, cl.*, l.name, l.description, l.allow_signups FROM $wpdb->pmpro_discount_codes_levels cl LEFT JOIN $wpdb->pmpro_membership_levels l ON cl.level_id = l.id LEFT JOIN $wpdb->pmpro_discount_codes dc ON dc.id = cl.code_id WHERE dc.code = '" . $discount_code . "' AND cl.level_id = '" . $level_id . "' LIMIT 1";
2008
- $pmpro_level = $wpdb->get_row( $sqlQuery );
2009
-
2010
- //if the discount code doesn't adjust the level, let's just get the straight level
2011
- if ( empty( $pmpro_level ) ) {
2012
- $pmpro_level = $wpdb->get_row( "SELECT * FROM $wpdb->pmpro_membership_levels WHERE id = '" . $level_id . "' LIMIT 1" );
2013
- }
2014
-
2015
- //filter adjustments to the level
2016
- $pmpro_level->code_id = $discount_code_id;
2017
- $pmpro_level = apply_filters( "pmpro_discount_code_level", $pmpro_level, $discount_code_id );
2018
- } else {
2019
- //error with discount code, we want to halt checkout
2020
- pmpro_setMessage($code_check[1], 'pmpro_error');
2021
- }
2022
- }
2023
-
2024
- //what level are they purchasing? (no discount code)
2025
- if ( empty( $pmpro_level ) && ! empty( $level_id ) ) {
2026
- $pmpro_level = $wpdb->get_row( "SELECT * FROM $wpdb->pmpro_membership_levels WHERE id = '" . esc_sql( $level_id ) . "' AND allow_signups = 1 LIMIT 1" );
2027
- }
2028
-
2029
- //filter the level (for upgrades, etc)
2030
- $pmpro_level = apply_filters( "pmpro_checkout_level", $pmpro_level );
2031
-
2032
- return $pmpro_level;
2033
- }
2034
-
2035
- function pmpro_getCheckoutButton($level_id, $button_text = NULL, $classes = NULL)
2036
- {
2037
- if(empty($button_text))
2038
- $button_text = __("Sign Up for !!name!! Now", 'paid-memberships-pro' );
2039
-
2040
- if(empty($classes))
2041
- $classes = "pmpro_btn";
2042
-
2043
- if(empty($level_id))
2044
- $r = __("Please specify a level id.", 'paid-memberships-pro' );
2045
- else
2046
- {
2047
- //get level
2048
- $level = pmpro_getLevel($level_id);
2049
-
2050
- if(empty($level))
2051
- $r = sprintf(__("Level #%s not found.", 'paid-memberships-pro' ), $level_id);
2052
- else {
2053
- //replace vars
2054
- $replacements = array(
2055
- "!!id!!" => $level->id,
2056
- "!!name!!" => $level->name,
2057
- "!!description!!" => $level->description,
2058
- "!!confirmation!!" => $level->confirmation,
2059
- "!!initial_payment!!" => $level->initial_payment,
2060
- "!!billing_amount!!" => $level->billing_amount,
2061
- "!!cycle_number!!" => $level->cycle_number,
2062
- "!!cycle_period!!" => $level->cycle_period,
2063
- "!!billing_limit!!" => $level->billing_limit,
2064
- "!!trial_amount!!" => $level->trial_amount,
2065
- "!!trial_limit!!" => $level->trial_limit,
2066
- "!!expiration_number!!" => $level->expiration_number,
2067
- "!!expiration_period!!" => $level->expiration_period
2068
- );
2069
- $button_text = str_replace(array_keys($replacements), $replacements, $button_text);
2070
- }
2071
-
2072
- //button text
2073
- $r = "<a href=\"" . pmpro_url("checkout", "?level=" . $level_id) . "\" class=\"" . $classes . "\">" . $button_text . "</a>";
2074
- }
2075
- return $r;
2076
- }
2077
-
2078
- /**
2079
- * Get the "domain" from a URL. By domain, we mean the host name, minus any subdomains. So just the domain and TLD.
2080
- *
2081
- * @param string $url The URL to parse. (generally pass site_url() in WP)
2082
- * @return string The domain.
2083
- */
2084
- function pmpro_getDomainFromURL($url = NULL)
2085
- {
2086
- $domainparts = parse_url($url);
2087
- $domainparts = explode(".", $domainparts['host']);
2088
- if(count($domainparts) > 1)
2089
- {
2090
- //check for ips
2091
- $isip = true;
2092
- foreach($domainparts as $part)
2093
- {
2094
- if(!is_numeric($part))
2095
- {
2096
- $isip = false;
2097
- break;
2098
- }
2099
- }
2100
-
2101
- if($isip)
2102
- {
2103
- //ip, e.g. 127.1.1.1
2104
- $domain = implode(".", $domainparts);
2105
- }
2106
- else
2107
- {
2108
- //www.something.com, etc.
2109
- $domain = $domainparts[count($domainparts)-2] . "." . $domainparts[count($domainparts)-1];
2110
- }
2111
- }
2112
- else
2113
- {
2114
- //localhost or another single word domain
2115
- $domain = $domainparts[0];
2116
- }
2117
-
2118
- return $domain;
2119
- }
2120
-
2121
- /*
2122
- Get a member's start date... either in general or for a specific level_id.
2123
- */
2124
- if(!function_exists("pmpro_getMemberStartdate"))
2125
- {
2126
- function pmpro_getMemberStartdate($user_id = NULL, $level_id = 0)
2127
- {
2128
- if(empty($user_id))
2129
- {
2130
- global $current_user;
2131
- $user_id = $current_user->ID;
2132
- }
2133
-
2134
- //make sure user and level id are int for security
2135
- $user_id = intval($user_id);
2136
- $level_id = intval($level_id);
2137
-
2138
- global $pmpro_startdates; //for cache
2139
- if(empty($pmpro_startdates[$user_id][$level_id]))
2140
- {
2141
- global $wpdb;
2142
-
2143
- if(!empty($level_id))
2144
- $sqlQuery = "SELECT UNIX_TIMESTAMP(startdate) FROM $wpdb->pmpro_memberships_users WHERE status = 'active' AND membership_id IN(" . esc_sql($level_id) . ") AND user_id = '" . $user_id . "' ORDER BY id LIMIT 1";
2145
- else
2146
- $sqlQuery = "SELECT UNIX_TIMESTAMP(startdate) FROM $wpdb->pmpro_memberships_users WHERE status = 'active' AND user_id = '" . $user_id . "' ORDER BY id LIMIT 1";
2147
-
2148
- $startdate = apply_filters("pmpro_member_startdate", $wpdb->get_var($sqlQuery), $user_id, $level_id);
2149
-
2150
- $pmpro_startdates[$user_id][$level_id] = $startdate;
2151
- }
2152
-
2153
- return $pmpro_startdates[$user_id][$level_id];
2154
- }
2155
- }
2156
-
2157
- /*
2158
- How long has this member been a member
2159
- */
2160
- if(!function_exists("pmpro_getMemberDays"))
2161
- {
2162
- function pmpro_getMemberDays($user_id = NULL, $level_id = 0)
2163
- {
2164
- if(empty($user_id))
2165
- {
2166
- global $current_user;
2167
- $user_id = $current_user->ID;
2168
- }
2169
-
2170
- global $pmpro_member_days;
2171
- if(empty($pmpro_member_days[$user_id][$level_id]))
2172
- {
2173
- $startdate = pmpro_getMemberStartdate($user_id, $level_id);
2174
-
2175
- //check that there was a startdate at all
2176
- if(empty($startdate))
2177
- $pmpro_member_days[$user_id][$level_id] = 0;
2178
- else
2179
- {
2180
- $now = current_time('timestamp');
2181
- $days = ($now - $startdate)/3600/24;
2182
-
2183
- $pmpro_member_days[$user_id][$level_id] = $days;
2184
- }
2185
- }
2186
-
2187
- return $pmpro_member_days[$user_id][$level_id];
2188
- }
2189
- }
2190
-
2191
- //the start of a message handling script
2192
- function pmpro_setMessage($message, $type, $force = false)
2193
- {
2194
- global $pmpro_msg, $pmpro_msgt;
2195
-
2196
- //for now, we only show the first message generated
2197
- if($force || empty($pmpro_msg))
2198
- {
2199
- $pmpro_msg = apply_filters('pmpro_set_message', $message, $type);
2200
- $pmpro_msgt = $type;
2201
- }
2202
- }
2203
-
2204
- /**
2205
- * Show a a PMPro message set via pmpro_setMessage
2206
- *
2207
- * @since 1.8.5
2208
- */
2209
- function pmpro_showMessage()
2210
- {
2211
- global $pmpro_msg, $pmpro_msgt;
2212
-
2213
- if(!empty($pmpro_msg))
2214
- {
2215
- ?>
2216
- <div class="<?php echo $pmpro_msgt;?>">
2217
- <p><?php echo $pmpro_msg;?></p>
2218
- </div>
2219
- <?php
2220
- }
2221
- }
2222
-
2223
- //used in class definitions for input fields to see if there was an error
2224
- function pmpro_getClassForField($field)
2225
- {
2226
- global $pmpro_error_fields, $pmpro_required_billing_fields, $pmpro_required_user_fields;
2227
- $classes = array();
2228
-
2229
- //error on this field?
2230
- if(!empty($pmpro_error_fields) && in_array($field, $pmpro_error_fields))
2231
- {
2232
- $classes[] = "pmpro_error";
2233
- }
2234
-
2235
- if(is_array($pmpro_required_billing_fields) && is_array($pmpro_required_user_fields))
2236
- $required_fields = array_merge(array_keys($pmpro_required_billing_fields), array_keys($pmpro_required_user_fields));
2237
- elseif(is_array($pmpro_required_billing_fields))
2238
- $required_fields = array_keys($pmpro_required_billing_fields);
2239
- elseif(is_array($pmpro_required_user_fields))
2240
- $required_fields = array_keys($pmpro_required_user_fields);
2241
- else
2242
- $required_fields = array();
2243
-
2244
- //required?
2245
- if(in_array($field, $required_fields))
2246
- {
2247
- $classes[] = "pmpro_required";
2248
- }
2249
-
2250
- $classes = apply_filters("pmpro_field_classes", $classes, $field);
2251
-
2252
- if(!empty($classes))
2253
- return implode(" ", $classes);
2254
- else
2255
- return "";
2256
- }
2257
-
2258
- //get a var from $_GET or $_POST
2259
- function pmpro_getParam($index, $method = "REQUEST", $default = "", $sanitize_function = 'sanitize_text_field')
2260
- {
2261
- if($method == "REQUEST")
2262
- {
2263
- if(!empty($_REQUEST[$index]))
2264
- return call_user_func($sanitize_function, $_REQUEST[$index]);
2265
- }
2266
- elseif($method == "POST")
2267
- {
2268
- if(!empty($_POST[$index]))
2269
- return call_user_func($sanitize_function, $_POST[$index]);
2270
- }
2271
- elseif($method == "GET")
2272
- {
2273
- if(!empty($_GET[$index]))
2274
- return call_user_func($sanitize_function, $_GET[$index]);
2275
- }
2276
-
2277
- return $default;
2278
- }
2279
-
2280
- /*
2281
- Format an address from address, city, state, zip, country, and phone
2282
- */
2283
- function pmpro_formatAddress($name, $address1, $address2, $city, $state, $zip, $country, $phone, $nl2br = true)
2284
- {
2285
- $address = "";
2286
-
2287
- if(!empty($name))
2288
- $address .= $name . "\n";
2289
-
2290
- if(!empty($address1))
2291
- $address .= $address1 . "\n";
2292
-
2293
- if(!empty($address2))
2294
- $address .= $address2 . "\n";
2295
-
2296
- if(!empty($city) && !empty($state))
2297
- {
2298
- $address .= $city . ", " . $state;
2299
-
2300
- if(!empty($zip))
2301
- $address .= " " . $zip;
2302
-
2303
- $address .= "\n";
2304
- }
2305
-
2306
- if(!empty($country))
2307
- $address .= $country . "\n";
2308
-
2309
- if(!empty($phone))
2310
- $address .= formatPhone($phone);
2311
-
2312
- if($nl2br)
2313
- $address = nl2br($address);
2314
-
2315
- return apply_filters('pmpro_formatted_address', $address, $name, $address1, $address2, $city, $state, $zip, $country, $phone, $nl2br );
2316
- }
2317
-
2318
- /*
2319
- Checks if all required settings are set.
2320
- */
2321
- function pmpro_is_ready()
2322
- {
2323
- global $wpdb, $pmpro_pages, $pmpro_level_ready, $pmpro_gateway_ready, $pmpro_pages_ready;
2324
-
2325
- //check if there is at least one level
2326
- $pmpro_level_ready = (bool)$wpdb->get_var("SELECT id FROM $wpdb->pmpro_membership_levels LIMIT 1");
2327
-
2328
- //check if the gateway settings are good. first check if it's needed (is there paid membership level)
2329
- $paid_membership_level = $wpdb->get_var("SELECT id FROM $wpdb->pmpro_membership_levels WHERE allow_signups = 1 AND (initial_payment > 0 OR billing_amount > 0 OR trial_amount > 0) LIMIT 1");
2330
- $paid_user_subscription = $wpdb->get_var("SELECT user_id FROM $wpdb->pmpro_memberships_users WHERE initial_payment > 0 OR billing_amount > 0 OR trial_amount > 0 LIMIT 1");
2331
-
2332
- if(empty($paid_membership_level) && empty($paid_user_subscription))
2333
- {
2334
- //no paid membership level now or attached to a user. we don't need the gateway setup
2335
- $pmpro_gateway_ready = true;
2336
- }
2337
- else
2338
- {
2339
- $gateway = pmpro_getOption("gateway");
2340
- if($gateway == "authorizenet")
2341
- {
2342
- if(pmpro_getOption("gateway_environment") && pmpro_getOption("loginname") && pmpro_getOption("transactionkey"))
2343
- $pmpro_gateway_ready = true;
2344
- else
2345
- $pmpro_gateway_ready = false;
2346
- }
2347
- elseif($gateway == "paypal" || $gateway == "paypalexpress")
2348
- {
2349
- if(pmpro_getOption("gateway_environment") && pmpro_getOption("gateway_email") && pmpro_getOption("apiusername") && pmpro_getOption("apipassword") && pmpro_getOption("apisignature"))
2350
- $pmpro_gateway_ready = true;
2351
- else
2352
- $pmpro_gateway_ready = false;
2353
- }
2354
- elseif($gateway == "paypalstandard")
2355
- {
2356
- if(pmpro_getOption("gateway_environment") && pmpro_getOption("gateway_email"))
2357
- $pmpro_gateway_ready = true;
2358
- else
2359
- $pmpro_gateway_ready = false;
2360
- }
2361
- elseif($gateway == "payflowpro")
2362
- {
2363
- if(pmpro_getOption("payflow_partner") && pmpro_getOption("payflow_vendor") && pmpro_getOption("payflow_user") && pmpro_getOption("payflow_pwd"))
2364
- $pmpro_gateway_ready = true;
2365
- else
2366
- $pmpro_gateway_ready = false;
2367
- }
2368
- elseif($gateway == "stripe")
2369
- {
2370
- if(pmpro_getOption("gateway_environment") && pmpro_getOption("stripe_secretkey") && pmpro_getOption("stripe_publishablekey"))
2371
- $pmpro_gateway_ready = true;
2372
- else
2373
- $pmpro_gateway_ready = false;
2374
- }
2375
- elseif($gateway == "braintree")
2376
- {
2377
- if(pmpro_getOption("gateway_environment") && pmpro_getOption("braintree_merchantid") && pmpro_getOption("braintree_publickey") && pmpro_getOption("braintree_privatekey"))
2378
- $pmpro_gateway_ready = true;
2379
- else
2380
- $pmpro_gateway_ready = false;
2381
- }
2382
- elseif($gateway == "twocheckout")
2383
- {
2384
- if(pmpro_getOption("gateway_environment") && pmpro_getOption("twocheckout_apiusername") && pmpro_getOption("twocheckout_apipassword"))
2385
- $pmpro_gateway_ready = true;
2386
- else
2387
- $pmpro_gateway_ready = false;
2388
- }
2389
- elseif($gateway == "cybersource")
2390
- {
2391
- if(pmpro_getOption("gateway_environment") && pmpro_getOption("cybersource_merchantid") && pmpro_getOption("cybersource_securitykey"))
2392
- $pmpro_gateway_ready = true;
2393
- else
2394
- $pmpro_gateway_ready = false;
2395
- }
2396
- elseif($gateway == "check")
2397
- {
2398
- $pmpro_gateway_ready = true;
2399
- }
2400
- else
2401
- {
2402
- $pmpro_gateway_ready = false;
2403
- }
2404
- }
2405
-
2406
- //check if we have all pages
2407
- if($pmpro_pages["account"] &&
2408
- $pmpro_pages["billing"] &&
2409
- $pmpro_pages["cancel"] &&
2410
- $pmpro_pages["checkout"] &&
2411
- $pmpro_pages["confirmation"] &&
2412
- $pmpro_pages["invoice"] &&
2413
- $pmpro_pages["levels"])
2414
- $pmpro_pages_ready = true;
2415
- else
2416
- $pmpro_pages_ready = false;
2417
-
2418
- //now check both
2419
- if($pmpro_gateway_ready && $pmpro_pages_ready)
2420
- $r = true;
2421
- else
2422
- $r = false;
2423
-
2424
- /**
2425
- * Filter to determine if PMPro setup is complete or
2426
- * if notices or warnings need to be shown in the PMPro settings.
2427
- *
2428
- * Note: The filter should return true or false and also set
2429
- * the $pmpro_level_ready, $pmpro_gateway_ready, $pmpro_pages_ready global variabls.
2430
- *
2431
- * @since 1.8.4.5
2432
- *
2433
- * @param bool $r ready?
2434
- */
2435
- $r = apply_filters('pmpro_is_ready', $r);
2436
-
2437
- return $r;
2438
- }
2439
-
2440
- /**
2441
- * Format a price per the currency settings.
2442
- *
2443
- * @since 1.7.15
2444
- */
2445
- function pmpro_formatPrice($price)
2446
- {
2447
- global $pmpro_currency, $pmpro_currency_symbol, $pmpro_currencies;
2448
-
2449
- //start with the price formatted with two decimals
2450
- $formatted = number_format((double)$price, 2);
2451
-
2452
- //settings stored in array?
2453
- if(!empty($pmpro_currencies[$pmpro_currency]) && is_array($pmpro_currencies[$pmpro_currency]))
2454
- {
2455
- //format number do decimals, with decimal_separator and thousands_separator
2456
- $formatted = number_format($price,
2457
- (isset($pmpro_currencies[$pmpro_currency]['decimals']) ? (int)$pmpro_currencies[$pmpro_currency]['decimals'] : 2),
2458
- (isset($pmpro_currencies[$pmpro_currency]['decimal_separator']) ? $pmpro_currencies[$pmpro_currency]['decimal_separator'] : '.'),
2459
- (isset($pmpro_currencies[$pmpro_currency]['thousands_separator']) ? $pmpro_currencies[$pmpro_currency]['thousands_separator'] : ',')
2460
- );
2461
-
2462
- //which side is the symbol on?
2463
- if(!empty($pmpro_currencies[$pmpro_currency]['position']) && $pmpro_currencies[$pmpro_currency]['position']== 'left')
2464
- $formatted = $pmpro_currency_symbol . $formatted;
2465
- else
2466
- $formatted = $formatted . $pmpro_currency_symbol;
2467
- }
2468
- else
2469
- $formatted = $pmpro_currency_symbol . $formatted; //default to symbol on the left
2470
-
2471
- //filter
2472
- return apply_filters('pmpro_format_price', $formatted, $price, $pmpro_currency, $pmpro_currency_symbol);
2473
- }
2474
-
2475
- /**
2476
- * Which side does the currency symbol go on?
2477
- *
2478
- * @since 1.7.15
2479
- */
2480
- function pmpro_getCurrencyPosition()
2481
- {
2482
- global $pmpro_currency, $pmpro_currencies;
2483
-
2484
- if(!empty($pmpro_currencies[$pmpro_currency]) && is_array($pmpro_currencies[$pmpro_currency]) && !empty($pmpro_currencies[$pmpro_currency]['position']))
2485
- return $pmpro_currencies[$pmpro_currency]['position'];
2486
- else
2487
- return "left";
2488
- }
2489
-
2490
- /*
2491
- * What gateway should we be using?
2492
- *
2493
- * @since 1.8
2494
- */
2495
- function pmpro_getGateway()
2496
- {
2497
- //grab from param or options
2498
- if (!empty($_REQUEST['gateway']))
2499
- $gateway = $_REQUEST['gateway']; //gateway passed as param
2500
- elseif (!empty($_REQUEST['review']))
2501
- $gateway = "paypalexpress"; //if review param assume paypalexpress
2502
- else
2503
- $gateway = pmpro_getOption("gateway"); //get from options
2504
-
2505
- //set valid gateways - the active gateway in the settings and any gateway added through the filter will be allowed
2506
- if(pmpro_getOption("gateway", true) == "paypal")
2507
- $valid_gateways = apply_filters("pmpro_valid_gateways", array("paypal", "paypalexpress"));
2508
- else
2509
- $valid_gateways = apply_filters("pmpro_valid_gateways", array(pmpro_getOption("gateway", true)));
2510
-
2511
- //make sure it's valid
2512
- if(!in_array($gateway, $valid_gateways))
2513
- $gateway = false;
2514
-
2515
- //filter for good measure
2516
- $gateway = apply_filters('pmpro_get_gateway', $gateway, $valid_gateways);
2517
-
2518
- return $gateway;
2519
- }
2520
-
2521
- /*
2522
- * Does the date provided fall in this month.
2523
- * Used in logins/visits/views report.
2524
- *
2525
- * @since 1.8.3
2526
- */
2527
- function pmpro_isDateThisMonth($str)
2528
- {
2529
- $now = current_time('timestamp');
2530
- $this_month = intval(date_i18n("n", $now));
2531
- $this_year = intval(date_i18n("Y", $now));
2532
-
2533
- $date = strtotime($str, $now);
2534
- $date_month = intval(date_i18n("n", $date));
2535
- $date_year = intval(date_i18n("Y", $date));
2536
-
2537
- if($date_month === $this_month && $date_year === $this_year)
2538
- return true;
2539
- else
2540
- return false;
2541
- }
2542
-
2543
- /**
2544
- * Function to generate PMPro front end pages.
2545
- *
2546
- * @param array $pages {
2547
- * Formatted as array($name => $title) or array(array('title'=>'The Title', 'content'=>'The Content'))
2548
- *
2549
- * @type string $name Page name. (Letters, numbers, and underscores only.)
2550
- * @type string $title Page title.
2551
- * }
2552
- * @return array $created_pages Created page IDs.
2553
- * @since 1.8.5
2554
- */
2555
- function pmpro_generatePages($pages) {
2556
-
2557
- global $pmpro_pages;
2558
-
2559
- $pages_created = array();
2560
-
2561
- if(!empty($pages)) {
2562
- foreach($pages as $name => $page) {
2563
-
2564
- //does it already exist?
2565
- if(!empty($pmpro_pages[$name]))
2566
- continue;
2567
-
2568
- //no id set. create an array to store the page info
2569
- if(is_array($page)) {
2570
- $title = $page['title'];
2571
- $content = $page['content'];
2572
- } else {
2573
- $title = $page;
2574
- $content = '[pmpro_' . $name . ']';
2575
- }
2576
-
2577
- $insert = array(
2578
- 'post_title' => $title,
2579
- 'post_status' => 'publish',
2580
- 'post_type' => 'page',
2581
- 'post_content' => $content,
2582
- 'comment_status' => 'closed',
2583
- 'ping_status' => 'closed'
2584
- );
2585
-
2586
- //make non-account pages a subpage of account
2587
- if ($name != "account") {
2588
- $insert['post_parent'] = $pmpro_pages['account'];
2589
- }
2590
-
2591
- //create the page
2592
- $pmpro_pages[$name] = wp_insert_post($insert);
2593
-
2594
- //update the option too
2595
- pmpro_setOption($name . "_page_id", $pmpro_pages[$name]);
2596
- $pages_created[] = $pmpro_pages[$name];
2597
- }
2598
- }
2599
-
2600
- return $pages_created;
2601
- }
2602
-
2603
- /**
2604
- * Schedule a periodic event unless one with the same hook is already scheduled.
2605
- *
2606
- * @param int $timestamp Timestamp for when to run the event.
2607
- * @param string $recurrence How often the event should recur.
2608
- * @param string $hook Action hook to execute when cron is run.
2609
- * @param array $args Optional. Arguments to pass to the hook's callback function.
2610
- * @return false|void False when an event is not scheduled.
2611
- * @since 1.8.7.3
2612
- */
2613
- function pmpro_maybe_schedule_event( $timestamp, $recurrence, $hook, $args = array()) {
2614
- $next = wp_next_scheduled($hook, $args);
2615
- if(empty($next))
2616
- return wp_schedule_event($timestamp, $recurrence, $hook, $args);
2617
- else
2618
- return false;
2619
- }
2620
-
2621
- /**
2622
- * Get an array of orders for a specific checkout ID
2623
- *
2624
- * @param int $checkout_id Checkout ID
2625
- * @since 1.8.11
2626
- */
2627
- function pmpro_getMemberOrdersByCheckoutID($checkout_id) {
2628
- global $wpdb;
2629
-
2630
- $order_ids = $wpdb->get_col($wpdb->prepare("SELECT id FROM $wpdb->pmpro_membership_orders WHERE checkout_id = %d", $checkout_id));
2631
-
2632
- $r = array();
2633
- foreach($order_ids as $order_id) {
2634
- $r[] = new MemberOrder($order_id);
2635
- }
2636
-
2637
- return $r;
2638
- }
2639
-
2640
- /**
2641
- * Check that the test value is a member of a specific array for sanitization purposes.
2642
- *
2643
- * @param mixed $needle Value to be tested.
2644
- * @param array $safe Array of safelist values.
2645
- * @since 1.9.3
2646
- */
2647
- function pmpro_sanitize_with_safelist($needle, $safelist) {
2648
- if(!in_array($needle, $safelist))
2649
- return false;
2650
- else
2651
- return $needle;
2652
- }
2653
-
2654
- /**
2655
- * Return an array of allowed order statuses
2656
- *
2657
- * @since 1.9.3
2658
- */
2659
- function pmpro_getOrderStatuses($force = false) {
2660
- global $pmpro_order_statuses;
2661
-
2662
- if(!isset($pmpro_order_statuses) || $force) {
2663
- global $wpdb;
2664
- $statuses = array();
2665
- $default_statuses = array( "", "success", "cancelled", "review", "token", "refunded" );
2666
- $used_statuses = $wpdb->get_col( "SELECT DISTINCT(status) FROM $wpdb->pmpro_membership_orders" );
2667
- $statuses = array_unique( array_merge( $default_statuses, $used_statuses ) );
2668
- asort( $statuses );
2669
- $statuses = apply_filters( "pmpro_order_statuses", $statuses );
2670
- }
2671
-
2672
- return $statuses;
2673
- }
1
+ <?php
2
+ /****************************************************************
3
+
4
+ IMPORTANT. PLEASE READ.
5
+
6
+ DO NOT EDIT THIS FILE or any other file in the /wp-content/plugins/paid-memberships-pro/ directory.
7
+ Doing so could break the PMPro plugin and/or keep you from upgrading this plugin in the future.
8
+ We regularly release updates to the plugin, including important security fixes and new features.
9
+ You want to be able to upgrade.
10
+
11
+ If you were asked to insert code into "your functions.php file", it was meant that you edit the functions.php
12
+ in the root folder of your active theme. e.g. /wp-content/themes/twentytwelve/functions.php
13
+ You can also create a custom plugin to place customization code into. Instructions are here:
14
+ http://www.paidmembershipspro.com/2012/08/create-a-plugin-for-pmpro-customizations/
15
+
16
+ Further documentation for customizing Paid Memberships Pro can be found here:
17
+ http://www.paidmembershipspro.com/documentation/
18
+ ****************************************************************/
19
+ if ( ! function_exists( 'sornot' ) ) {
20
+ function sornot( $t, $n ) {
21
+ if ( $n == 1 ) {
22
+ return $t;
23
+ } else {
24
+ return $t . 's';
25
+ }
26
+ }
27
+ }
28
+
29
+ // set up wpdb for the tables we need
30
+ function pmpro_setDBTables() {
31
+ global $wpdb;
32
+ $wpdb->hide_errors();
33
+ $wpdb->pmpro_membership_levels = $wpdb->prefix . 'pmpro_membership_levels';
34
+ $wpdb->pmpro_memberships_users = $wpdb->prefix . 'pmpro_memberships_users';
35
+ $wpdb->pmpro_memberships_categories = $wpdb->prefix . 'pmpro_memberships_categories';
36
+ $wpdb->pmpro_memberships_pages = $wpdb->prefix . 'pmpro_memberships_pages';
37
+ $wpdb->pmpro_membership_orders = $wpdb->prefix . 'pmpro_membership_orders';
38
+ $wpdb->pmpro_discount_codes = $wpdb->prefix . 'pmpro_discount_codes';
39
+ $wpdb->pmpro_discount_codes_levels = $wpdb->prefix . 'pmpro_discount_codes_levels';
40
+ $wpdb->pmpro_discount_codes_uses = $wpdb->prefix . 'pmpro_discount_codes_uses';
41
+ $wpdb->pmpro_membership_levelmeta = $wpdb->prefix . 'pmpro_membership_levelmeta';
42
+ }
43
+ pmpro_setDBTables();
44
+
45
+ // from: http://stackoverflow.com/questions/5266945/wordpress-how-detect-if-current-page-is-the-login-page/5892694#5892694
46
+ function pmpro_is_login_page() {
47
+ return ( in_array( $GLOBALS['pagenow'], array( 'wp-login.php', 'wp-register.php' ) ) || is_page( 'login' ) );
48
+ }
49
+
50
+ // thanks: http://wordpress.org/support/topic/is_plugin_active
51
+ function pmpro_is_plugin_active( $plugin ) {
52
+ return in_array( $plugin, (array) get_option( 'active_plugins', array() ) );
53
+ }
54
+
55
+ // scraping - override n if you have more than 1 group of matches and don't want the first group
56
+ function pmpro_getMatches( $p, $s, $firstvalue = false, $n = 1 ) {
57
+ $ok = preg_match_all( $p, $s, $matches );
58
+
59
+ if ( ! $ok ) {
60
+ return false;
61
+ } else {
62
+ if ( $firstvalue ) {
63
+ return $matches[ $n ][0];
64
+ } else {
65
+ return $matches[ $n ];
66
+ }
67
+ }
68
+ }
69
+
70
+ function pmpro_br2nl( $text, $tags = 'br' ) {
71
+ if ( ! is_array( $tags ) ) {
72
+ $tags = explode( ' ', $tags );
73
+ }
74
+
75
+ foreach ( $tags as $tag ) {
76
+ $text = preg_replace( "/<{$tag}[^>]*>/", "\n", $text );
77
+ $text = preg_replace( "/<\/{$tag}[^>]*>/", "\n", $text );
78
+ }
79
+
80
+ return( $text );
81
+ }
82
+
83
+ function pmpro_getOption( $s, $force = false ) {
84
+ if ( get_option( 'pmpro_' . $s ) ) {
85
+ return get_option( 'pmpro_' . $s );
86
+ } else {
87
+ return '';
88
+ }
89
+ }
90
+
91
+ function pmpro_setOption( $s, $v = null, $sanitize_function = 'sanitize_text_field' ) {
92
+ // no value is given, set v to the p var
93
+ if ( $v === null && isset( $_POST[ $s ] ) ) {
94
+ if ( is_array( $_POST[ $s ] ) ) {
95
+ $v = array_map( $sanitize_function, $_POST[ $s ] );
96
+ } else {
97
+ $v = call_user_func( $sanitize_function, $_POST[ $s ] );
98
+ }
99
+ }
100
+
101
+ if ( is_array( $v ) ) {
102
+ $v = implode( ',', $v );
103
+ } else {
104
+ $v = trim( $v );
105
+ }
106
+
107
+ return update_option( 'pmpro_' . $s, $v );
108
+ }
109
+
110
+ function pmpro_get_slug( $post_id ) {
111
+ global $pmpro_slugs, $wpdb;
112
+
113
+ // make sure post id is int for security
114
+ $post_id = intval( $post_id );
115
+
116
+ if ( ! $pmpro_slugs[ $post_id ] ) {
117
+ $pmpro_slugs[ $post_id ] = $wpdb->get_var( "SELECT post_name FROM $wpdb->posts WHERE ID = '" . $post_id . "' LIMIT 1" );
118
+ }
119
+
120
+ return $pmpro_slugs[ $post_id ];
121
+ }
122
+
123
+ function pmpro_url( $page = null, $querystring = '', $scheme = null ) {
124
+ global $besecure;
125
+ $besecure = apply_filters( 'besecure', $besecure );
126
+
127
+ if ( ! $scheme && $besecure ) {
128
+ $scheme = 'https';
129
+ } elseif ( ! $scheme ) {
130
+ $scheme = 'http';
131
+ }
132
+
133
+ if ( ! $page ) {
134
+ $page = 'levels';
135
+ }
136
+
137
+ global $pmpro_pages;
138
+
139
+ // start with the permalink
140
+ $url = get_permalink( $pmpro_pages[ $page ] );
141
+
142
+ // WPML/etc support
143
+ if ( function_exists( 'icl_object_id' ) && defined( 'ICL_LANGUAGE_CODE' ) ) {
144
+ $trans_id = icl_object_id( $pmpro_pages[ $page ], 'page', false, ICL_LANGUAGE_CODE );
145
+ if ( ! empty( $trans_id ) ) {
146
+ $url = get_permalink( $trans_id );
147
+ }
148
+ }
149
+
150
+ // figure out querystring
151
+ $querystring = str_replace( '?', '', $querystring );
152
+ parse_str( $querystring, $query_args );
153
+
154
+ if ( ! empty( $url ) ) {
155
+
156
+ $url = esc_url_raw( add_query_arg( $query_args, $url ) );
157
+
158
+ // figure out scheme
159
+ if ( is_ssl() ) {
160
+ $url = str_replace( 'http:', 'https:', $url );
161
+ }
162
+ }
163
+
164
+ return $url;
165
+ }
166
+
167
+ function pmpro_isLevelFree( &$level ) {
168
+ if ( ! empty( $level ) && $level->initial_payment <= 0 && $level->billing_amount <= 0 && $level->trial_amount <= 0 ) {
169
+ return true;
170
+ } else {
171
+ return false;
172
+ }
173
+ }
174
+
175
+ // Given an array of levels, will return true if all of them are free.
176
+ function pmpro_areLevelsFree( $levelarr ) {
177
+ if ( ! is_array( $levelarr ) ) {
178
+ return false; }
179
+ foreach ( $levelarr as $curlevel ) {
180
+ if ( ! empty( $curlevel ) && ( $curlevel->initial_payment > 0 || $curlevel->billing_amount > 0 || $curlevel->trial_amount > 0 ) ) {
181
+ return false;
182
+ }
183
+ }
184
+ return true;
185
+ }
186
+
187
+ function pmpro_isLevelRecurring( &$level ) {
188
+ if ( ! empty( $level ) && ( $level->billing_amount > 0 || $level->trial_amount > 0 ) ) {
189
+ return true;
190
+ } else {
191
+ return false;
192
+ }
193
+ }
194
+
195
+ function pmpro_isLevelTrial( &$level ) {
196
+ if ( ! empty( $level ) && ! empty( $level->trial_limit ) && $level->trial_limit > 0 ) {
197
+ return true;
198
+ } else {
199
+ return false;
200
+ }
201
+ }
202
+
203
+ function pmpro_isLevelExpiring( &$level ) {
204
+ if ( ! empty( $level ) && ( ! empty( $level->expiration_number ) && $level->expiration_number > 0 ) || ! empty( $level->enddate ) ) {
205
+ return true;
206
+ } else {
207
+ return false;
208
+ }
209
+ }
210
+
211
+ /**
212
+ * Is this level expiring within one pay period
213
+ *
214
+ * @since 1.8.6.3
215
+ *
216
+ * @param object $level PMPro Level Object to test
217
+ */
218
+ function pmpro_isLevelExpiringSoon( &$level ) {
219
+ if ( ! pmpro_isLevelExpiring( $level ) || empty( $level->enddate ) ) {
220
+ $r = false;
221
+ } else {
222
+ // days til expiration for the standard level
223
+ $standard = pmpro_getLevel( $level->id );
224
+
225
+ if ( ! empty( $standard->expiration_number ) ) {
226
+ if ( $standard->expiration_period == 'Day' ) {
227
+ $days = $level->expiration_number;
228
+ } elseif ( $standard->expiration_period == 'Week' ) {
229
+ $days = $level->expiration_number * 7;
230
+ } elseif ( $standard->expiration_period == 'Month' ) {
231
+ $days = $level->expiration_number * 30;
232
+ } elseif ( $standard->expiration_period == 'Year' ) {
233
+ $days = $level->expiration_number * 365;
234
+ }
235
+ } else {
236
+ $days = 30;
237
+ }
238
+
239
+ // are we within the days til expiration?
240
+ $now = current_time( 'timestamp' );
241
+
242
+ if ( $now + ( $days * 3600 * 24 ) >= $level->enddate ) {
243
+ $r = true;
244
+ } else {
245
+ $r = false;
246
+ }
247
+ }
248
+
249
+ // filter
250
+ $r = apply_filters( 'pmpro_is_level_expiring_soon', $r, $level );
251
+
252
+ return $r;
253
+ }
254
+
255
+ /**
256
+ * Loads a template from one of the default paths (PMPro plugin or theme), or from filtered path
257
+ *
258
+ * @param null $page_name - Name of the page/template
259
+ * @param string $where - `local` or `url` (whether to load from FS or over http)
260
+ * @param string $type - Type of template (valid: 'email' or 'pages', 'adminpages', 'preheader')
261
+ * @param string $ext - File extension ('php', 'html', 'htm', etc)
262
+ * @return string - The HTML for the template.
263
+ *
264
+ * TODO - Allow localized template files to be loaded?
265
+ *
266
+ * @since 1.8.9
267
+ */
268
+ function pmpro_loadTemplate( $page_name = null, $where = 'local', $type = 'pages', $ext = 'php' ) {
269
+ // called from page handler shortcode
270
+ if ( is_null( $page_name ) ) {
271
+ global $pmpro_page_name;
272
+ $page_name = $pmpro_page_name;
273
+ }
274
+
275
+ if ( $where == 'local' ) {
276
+ // template paths in order of priority (array gets reversed)
277
+ $default_templates = array(
278
+ PMPRO_DIR . "/{$type}/{$page_name}.{$ext}", // default plugin path
279
+ get_template_directory() . "/paid-memberships-pro/{$type}/{$page_name}.{$ext}", // parent theme
280
+ get_stylesheet_directory() . "/paid-memberships-pro/{$type}/{$page_name}.{$ext}", // child / active theme
281
+ );
282
+ } elseif ( $where == 'url' ) {
283
+ // template paths in order of priority (array gets reversed)
284
+ $default_templates = array(
285
+ PMPRO_URL . "/{$type}/{$page_name}.{$ext}", // default plugin path
286
+ get_template_directory_uri() . "/paid-memberships-pro/{$type}/{$page_name}.{$ext}", // parent theme
287
+ get_stylesheet_directory_uri() . "/paid-memberships-pro/{$type}/{$page_name}.{$ext}", // child / active theme
288
+ );
289
+
290
+ }
291
+ // Valid types: 'email', 'pages'
292
+ $templates = apply_filters( "pmpro_{$type}_custom_template_path", $default_templates, $page_name, $type, $where, $ext );
293
+ $user_templates = array_diff( $templates, $default_templates );
294
+
295
+ // user specified a custom template path, so it has priority.
296
+ if ( ! empty( $user_templates ) ) {
297
+ $templates = $user_templates;
298
+ }
299
+
300
+ // last element included in the array is the most first one we try to load
301
+ $templates = array_reverse( $templates );
302
+
303
+ // look for template file to include
304
+ ob_start();
305
+ foreach ( $templates as $template_path ) {
306
+ // If loading a local file, check if it exists first
307
+ if ( $where == 'url' || file_exists( $template_path ) ) {
308
+ include $template_path;
309
+ break;
310
+ }
311
+ }
312
+ $template = ob_get_clean();
313
+
314
+ // return template content
315
+ return $template;
316
+ }
317
+
318
+ function pmpro_getLevelCost( &$level, $tags = true, $short = false ) {
319
+ // initial payment
320
+ if ( ! $short ) {
321
+ $r = sprintf( __( 'The price for membership is <strong>%s</strong> now', 'paid-memberships-pro' ), pmpro_formatPrice( $level->initial_payment ) );
322
+ } else {
323
+ $r = sprintf( __( '<strong>%s</strong> now', 'paid-memberships-pro' ), pmpro_formatPrice( $level->initial_payment ) );
324
+ }
325
+
326
+ // recurring part
327
+ if ( $level->billing_amount != '0.00' ) {
328
+ if ( $level->billing_limit > 1 ) {
329
+ if ( $level->cycle_number == '1' ) {
330
+ $r .= sprintf( __( ' and then <strong>%1$s per %2$s for %3$d more %4$s</strong>.', 'paid-memberships-pro' ), pmpro_formatPrice( $level->billing_amount ), pmpro_translate_billing_period( $level->cycle_period ), $level->billing_limit, pmpro_translate_billing_period( $level->cycle_period, $level->billing_limit ) );
331
+ } else {
332
+ $r .= sprintf( __( ' and then <strong>%1$s every %2$d %3$s for %4$d more payments</strong>.', 'paid-memberships-pro' ), pmpro_formatPrice( $level->billing_amount ), $level->cycle_number, pmpro_translate_billing_period( $level->cycle_period, $level->cycle_number ), $level->billing_limit );
333
+ }
334
+ } elseif ( $level->billing_limit == 1 ) {
335
+ $r .= sprintf( __( ' and then <strong>%1$s after %2$d %3$s</strong>.', 'paid-memberships-pro' ), pmpro_formatPrice( $level->billing_amount ), $level->cycle_number, pmpro_translate_billing_period( $level->cycle_period, $level->cycle_number ) );
336
+ } else {
337
+ if ( $level->billing_amount === $level->initial_payment ) {
338
+ if ( $level->cycle_number == '1' ) {
339
+ if ( ! $short ) {
340
+ $r = sprintf( __( 'The price for membership is <strong>%1$s per %2$s</strong>.', 'paid-memberships-pro' ), pmpro_formatPrice( $level->initial_payment ), pmpro_translate_billing_period( $level->cycle_period ) );
341
+ } else {
342
+ $r = sprintf( __( '<strong>%1$s per %2$s</strong>.', 'paid-memberships-pro' ), pmpro_formatPrice( $level->initial_payment ), pmpro_translate_billing_period( $level->cycle_period ) );
343
+ }
344
+ } else {
345
+ if ( ! $short ) {
346
+ $r = sprintf( __( 'The price for membership is <strong>%1$s every %2$d %3$s</strong>.', 'paid-memberships-pro' ), pmpro_formatPrice( $level->initial_payment ), $level->cycle_number, pmpro_translate_billing_period( $level->cycle_period, $level->cycle_number ) );
347
+ } else {
348
+ $r = sprintf( __( '<strong>%1$s every %2$d %3$s</strong>.', 'paid-memberships-pro' ), pmpro_formatPrice( $level->initial_payment ), $level->cycle_number, pmpro_translate_billing_period( $level->cycle_period, $level->cycle_number ) );
349
+ }
350
+ }
351
+ } else {
352
+ if ( $level->cycle_number == '1' ) {
353
+ $r .= sprintf( __( ' and then <strong>%1$s per %2$s</strong>.', 'paid-memberships-pro' ), pmpro_formatPrice( $level->billing_amount ), pmpro_translate_billing_period( $level->cycle_period ) );
354
+ } else {
355
+ $r .= sprintf( __( ' and then <strong>%1$s every %2$d %3$s</strong>.', 'paid-memberships-pro' ), pmpro_formatPrice( $level->billing_amount ), $level->cycle_number, pmpro_translate_billing_period( $level->cycle_period, $level->cycle_number ) );
356
+ }
357
+ }
358
+ }
359
+ } else {
360
+ $r .= '.';
361
+ }
362
+
363
+ // add a space
364
+ $r .= ' ';
365
+
366
+ // trial part
367
+ if ( $level->trial_limit ) {
368
+ if ( $level->trial_amount == '0.00' ) {
369
+ if ( $level->trial_limit == '1' ) {
370
+ $r .= ' ' . __( 'After your initial payment, your first payment is Free.', 'paid-memberships-pro' );
371
+ } else {
372
+ $r .= ' ' . sprintf( __( 'After your initial payment, your first %d payments are Free.', 'paid-memberships-pro' ), $level->trial_limit );
373
+ }
374
+ } else {
375
+ if ( $level->trial_limit == '1' ) {
376
+ $r .= ' ' . sprintf( __( 'After your initial payment, your first payment will cost %s.', 'paid-memberships-pro' ), pmpro_formatPrice( $level->trial_amount ) );
377
+ } else {
378
+ $r .= ' ' . sprintf( __( 'After your initial payment, your first %1$d payments will cost %2$s.', 'paid-memberships-pro' ), $level->trial_limit, pmpro_formatPrice( $level->trial_amount ) );
379
+ }
380
+ }
381
+ }
382
+
383
+ // taxes part
384
+ $tax_state = pmpro_getOption( 'tax_state' );
385
+ $tax_rate = pmpro_getOption( 'tax_rate' );
386
+
387
+ if ( $tax_state && $tax_rate && ! pmpro_isLevelFree( $level ) ) {
388
+ $r .= sprintf( __( 'Customers in %1$s will be charged %2$s%% tax.', 'paid-memberships-pro' ), $tax_state, round( $tax_rate * 100, 2 ) );
389
+ }
390
+
391
+ if ( ! $tags ) {
392
+ $r = strip_tags( $r );
393
+ }
394
+
395
+ $r = apply_filters( 'pmpro_level_cost_text', $r, $level, $tags, $short ); // passing $tags and $short since v1.8
396
+ return $r;
397
+ }
398
+
399
+ // Similar to pmpro_getLevelCost, but loops through all levels in the incoming array and puts it all together.
400
+ function pmpro_getLevelsCost( &$levels, $tags = true, $short = false ) {
401
+ // let's build the array to work from to consolidate recurring info.
402
+ // recurpmts[cycle_period][cycle_number][billing_limit] = total_amount
403
+ $initpmt = 0;
404
+ $recurpmts = array();
405
+ $trialperiods = 0;
406
+ foreach ( $levels as $curlevel ) {
407
+ $initpmt += $curlevel->initial_payment;
408
+ if ( $curlevel->billing_amount != '0.00' ) {
409
+ if ( array_key_exists( $curlevel->cycle_period, $recurpmts ) ) {
410
+ if ( array_key_exists( $curlevel->cycle_number, $recurpmts[ $curlevel->cycle_period ] ) ) {
411
+ if ( array_key_exists( $curlevel->billing_limit, $recurpmts[ $curlevel->cycle_period ][ $curlevel->cycle_number ] ) ) {
412
+ $recurpmts[ $curlevel->cycle_period ][ $curlevel->cycle_number ][ $curlevel->billing_limit ] += $curlevel->billing_amount;
413
+ } else {
414
+ $recurpmts[ $curlevel->cycle_period ][ $curlevel->cycle_number ][ $curlevel->billing_limit ] = $curlevel->billing_amount;
415
+ }
416
+ } else {
417
+ $recurpmts[ $curlevel->cycle_period ][ $curlevel->cycle_number ] = array();
418
+ $recurpmts[ $curlevel->cycle_period ][ $curlevel->cycle_number ][ $curlevel->billing_limit ] = $curlevel->billing_amount;
419
+ }
420
+ } else {
421
+ $recurpmts[ $curlevel->cycle_period ] = array();
422
+ $recurpmts[ $curlevel->cycle_period ][ $curlevel->cycle_number ] = array();
423
+ $recurpmts[ $curlevel->cycle_period ][ $curlevel->cycle_number ][ $curlevel->billing_limit ] = $curlevel->billing_amount;
424
+ }
425
+ }
426
+ if ( $curlevel->trial_limit && intval( $curlevel->trial_limit ) > $trialperiods ) {
427
+ $trialperiods = intval( $curlevel->trial_limit );
428
+ }
429
+ }
430
+
431
+ // initial payment
432
+ if ( ! $short ) {
433
+ $r = sprintf( __( 'The price for membership is <strong>%s</strong> now', 'paid-memberships-pro' ), pmpro_formatPrice( $initpmt ) );
434
+ } else {
435
+ $r = sprintf( __( '<strong>%s</strong> now', 'paid-memberships-pro' ), pmpro_formatPrice( $initpmt ) );
436
+ }
437
+
438
+ // recurring part
439
+ $billtextparts = array();
440
+ if ( count( $recurpmts ) > 0 ) {
441
+ foreach ( $recurpmts as $curperiod => $curpddata ) {
442
+ foreach ( $curpddata as $curcyclenum => $curcycledata ) {
443
+ foreach ( $curcycledata as $curbilllimit => $curtotal ) {
444
+ if ( $curbilllimit > 1 ) {
445
+ if ( $curcyclenum == '1' ) {
446
+ $billtextparts[] = sprintf( __( '<strong>%1$s per %2$s for %3$d more %4$s</strong>', 'paid-memberships-pro' ), pmpro_formatPrice( $curtotal ), pmpro_translate_billing_period( $curperiod ), $curbilllimit, pmpro_translate_billing_period( $curperiod, $curbilllimit ) );
447
+ } else {
448
+ $billtextparts[] = sprintf( __( '<strong>%1$s every %2$d %3$s for %4$d more payments</strong>', 'paid-memberships-pro' ), pmpro_formatPrice( $curtotal ), $curcyclenum, pmpro_translate_billing_period( $curperiod, $curcyclenum ), $curbilllimit );
449
+ }
450
+ } elseif ( $curbilllimit == 1 ) {
451
+ $billtextparts[] = sprintf( __( '<strong>%1$s after %2$d %3$s</strong>', 'paid-memberships-pro' ), pmpro_formatPrice( $curtotal ), $curcyclenum, pmpro_translate_billing_period( $curperiod, $curcyclenum ) );
452
+ } else {
453
+ if ( $curcyclenum == '1' ) {
454
+ $billtextparts[] = sprintf( __( '<strong>%1$s every %2$s</strong>', 'paid-memberships-pro' ), pmpro_formatPrice( $curtotal ), pmpro_translate_billing_period( $curperiod ) );
455
+ } else {
456
+ $billtextparts[] = sprintf( __( '<strong>%1$s every %2$d %3$s</strong>', 'paid-memberships-pro' ), pmpro_formatPrice( $curtotal ), $curcyclenum, pmpro_translate_billing_period( $curperiod, $curcyclenum ) );
457
+ }
458
+ }
459
+ }
460
+ }
461
+ }
462
+ $laststanza = array_pop( $billtextparts );
463
+ if ( count( $billtextparts ) > 0 ) {
464
+ $r .= ', ';
465
+ $r .= implode( ', ', $billtextparts );
466
+ }
467
+ $r .= ', and ' . $laststanza . '.';
468
+ } else {
469
+ $r .= '.';
470
+ }
471
+
472
+ // add a space
473
+ $r .= ' ';
474
+
475
+ // trial part - not as detailed as the single-level counterpart. Could be improved in the future.
476
+ if ( $trialperiods > 0 ) {
477
+ if ( $trialperiods == 1 ) {
478
+ $r .= __( 'Trial pricing has been applied to the first payment.', 'mmpu' );
479
+ } else {
480
+ $r .= sprintf( __( 'Trial pricing has been applied to the first %d payments.', 'mmpu' ), $trialperiods );
481
+ }
482
+ }
483
+
484
+ // taxes part
485
+ $tax_state = pmpro_getOption( 'tax_state' );
486
+ $tax_rate = pmpro_getOption( 'tax_rate' );
487
+
488
+ if ( $tax_state && $tax_rate && ! pmpro_areLevelsFree( $levels ) ) {
489
+ $r .= sprintf( __( 'Customers in %1$s will be charged %2$s%% tax.', 'paid-memberships-pro' ), $tax_state, round( $tax_rate * 100, 2 ) );
490
+ }
491
+
492
+ if ( ! $tags ) {
493
+ $r = strip_tags( $r );
494
+ }
495
+
496
+ /**
497
+ * Filter the levels cost text. Note the s in levels. Similar to pmpro_levels_cost_text
498
+ */
499
+ $r = apply_filters( 'pmpro_levels_cost_text', $r, $levels, $tags, $short );
500
+ return $r;
501
+ }
502
+
503
+ function pmpro_getLevelExpiration( &$level ) {
504
+ if ( $level->expiration_number ) {
505
+ $expiration_text = sprintf( __( 'Membership expires after %1$d %2$s.', 'paid-memberships-pro' ), $level->expiration_number, pmpro_translate_billing_period( $level->expiration_period, $level->expiration_number ) );
506
+ } else {
507
+ $expiration_text = '';
508
+ }
509
+
510
+ $expiration_text = apply_filters( 'pmpro_levels_expiration_text', $expiration_text, $level );
511
+ $expiration_text = apply_filters( 'pmpro_level_expiration_text', $expiration_text, $level ); // Backwards compatible
512
+ return $expiration_text;
513
+ }
514
+
515
+ function pmpro_getLevelsExpiration( &$levels ) {
516
+ $expirystrings = array();
517
+ $ongoinglevelnum = 0;
518
+ if ( ! empty( $levels ) && ! is_array( $levels ) ) {
519
+ $levels = array( $levels );
520
+ } elseif ( empty( $levels ) ) {
521
+ $levels = array(); }
522
+ foreach ( $levels as $curlevel ) {
523
+ if ( $curlevel->expiration_number ) {
524
+ $expirystrings[] = sprintf( __( '%1$s membership expires after %2$d %3$s', 'paid-memberships-pro' ), $curlevel->name, $curlevel->expiration_number, pmpro_translate_billing_period( $curlevel->expiration_period, $curlevel->expiration_number ) );
525
+ } else {
526
+ $ongoinglevelnum++;
527
+ }
528
+ }
529
+
530
+ $expiration_text = '';
531
+ if ( count( $expirystrings ) > 0 ) {
532
+ $laststanza = array_pop( $expirystrings );
533
+ $expiration_text = implode( ', ', $expirystrings );
534
+ if ( count( $expirystrings ) > 0 ) {
535
+ $expiration_text .= ', and '; }
536
+ $expiration_text .= $laststanza;
537
+ $expiration_text .= '. ';
538
+ if ( $ongoinglevelnum > 0 ) {
539
+ $expiration_text .= 'The remaining membership';
540
+ if ( $ongoinglevelnum > 1 ) {
541
+ $expiration_text .= 's are';
542
+ } else {
543
+ $expiration_text .= ' is'; }
544
+ $expiration_text .= ' ongoing.';
545
+ }
546
+ }
547
+
548
+ /**
549
+ * Filter the levels expiration text. Note the s in levels. Similar to pmpro_levels_expiration_text
550
+ */
551
+ $expiration_text = apply_filters( 'pmpro_levels_expiration_text', $expiration_text, $levels );
552
+ $expiration_text = apply_filters( 'pmpro_level_expiration_text', $expiration_text, $levels ); // Backwards compatible
553
+ return $expiration_text;
554
+ }
555
+
556
+ /**
557
+ * pmpro_membership_level Meta Functions
558
+ *
559
+ * @ssince 1.8.6.5
560
+ */
561
+ function add_pmpro_membership_level_meta( $level_id, $meta_key, $meta_value, $unique = false ) {
562
+ return add_metadata( 'pmpro_membership_level', $level_id, $meta_key, $meta_value, $unique );
563
+ }
564
+
565
+ function get_pmpro_membership_level_meta( $level_id, $key, $single = false ) {
566
+ return get_metadata( 'pmpro_membership_level', $level_id, $key, $single );
567
+ }
568
+
569
+ function update_pmpro_membership_level_meta( $level_id, $meta_key, $meta_value, $prev_value = '' ) {
570
+ return update_metadata( 'pmpro_membership_level', $level_id, $meta_key, $meta_value, $prev_value );
571
+ }
572
+
573
+ function delete_pmpro_membership_level_meta( $level_id, $meta_key, $meta_value = '' ) {
574
+ return delete_metadata( 'pmpro_membership_level', $level_id, $meta_key, $meta_value );
575
+ }
576
+
577
+ function pmpro_hideAds() {
578
+ global $pmpro_display_ads;
579
+ return ! $pmpro_display_ads;
580
+ }
581
+
582
+ function pmpro_displayAds() {
583
+ global $pmpro_display_ads;
584
+ return $pmpro_display_ads;
585
+ }
586
+
587
+ function pmpro_next_payment( $user_id = null, $order_status = 'success', $format = 'timestamp' ) {
588
+ global $wpdb, $current_user;
589
+ if ( ! $user_id ) {
590
+ $user_id = $current_user->ID;
591
+ }
592
+
593
+ if ( ! $user_id ) {
594
+ $r = false;
595
+ } else {
596
+ // get last order
597
+ $order = new MemberOrder();
598
+ $order->getLastMemberOrder( $user_id, $order_status );
599
+
600
+ // get current membership level
601
+ $level = pmpro_getMembershipLevelForUser( $user_id );
602
+
603
+ if ( ! empty( $order ) && ! empty( $order->id ) && ! empty( $level ) && ! empty( $level->id ) && ! empty( $level->cycle_number ) ) {
604
+ // last payment date
605
+ $lastdate = date_i18n( 'Y-m-d', $order->timestamp );
606
+
607
+ // next payment date
608
+ $nextdate = $wpdb->get_var( "SELECT UNIX_TIMESTAMP('" . $lastdate . "' + INTERVAL " . $level->cycle_number . ' ' . $level->cycle_period . ')' );
609
+
610
+ $r = $nextdate;
611
+ } else {
612
+ // no order or level found, or level was not recurring
613
+ $r = false;
614
+ }
615
+ }
616
+
617
+ /**
618
+ * Filter the next payment date.
619
+ *
620
+ * @since 1.8.5
621
+ *
622
+ * @param mixed $r false or the next payment date timestamp
623
+ * @param int $user_id The user id to get the next payment date for
624
+ * @param string $order_status Status or array of statuses to find the last order based on.
625
+ */
626
+ $r = apply_filters( 'pmpro_next_payment', $r, $user_id, $order_status );
627
+
628
+ // return in desired format
629
+ if ( $r === false ) {
630
+ return false; // always return false when no date found
631
+ } elseif ( $format == 'timestamp' ) {
632
+ return $r;
633
+ } elseif ( $format == 'date_format' ) {
634
+ return date_i18n( get_option( 'date_format' ), $r );
635
+ } else {
636
+ return date_i18n( $format, $r ); // assume a PHP date format
637
+ }
638
+ }
639
+
640
+ if ( ! function_exists( 'last4' ) ) {
641
+ function last4( $t ) {
642
+ return substr( $t, strlen( $t ) - 4, 4 );
643
+ }
644
+ }
645
+
646
+ if ( ! function_exists( 'hideCardNumber' ) ) {
647
+ function hideCardNumber( $c, $dashes = true ) {
648
+ if ( $c ) {
649
+ if ( $dashes ) {
650
+ return 'XXXX-XXXX-XXXX-' . substr( $c, strlen( $c ) - 4, 4 );
651
+ } else {
652
+ return 'XXXXXXXXXXXX' . substr( $c, strlen( $c ) - 4, 4 );
653
+ }
654
+ } else {
655
+ return '';
656
+ }
657
+ }
658
+ }
659
+
660
+ // check for existing functions since we didn't use a prefix for this function
661
+ if ( ! function_exists( 'cleanPhone' ) ) {
662
+ /**
663
+ * Function to remove special characters from a phone number.
664
+ * NOTE: Could probably replace with preg_replace("[^0-9]", "", $phone)
665
+ *
666
+ * @since 1.0
667
+ *
668
+ * @param string $phone The phone number to clean.
669
+ */
670
+ function cleanPhone( $phone ) {
671
+ // if a + is passed, just pass it along
672
+ if ( strpos( $phone, '+' ) !== false ) {
673
+ return $phone;
674
+ }
675
+ // clean the phone
676
+ $phone = str_replace( '-', '', $phone );
677
+ $phone = str_replace( '.', '', $phone );
678
+ $phone = str_replace( '(', '', $phone );
679
+ $phone = str_replace( ')', '', $phone );
680
+ $phone = str_replace( ' ', '', $phone );
681
+ return $phone;
682
+ }
683
+ }
684
+
685
+ // check for existing functions since we didn't use a prefix for this function
686
+ if ( ! function_exists( 'formatPhone' ) ) {
687
+ /**
688
+ * Function to format a phone number.
689
+ *
690
+ * @since 1.0
691
+ *
692
+ * @param string $phone The phone number to format.
693
+ */
694
+ function formatPhone( $phone ) {
695
+ $r = cleanPhone( $phone );
696
+
697
+ if ( strlen( $r ) == 11 ) {
698
+ $r = substr( $r, 0, 1 ) . ' (' . substr( $r, 1, 3 ) . ') ' . substr( $r, 4, 3 ) . '-' . substr( $r, 7, 4 );
699
+ } elseif ( strlen( $r ) == 10 ) {
700
+ $r = '(' . substr( $r, 0, 3 ) . ') ' . substr( $r, 3, 3 ) . '-' . substr( $r, 6, 4 );
701
+ } elseif ( strlen( $r ) == 7 ) {
702
+ $r = substr( $r, 0, 3 ) . '-' . substr( $r, 3, 4 );
703
+ }
704
+
705
+ /**
706
+ * Filter to do more or less cleaning of phone numbers.
707
+ *
708
+ * @since 1.8.4.4
709
+ *
710
+ * @param string $r The formatted phone number.
711
+ * @param string $phone The original phone number.
712
+ */
713
+ return apply_filters( 'pmpro_format_phone', $r, $phone );
714
+ }
715
+ }
716
+
717
+ function pmpro_showRequiresMembershipMessage() {
718
+ // TODO $current_user $post_membership_levels_names are undefined variables
719
+ // get the correct message
720
+ if ( is_feed() ) {
721
+ $content = pmpro_getOption( 'rsstext' );
722
+ $content = str_replace( '!!levels!!', implode( ', ', $post_membership_levels_names ), $content );
723
+ } elseif ( $current_user->ID ) {
724
+ // not a member
725
+ $content = pmpro_getOption( 'nonmembertext' );
726
+ $content = str_replace( '!!levels!!', implode( ', ', $post_membership_levels_names ), $content );
727
+ } else {
728
+ // not logged in!
729
+ $content = pmpro_getOption( 'notloggedintext' );
730
+ $content = str_replace( '!!levels!!', implode( ', ', $post_membership_levels_names ), $content );
731
+ }
732
+ }
733
+
734
+ /**
735
+ * Function to check if a user has specified membership levels.
736
+ *
737
+ * pmpro_hasMembershipLevel() checks if the passed user is a member of the passed level
738
+ * $level may either be the ID or name of the desired membership_level. (or an array of such)
739
+ * If $user_id is omitted, the value will be retrieved from $current_user.
740
+ *
741
+ * Return values:
742
+ * * Success returns boolean true.
743
+ * * Failure returns a string containing the error message.
744
+ *
745
+ * @since 1.8.5 Added 'e' option for expired members.
746
+ * @since 1.0.0
747
+ *
748
+ * @param mixed $levels The levels to check.
749
+ * @param int $user_id The user ID to check.
750
+ *
751
+ * @return bool Result of membership query.
752
+ */
753
+ function pmpro_hasMembershipLevel( $levels = null, $user_id = null ) {
754
+ global $current_user, $wpdb;
755
+
756
+ $return = false;
757
+
758
+ if ( empty( $user_id ) ) {
759
+ $user_id = $current_user->ID;
760
+ }
761
+
762
+ if ( ! empty( $user_id ) && is_numeric( $user_id ) ) { // get membership levels for given user
763
+ $membership_levels = pmpro_getMembershipLevelsForUser( $user_id );
764
+ } else {
765
+ $membership_levels = null; // non-users don't have levels
766
+ }
767
+
768
+ if ( $levels === '0' || $levels === 0 ) {
769
+ $return = empty( $membership_levels );
770
+ } elseif ( empty( $levels ) ) {
771
+ $return = ! empty( $membership_levels );
772
+ } else {
773
+ if ( ! is_array( $levels ) ) {
774
+ $levels = array( $levels );
775
+ }
776
+
777
+ if ( empty( $membership_levels ) ) {
778
+ // check for negative level
779
+ $negative_level = false;
780
+ foreach ( $levels as $level ) {
781
+ if ( intval( $level ) < 0 ) {
782
+ $negative_level = true;
783
+ break;
784
+ }
785
+ }
786
+
787
+ // are we looking for non-members or not?
788
+ if ( $negative_level ) {
789
+ return true; // -1/etc, negative level
790
+ } elseif ( in_array( 0, $levels, true ) || in_array( '0', $levels ) ) {
791
+ $return = true; // 0 level
792
+ } elseif ( in_array( 'L', $levels ) || in_array( 'l', $levels ) ) {
793
+ $return = ( ! empty( $user_id ) && $user_id == $current_user->ID ); // L, logged in users
794
+ } elseif ( in_array( '-L', $levels ) || in_array( '-l', $levels ) ) {
795
+ $return = ( empty( $user_id ) || $user_id != $current_user->ID ); // -L, not logged in users
796
+ } elseif ( in_array( 'E', $levels ) || in_array( 'e', $levels ) ) {
797
+ $sql = "SELECT id FROM $wpdb->pmpro_memberships_users WHERE user_id=$user_id AND status='expired' LIMIT 1";
798
+ $expired = $wpdb->get_var( $sql ); // E, expired members
799
+ $return = ! empty( $expired );
800
+ }
801
+ } else {
802
+ foreach ( $levels as $level ) {
803
+ if ( strtoupper( $level ) == 'L' ) {
804
+ // checking if user is logged in
805
+ if ( ! empty( $user_id ) && $user_id == $current_user->ID ) {
806
+ $return = true;
807
+ }
808
+ } elseif ( strtoupper( $level ) == '-L' ) {
809
+ // checking if user is logged out
810
+ if ( empty( $user_id ) || $user_id != $current_user->ID ) {
811
+ $return = true;
812
+ }
813
+ } elseif ( $level === '0' || $level === 0 || strtoupper( $level ) === 'E' ) {
814
+ continue; // user with levels so not a "non-member" or expired
815
+ } else {
816
+ // checking a level id
817
+ $level_obj = pmpro_getLevel( is_numeric( $level ) ? abs( intval( $level ) ) : $level ); // make sure our level is in a proper format
818
+ if ( empty( $level_obj ) ) {
819
+ continue;} //invalid level
820
+ $found_level = false;
821
+
822
+ foreach ( $membership_levels as $membership_level ) {
823
+ if ( $membership_level->id == $level_obj->id ) {
824
+ $found_level = true;
825
+ }
826
+ }
827
+
828
+ if ( is_numeric( $level ) && intval( $level ) < 0 && ! $found_level ) {
829
+ $return = true;
830
+ } elseif ( is_numeric( $level ) && intval( $level ) > 0 && $found_level ) {
831
+ $return = true;
832
+ } elseif ( ! is_numeric( $level ) ) { // if a level name was passed
833
+ $return = $found_level;
834
+ }
835
+ }
836
+ }
837
+ }
838
+ }
839
+
840
+ $return = apply_filters( 'pmpro_has_membership_level', $return, $user_id, $levels );
841
+ return $return;
842
+ }
843
+
844
+ /**
845
+ * Wrapper for pmpro_changeMembershipLevel to cancel one level.
846
+ *
847
+ * @since 1.8.11
848
+ */
849
+ function pmpro_cancelMembershipLevel( $cancel_level, $user_id = null, $old_level_status = 'inactive' ) {
850
+ return pmpro_changeMembershipLevel( 0, $user_id, $old_level_status, $cancel_level );
851
+ }
852
+
853
+ /**
854
+ * Create, add, remove or updates the membership level of the given user to the given level.
855
+ *
856
+ * $level may either be the ID or name of the desired membership_level.
857
+ * If $user_id is omitted, the value will be retrieved from $current_user.
858
+ *
859
+ * @param int $level ID of level to set as new level, use 0 to cancel membership
860
+ * @param int $user_id ID of the user to change levels for
861
+ * @param string $old_level_status The status to set for the row in the memberships users table. (e.g. inactive, cancelled, admin_cancelled, expired) Defaults to 'inactive'.
862
+ * $param int $cancel_level If set cancel just this one level instead of all active levels (to support Multiple Memberships per User)
863
+ *
864
+ * Return values:
865
+ * Success returns boolean true.
866
+ * Failure returns boolean false.
867
+ */
868
+ function pmpro_changeMembershipLevel( $level, $user_id = null, $old_level_status = 'inactive', $cancel_level = null ) {
869
+ global $wpdb;
870
+ global $current_user, $pmpro_error;
871
+
872
+ if ( empty( $user_id ) ) {
873
+ $user_id = $current_user->ID;
874
+ }
875
+
876
+ if ( empty( $user_id ) ) {
877
+ $pmpro_error = __( 'User ID not found.', 'paid-memberships-pro' );
878
+ return false;
879
+ }
880
+
881
+ // make sure user id is int for security
882
+ $user_id = intval( $user_id );
883
+
884
+ if ( empty( $level ) ) {
885
+ $level = 0;
886
+ } else if ( is_array( $level ) ) {
887
+ // custom level
888
+ if ( empty( $level['membership_id'] ) ) {
889
+ $pmpro_error = __( 'No membership_id specified in pmpro_changeMembershipLevel.', 'paid-memberships-pro' );
890
+ return false;
891
+ }
892
+
893
+ $level_obj = pmpro_getLevel( $level['membership_id'] );
894
+ if ( empty( $level_obj ) ) {
895
+ $pmpro_error = __( 'Invalid level.', 'paid-memberships-pro' );
896
+ return false;
897
+ }
898
+ unset( $level_obj );
899
+ } else {
900
+ // just level id
901
+ $level_obj = pmpro_getLevel( $level );
902
+ if ( empty( $level_obj ) ) {
903
+ $pmpro_error = __( 'Invalid level.', 'paid-memberships-pro' );
904
+ return false;
905
+ }
906
+ $level = $level_obj->id;
907
+ unset( $level_obj );
908
+ }
909
+
910
+ // if it's a custom level, they're changing
911
+ if ( ! is_array( $level ) ) {
912
+ // are they even changing?
913
+ if ( pmpro_hasMembershipLevel( $level, $user_id ) ) {
914
+ $pmpro_error = __( 'not changing?', 'paid-memberships-pro' );
915
+ return false; // not changing
916
+ }
917
+ }
918
+
919
+ // get all active membershipships for this user
920
+ $old_levels = pmpro_getMembershipLevelsForUser( $user_id );
921
+
922
+ // get level id
923
+ if ( is_array( $level ) ) {
924
+ $level_id = $level['membership_id']; // custom level
925
+ } else {
926
+ $level_id = $level; // just id
927
+ }
928
+
929
+ /**
930
+ * Action to run before the membership level changes.
931
+ *
932
+ * @param int $level_id ID of the level changed to.
933
+ * @param int $user_id ID of the user changed.
934
+ * @param array $old_levels array of prior levels the user belonged to.
935
+ * $param int $cancel_level ID of the level being cancelled if specified
936
+ */
937
+ do_action( 'pmpro_before_change_membership_level', $level_id, $user_id, $old_levels, $cancel_level );
938
+
939
+ // deactivate old memberships based on the old_level_status passed in (updates pmpro_memberships_users table)
940
+ $pmpro_deactivate_old_levels = true;
941
+ /**
942
+ * Filter whether old levels should be deactivated or not. This supports the MMPU addon.
943
+ * Typically you'll want to hook into pmpro_before_change_membership_level
944
+ * or pmpro_after_change_membership_level later to run your own deactivation logic.
945
+ *
946
+ * @since 1.8.11
947
+ * @var $pmpro_deactivate_old_levels bool True or false if levels should be deactivated. Defaults to true.
948
+ */
949
+ $pmpro_deactivate_old_levels = apply_filters( 'pmpro_deactivate_old_levels', $pmpro_deactivate_old_levels );
950
+
951
+ // make sure we deactivate the specified level if it's passed in
952
+ if ( ! empty( $cancel_level ) ) {
953
+ $pmpro_deactivate_old_levels = true;
954
+ $new_old_levels = array();
955
+ foreach ( $old_levels as $key => $old_level ) {
956
+ if ( $old_level->id == $cancel_level ) {
957
+ $new_old_levels[] = $old_levels[ $key ];
958
+ break;
959
+ }
960
+ }
961
+ $old_levels = $new_old_levels;
962
+ }
963
+
964
+ if ( $old_levels && $pmpro_deactivate_old_levels ) {
965
+ foreach ( $old_levels as $old_level ) {
966
+
967
+ $sql = "UPDATE $wpdb->pmpro_memberships_users SET `status`='$old_level_status', `enddate`='" . current_time( 'mysql' ) . "' WHERE `id`=" . $old_level->subscription_id;
968
+
969
+ if ( ! $wpdb->query( $sql ) ) {
970
+ $pmpro_error = __( 'Error interacting with database', 'paid-memberships-pro' ) . ': ' . ( $wpdb->last_error ? $wpdb->last_error : 'unavailable' );
971
+
972
+ return false;
973
+ }
974
+ }
975
+ }
976
+
977
+ // should we cancel their gateway subscriptions?
978
+ if ( ! empty( $cancel_level ) ) {
979
+ $pmpro_cancel_previous_subscriptions = true; // don't filter cause we're doing just the one
980
+
981
+ $other_order_ids = $wpdb->get_col( "SELECT id FROM $wpdb->pmpro_membership_orders WHERE user_id = '" . $user_id . "' AND status = 'success' AND membership_id = '" . esc_sql( $cancel_level ) . "' ORDER BY id DESC LIMIT 1" );
982
+ } else {
983
+ $pmpro_cancel_previous_subscriptions = true;
984
+ if ( isset( $_REQUEST['cancel_membership'] ) && $_REQUEST['cancel_membership'] == false ) {
985
+ $pmpro_cancel_previous_subscriptions = false;
986
+ }
987
+ $pmpro_cancel_previous_subscriptions = apply_filters( 'pmpro_cancel_previous_subscriptions', $pmpro_cancel_previous_subscriptions );
988
+
989
+ $other_order_ids = $wpdb->get_col(
990
+ "SELECT id, IF(subscription_transaction_id = '', CONCAT('UNIQUE_SUB_ID_', id), subscription_transaction_id) as unique_sub_id
991
+ FROM $wpdb->pmpro_membership_orders
992
+ WHERE user_id = '" . $user_id . "'
993
+ AND status = 'success'
994
+ GROUP BY unique_sub_id
995
+ ORDER BY id DESC"
996
+ );
997
+ }
998
+
999
+ $other_order_ids = apply_filters( 'pmpro_other_order_ids_to_cancel', $other_order_ids );
1000
+
1001
+ // cancel any other subscriptions they have (updates pmpro_membership_orders table)
1002
+ if ( $pmpro_cancel_previous_subscriptions && ! empty( $other_order_ids ) ) {
1003
+ foreach ( $other_order_ids as $order_id ) {
1004
+ $c_order = new MemberOrder( $order_id );
1005
+ $c_order->cancel();
1006
+
1007
+ if ( ! empty( $c_order->error ) ) {
1008
+ $pmpro_error = $c_order->error;
1009
+ }
1010
+ }
1011
+ }
1012
+
1013
+ // insert current membership
1014
+ if ( ! empty( $level ) ) {
1015
+ // make sure the dates are in good formats
1016
+ if ( is_array( $level ) ) {
1017
+ // Better support mySQL Strict Mode by passing a proper enum value for cycle_period
1018
+ if ( $level['cycle_period'] == '' ) {
1019
+ $level['cycle_period'] = 0; }
1020
+
1021
+ // clean up date formatting (string/not string)
1022
+ $level['startdate'] = preg_replace( '/\'/', '', $level['startdate'] );
1023
+ $level['enddate'] = preg_replace( '/\'/', '', $level['enddate'] );
1024
+
1025
+ $sql = $wpdb->prepare(
1026
+ "
1027
+ INSERT INTO {$wpdb->pmpro_memberships_users}
1028
+ (`user_id`, `membership_id`, `code_id`, `initial_payment`, `billing_amount`, `cycle_number`, `cycle_period`, `billing_limit`, `trial_amount`, `trial_limit`, `startdate`, `enddate`)
1029
+ VALUES
1030
+ ( %d, %d, %d, %s, %s, %d, %s, %d, %s, %d, %s, %s )",
1031
+ $level['user_id'], // integer
1032
+ $level['membership_id'], // integer
1033
+ $level['code_id'], // integer
1034
+ $level['initial_payment'], // float (string)
1035
+ $level['billing_amount'], // float (string)
1036
+ $level['cycle_number'], // integer
1037
+ $level['cycle_period'], // string (enum)
1038
+ $level['billing_limit'], // integer
1039
+ $level['trial_amount'], // float (string)
1040
+ $level['trial_limit'], // integer
1041
+ $level['startdate'], // string (date)
1042
+ $level['enddate'] // string (date)
1043
+ );
1044
+ } else {
1045
+ $sql = $wpdb->prepare(
1046
+ "
1047
+ INSERT INTO {$wpdb->pmpro_memberships_users}
1048
+ ( `user_id`, `membership_id`, `code_id`, `initial_payment`, `billing_amount`, `cycle_number`, `cycle_period`, `billing_limit`, `trial_amount`, `trial_limit`, `startdate`, `enddate`)
1049
+ VALUES
1050
+ ( %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %s, %s )",
1051
+ $user_id,
1052
+ $level_id,
1053
+ '0',
1054
+ '0',
1055
+ '0',
1056
+ '0',
1057
+ '0',
1058
+ '0',
1059
+ '0',
1060
+ '0',
1061
+ current_time( 'mysql' ),
1062
+ '0000-00-00 00:00:00'
1063
+ );
1064
+ }
1065
+
1066
+ if ( false === $wpdb->query( $sql ) ) {
1067
+ $pmpro_error = sprintf( __( 'Error interacting with database: %s', 'paid-memberships-pro' ), ( ! empty( $wpdb->last_error ) ? $wpdb->last_error : 'unavailable' ) );
1068
+ return false;
1069
+ }
1070
+ }
1071
+
1072
+ // remove cached level
1073
+ global $all_membership_levels;
1074
+ unset( $all_membership_levels[ $user_id ] );
1075
+
1076
+ // update user data and call action
1077
+ pmpro_set_current_user();
1078
+
1079
+ /**
1080
+ * Action to run after the membership level changes.
1081
+ *
1082
+ * @param int $level_id ID of the level changed to.
1083
+ * @param int $user_id ID of the user changed.
1084
+ * $param int $cancel_level ID of the level being cancelled if specified.
1085
+ */
1086
+ do_action( 'pmpro_after_change_membership_level', $level_id, $user_id, $cancel_level );
1087
+ return true;
1088
+ }
1089
+
1090
+ /**
1091
+ * Function to list WordPress categories in hierarchical format.
1092
+ *
1093
+ * This is a helper function for the Membership Categories section in adminpages/membershiplevels.php
1094
+ *
1095
+ * @since 1.8.11
1096
+ *
1097
+ * @param int $parent_id
1098
+ * @param array $level_categories
1099
+ */
1100
+ function pmpro_listCategories( $parent_id = 0, $level_categories = array() ) {
1101
+
1102
+ $args = array(
1103
+ 'parent' => $parent_id,
1104
+ 'hide_empty' => false,
1105
+ );
1106
+
1107
+ $cats = get_categories( apply_filters( 'pmpro_list_categories_args', $args ) );
1108
+
1109
+ if ( $cats ) {
1110
+ foreach ( $cats as $cat ) {
1111
+ $name = 'membershipcategory_' . $cat->term_id;
1112
+ if ( ! empty( $level_categories ) ) {
1113
+ $checked = checked( in_array( $cat->term_id, $level_categories ), true, false );
1114
+ } else {
1115
+ $checked = '';
1116
+ }
1117
+ echo "<ul><li class=membershipcategory><input type=checkbox name={$name} id={$name} value=yes {$checked}><label for={$name}>{$cat->name}</label>";
1118
+ pmpro_listCategories( $cat->term_id, $level_categories );
1119
+ echo '</li></ul>';
1120
+ }
1121
+ }
1122
+ }
1123
+
1124
+ /*
1125
+ pmpro_toggleMembershipCategory() creates or deletes a linking entry between the membership level and post category tables.
1126
+ *
1127
+ * $level may either be the ID or name of the desired membership_level.
1128
+ * $category must be a valid post category ID.
1129
+ *
1130
+ * Return values:
1131
+ * Success returns boolean true.
1132
+ * Failure returns a string containing the error message.
1133
+ */
1134
+ function pmpro_toggleMembershipCategory( $level, $category, $value ) {
1135
+ global $wpdb;
1136
+ $category = intval( $category );
1137
+
1138
+ if ( ( $level = intval( $level ) ) <= 0 ) {
1139
+ $safe = addslashes( $level );
1140
+ if ( ( $level = intval( $wpdb->get_var( "SELECT id FROM {$wpdb->pmpro_membership_levels} WHERE name = '$safe' LIMIT 1" ) ) ) <= 0 ) {
1141
+ return __( 'Membership level not found.', 'paid-memberships-pro' );
1142
+ }
1143
+ }
1144
+
1145
+ if ( $value ) {
1146
+ $sql = "REPLACE INTO {$wpdb->pmpro_memberships_categories} (`membership_id`,`category_id`) VALUES ('$level','$category')";
1147
+ $wpdb->query( $sql );
1148
+ if ( $wpdb->last_error ) {
1149
+ return $wpdb->last_error;
1150
+ }
1151
+ } else {
1152
+ $sql = "DELETE FROM {$wpdb->pmpro_memberships_categories} WHERE `membership_id` = '$level' AND `category_id` = '$category' LIMIT 1";
1153
+ $wpdb->query( $sql );
1154
+ if ( $wpdb->last_error ) {
1155
+ return $wpdb->last_error;
1156
+ }
1157
+ }
1158
+
1159
+ return true;
1160
+ }
1161
+
1162
+ /*
1163
+ pmpro_updateMembershipCategories() ensures that all those and only those categories given
1164
+ * are associated with the given membership level.
1165
+ *
1166
+ * $level is a valid membership level ID or name
1167
+ * $categories is an array of post category IDs
1168
+ *
1169
+ * Return values:
1170
+ * Success returns boolean true.
1171
+ * Failure returns a string containing the error message.
1172
+ */
1173
+ function pmpro_updateMembershipCategories( $level, $categories ) {
1174
+ global $wpdb;
1175
+
1176
+ if ( ! is_numeric( $level ) ) {
1177
+ $level = $wpdb->get_var( "SELECT id FROM $wpdb->pmpro_membership_levels WHERE name = '" . esc_sql( $level ) . "' LIMIT 1" );
1178
+ if ( empty( $level ) ) {
1179
+ return __( 'Membership level not found.', 'paid-memberships-pro' );
1180
+ }
1181
+ }
1182
+
1183
+ // remove all existing links...
1184
+ $sqlQuery = "DELETE FROM $wpdb->pmpro_memberships_categories WHERE `membership_id` = '" . esc_sql( $level ) . "'";
1185
+ $wpdb->query( $sqlQuery );
1186
+ if ( $wpdb->last_error ) {
1187
+ return $wpdb->last_error;
1188
+ }
1189
+
1190
+ // add the given links [back?] in...
1191
+ foreach ( $categories as $cat ) {
1192
+ if ( is_string( $r = pmpro_toggleMembershipCategory( $level, $cat, true ) ) ) {
1193
+ // uh oh, error
1194
+ return $r;
1195
+ }
1196
+ }
1197
+
1198
+ // all good
1199
+ return true;
1200
+ }
1201
+
1202
+ /*
1203
+ pmpro_getMembershipCategories() returns the categories for a given level
1204
+ *
1205
+ * $level_id is a valid membership level ID
1206
+ *
1207
+ * Return values:
1208
+ * Success returns boolean true.
1209
+ * Failure returns boolean false.
1210
+ */
1211
+ function pmpro_getMembershipCategories( $level_id ) {
1212
+ $level_id = intval( $level_id );
1213
+
1214
+ global $wpdb;
1215
+ $categories = $wpdb->get_col(
1216
+ "SELECT c.category_id
1217
+ FROM {$wpdb->pmpro_memberships_categories} AS c
1218
+ WHERE c.membership_id = '" . $level_id . "'"
1219
+ );
1220
+
1221
+ return $categories;
1222
+ }
1223
+
1224
+
1225
+ function pmpro_isAdmin( $user_id = null ) {
1226
+ global $current_user, $wpdb;
1227
+ if ( ! $user_id ) {
1228
+ $user_id = $current_user->ID;
1229
+ }
1230
+
1231
+ if ( ! $user_id ) {
1232
+ return false;
1233
+ }
1234
+
1235
+ $admincap = user_can( $user_id, 'manage_options' );
1236
+ if ( $admincap ) {
1237
+ return true;
1238
+ } else {
1239
+ return false;
1240
+ }
1241
+ }
1242
+
1243
+ function pmpro_replaceUserMeta( $user_id, $meta_keys, $meta_values, $prev_values = null ) {
1244
+ // expects all arrays for last 3 params or all strings
1245
+ if ( ! is_array( $meta_keys ) ) {
1246
+ $meta_keys = array( $meta_keys );
1247
+ $meta_values = array( $meta_values );
1248
+ $prev_values = array( $prev_values );
1249
+ }
1250
+
1251
+ for ( $i = 0; $i < count( $meta_values ); $i++ ) {
1252
+ if ( $prev_values[ $i ] ) {
1253
+ update_user_meta( $user_id, $meta_keys[ $i ], $meta_values[ $i ], $prev_values[ $i ] );
1254
+ } else {
1255
+ $old_value = get_user_meta( $user_id, $meta_keys[ $i ], true );
1256
+ if ( $old_value ) {
1257
+ update_user_meta( $user_id, $meta_keys[ $i ], $meta_values[ $i ], $old_value );
1258
+ } else {
1259
+ update_user_meta( $user_id, $meta_keys[ $i ], $meta_values[ $i ] );
1260
+ }
1261
+ }
1262
+ }
1263
+
1264
+ return $i;
1265
+ }
1266
+
1267
+ function pmpro_getMetavalues( $query ) {
1268
+ global $wpdb;
1269
+
1270
+ $results = $wpdb->get_results( $query );
1271
+ $r = new stdClass();
1272
+ foreach ( $results as $result ) {
1273
+ if ( ! empty( $r ) && ! empty( $result->key ) ) {
1274
+ $r->{$result->key} = $result->value;
1275
+ }
1276
+ }
1277
+
1278
+ return $r;
1279
+ }
1280
+
1281
+ // function to return the pagination string
1282
+ function pmpro_getPaginationString( $page = 1, $totalitems, $limit = 15, $adjacents = 1, $targetpage = '/', $pagestring = '&pn=' ) {
1283
+ // defaults
1284
+ if ( ! $adjacents ) {
1285
+ $adjacents = 1;
1286
+ }
1287
+ if ( ! $limit ) {
1288
+ $limit = 15;
1289
+ }
1290
+ if ( ! $page ) {
1291
+ $page = 1;
1292
+ }
1293
+ if ( ! $targetpage ) {
1294
+ $targetpage = '/';
1295
+ }
1296
+
1297
+ // other vars
1298
+ $prev = $page - 1; // previous page is page - 1
1299
+ $next = $page + 1; // next page is page + 1
1300
+ $lastpage = ceil( $totalitems / $limit ); // lastpage is = total items / items per page, rounded up.
1301
+ $lpm1 = $lastpage - 1; // last page minus 1
1302
+
1303
+ /*
1304
+ Now we apply our rules and draw the pagination object.
1305
+ We're actually saving the code to a variable in case we want to draw it more than once.
1306
+ */
1307
+ $pagination = '';
1308
+ if ( $lastpage > 1 ) {
1309
+ $pagination .= '<div class="pmpro_pagination"';
1310
+ if ( ! empty( $margin ) || ! empty( $padding ) ) {
1311
+ $pagination .= ' style="';
1312
+ if ( $margin ) {
1313
+ $pagination .= "margin: $margin;";
1314
+ }
1315
+ if ( $padding ) {
1316
+ $pagination .= "padding: $padding;";
1317
+ }
1318
+ $pagination .= '"';
1319
+ }
1320
+ $pagination .= '>';
1321
+
1322
+ // previous button
1323
+ if ( $page > 1 ) {
1324
+ $pagination .= "<a href=\"$targetpage$pagestring$prev\">&laquo; prev</a>";
1325
+ } else {
1326
+ $pagination .= '<span class="disabled">&laquo; prev</span>';
1327
+ }
1328
+
1329
+ // pages
1330
+ if ( $lastpage < 7 + ( $adjacents * 2 ) ) {
1331
+ for ( $counter = 1; $counter <= $lastpage; $counter++ ) {
1332
+ if ( $counter == $page ) {
1333
+ $pagination .= "<span class=\"current\">$counter</span>";
1334
+ } else {
1335
+ $pagination .= '<a href="' . $targetpage . $pagestring . $counter . "\">$counter</a>";
1336
+ }
1337
+ }
1338
+ } elseif ( $lastpage >= 7 + ( $adjacents * 2 ) ) {
1339
+ // close to beginning; only hide later pages
1340
+ if ( $page < 1 + ( $adjacents * 3 ) ) {
1341
+ for ( $counter = 1; $counter < 4 + ( $adjacents * 2 ); $counter++ ) {
1342
+ if ( $counter == $page ) {
1343
+ $pagination .= "<span class=\"current\">$counter</span>";
1344
+ } else {
1345
+ $pagination .= '<a href="' . $targetpage . $pagestring . $counter . "\">$counter</a>";
1346
+ }
1347
+ }
1348
+ $pagination .= '...';
1349
+ $pagination .= '<a href="' . $targetpage . $pagestring . $lpm1 . "\">$lpm1</a>";
1350
+ $pagination .= '<a href="' . $targetpage . $pagestring . $lastpage . "\">$lastpage</a>";
1351
+ } // in middle; hide some front and some back
1352
+ elseif ( $lastpage - ( $adjacents * 2 ) > $page && $page > ( $adjacents * 2 ) ) {
1353
+ $pagination .= '<a href="' . $targetpage . $pagestring . '1">1</a>';
1354
+ $pagination .= '<a href="' . $targetpage . $pagestring . '2">2</a>';
1355
+ $pagination .= '...';
1356
+ for ( $counter = $page - $adjacents; $counter <= $page + $adjacents; $counter++ ) {
1357
+ if ( $counter == $page ) {
1358
+ $pagination .= "<span class=\"current\">$counter</span>";
1359
+ } else {
1360
+ $pagination .= '<a href="' . $targetpage . $pagestring . $counter . "\">$counter</a>";
1361
+ }
1362
+ }
1363
+ $pagination .= '...';
1364
+ $pagination .= '<a href="' . $targetpage . $pagestring . $lpm1 . "\">$lpm1</a>";
1365
+ $pagination .= '<a href="' . $targetpage . $pagestring . $lastpage . "\">$lastpage</a>";
1366
+ } // close to end; only hide early pages
1367
+ else {
1368
+ $pagination .= '<a href="' . $targetpage . $pagestring . '1">1</a>';
1369
+ $pagination .= '<a href="' . $targetpage . $pagestring . '2">2</a>';
1370
+ $pagination .= '...';
1371
+ for ( $counter = $lastpage - ( 1 + ( $adjacents * 3 ) ); $counter <= $lastpage; $counter++ ) {
1372
+ if ( $counter == $page ) {
1373
+ $pagination .= "<span class=\"current\">$counter</span>";
1374
+ } else {
1375
+ $pagination .= '<a href="' . $targetpage . $pagestring . $counter . "\">$counter</a>";
1376
+ }
1377
+ }
1378
+ }
1379
+ }
1380
+
1381
+ // next button
1382
+ if ( $page < $counter - 1 ) {
1383
+ $pagination .= '<a href="' . $targetpage . $pagestring . $next . '">next &raquo;</a>';
1384
+ } else {
1385
+ $pagination .= '<span class="disabled">next &raquo;</span>';
1386
+ }
1387
+ $pagination .= "</div>\n";
1388
+ }
1389
+
1390
+ return $pagination;
1391
+
1392
+ }
1393
+
1394
+ function pmpro_calculateInitialPaymentRevenue( $s = null, $l = null ) {
1395
+ global $wpdb;
1396
+
1397
+ // if we're limiting users by search
1398
+ if ( $s || $l ) {
1399
+ $user_ids_query = "SELECT u.ID FROM $wpdb->users u LEFT JOIN $wpdb->usermeta um ON u.ID = um.user_id LEFT JOIN $wpdb->pmpro_memberships_users mu ON u.ID = mu.user_id WHERE mu.status = 'active' ";
1400
+ if ( $s ) {
1401
+ $user_ids_query .= "AND (u.user_login LIKE '%" . esc_sql( $s ) . "%' OR u.user_email LIKE '%" . esc_sql( $s ) . "%' OR um.meta_value LIKE '%$" . esc_sql( s ) . "%') ";
1402
+ }
1403
+ if ( $l ) {
1404
+ $user_ids_query .= "AND mu.membership_id = '" . esc_sql( $l ) . "' ";
1405
+ }
1406
+ }
1407
+
1408
+ // query to sum initial payments
1409
+ $sqlQuery = "SELECT SUM(initial_payment) FROM $wpdb->pmpro_memberships_users WHERE `status` = 'active' ";
1410
+ if ( ! empty( $user_ids_query ) ) {
1411
+ $sqlQuery .= 'AND user_id IN(' . $user_ids_query . ') ';
1412
+ }
1413
+
1414
+ $total = $wpdb->get_var( $sqlQuery );
1415
+
1416
+ return (double) $total;
1417
+ }
1418
+
1419
+ function pmpro_calculateRecurringRevenue( $s, $l ) {
1420
+ global $wpdb;
1421
+
1422
+ // if we're limiting users by search
1423
+ if ( $s || $l ) {
1424
+ $user_ids_query = "AND user_id IN(SELECT u.ID FROM $wpdb->users u LEFT JOIN $wpdb->usermeta um ON u.ID = um.user_id LEFT JOIN $wpdb->pmpro_memberships_users mu ON u.ID = mu.user_id WHERE mu.status = 'active' ";
1425
+ if ( $s ) {
1426
+ $user_ids_query .= "AND (u.user_login LIKE '%" . esc_sql( $s ) . "%' OR u.user_email LIKE '%" . esc_sql( $s ) . "%' OR um.meta_value LIKE '%" . esc_sql( $s ) . "%') ";
1427
+ }
1428
+ if ( $l ) {
1429
+ $user_ids_query .= "AND mu.membership_id = '" . esc_sql( $l ) . "' ";
1430
+ }
1431
+ $user_ids_query .= ')';
1432
+ } else {
1433
+ $user_ids_query = '';
1434
+ }
1435
+
1436
+ // 4 queries to get annual earnings for each cycle period. currently ignoring trial periods and billing limits.
1437
+ $sqlQuery = "
1438
+ SELECT SUM((12/cycle_number)*billing_amount) FROM $wpdb->pmpro_memberships_users WHERE status = 'active' AND cycle_period = 'Month' AND cycle_number <> 12 $user_ids_query
1439
+ UNION
1440
+ SELECT SUM((365/cycle_number)*billing_amount) FROM $wpdb->pmpro_memberships_users WHERE status = 'active' AND cycle_period = 'Day' AND cycle_number <> 365 $user_ids_query
1441
+ UNION
1442
+ SELECT SUM((52/cycle_number)*billing_amount) FROM $wpdb->pmpro_memberships_users WHERE status = 'active' AND cycle_period = 'Week' AND cycle_number <> 52 $user_ids_query
1443
+ UNION
1444
+ SELECT SUM(billing_amount) FROM $wpdb->pmpro_memberships_users WHERE status = 'active' AND cycle_period = 'Year' $user_ids_query
1445
+ ";
1446
+
1447
+ $annual_revenues = $wpdb->get_col( $sqlQuery );
1448
+
1449
+ $total = 0;
1450
+ foreach ( $annual_revenues as $r ) {
1451
+ $total += $r;
1452
+ }
1453
+
1454
+ return $total;
1455
+ }
1456
+
1457
+ function pmpro_generateUsername( $firstname = '', $lastname = '', $email = '' ) {
1458
+ global $wpdb;
1459
+
1460
+ // try first initial + last name, firstname, lastname
1461
+ $firstname = preg_replace( '/[^A-Za-z]/', '', $firstname );
1462
+ $lastname = preg_replace( '/[^A-Za-z]/', '', $lastname );
1463
+ if ( $firstname && $lastname ) {
1464
+ $username = substr( $firstname, 0, 1 ) . $lastname;
1465
+ } elseif ( $firstname ) {
1466
+ $username = $firstname;
1467
+ } elseif ( $lastname ) {
1468
+ $username = $lastname;
1469
+ }
1470
+
1471
+ // is it taken?
1472
+ $taken = $wpdb->get_var( "SELECT user_login FROM $wpdb->users WHERE user_login = '" . esc_sql( $username ) . "' LIMIT 1" );
1473
+
1474
+ if ( ! $taken ) {
1475
+ return $username;
1476
+ }
1477
+
1478
+ // try the beginning of the email address
1479
+ $emailparts = explode( '@', $email );
1480
+ if ( is_array( $emailparts ) ) {
1481
+ $email = preg_replace( '/[^A-Za-z]/', '', $emailparts[0] );
1482
+ }
1483
+
1484
+ if ( ! empty( $email ) ) {
1485
+ $username = $email;
1486
+ }
1487
+
1488
+ // is this taken? if not, add numbers until it works
1489
+ $taken = true;
1490
+ $count = 0;
1491
+ while ( $taken ) {
1492
+ // add a # to the end
1493
+ if ( $count ) {
1494
+ $username = preg_replace( '/[0-9]/', '', $username ) . $count;
1495
+ }
1496
+
1497
+ // taken?
1498
+ $taken = $wpdb->get_var( "SELECT user_login FROM $wpdb->users WHERE user_login = '" . esc_sql( $username ) . "' LIMIT 1" );
1499
+
1500
+ // increment the number
1501
+ $count++;
1502
+ }
1503
+
1504
+ // must have a good username now
1505
+ return $username;
1506
+ }
1507
+
1508
+ // get a new random code for discount codes
1509
+ function pmpro_getDiscountCode( $seed = null ) {
1510
+ global $wpdb;
1511
+
1512
+ while ( empty( $code ) ) {
1513
+ $scramble = md5( AUTH_KEY . current_time( 'timestamp' ) . $seed . SECURE_AUTH_KEY );
1514
+ $code = substr( $scramble, 0, 10 );
1515
+ $check = $wpdb->get_var( "SELECT code FROM $wpdb->pmpro_discount_codes WHERE code = '" . esc_sql( $code ) . "' LIMIT 1" );
1516
+ if ( $check || is_numeric( $code ) ) {
1517
+ $code = null;
1518
+ }
1519
+ }
1520
+
1521
+ return strtoupper( $code );
1522
+ }
1523
+
1524
+ // is a discount code valid - level_id could be a scalar or an array (or unset)
1525
+ function pmpro_checkDiscountCode( $code, $level_id = null, $return_errors = false ) {
1526
+ global $wpdb;
1527
+
1528
+ $error = false;
1529
+ $dbcode = false;
1530
+
1531
+ // no code, no code
1532
+ if ( empty( $code ) ) {
1533
+ $error = __( 'No code was given to check.', 'paid-memberships-pro' );
1534
+ }
1535
+
1536
+ // get code from db
1537
+ if ( ! $error ) {
1538
+ $dbcode = $wpdb->get_row( "SELECT *, UNIX_TIMESTAMP(starts) as starts, UNIX_TIMESTAMP(expires) as expires FROM $wpdb->pmpro_discount_codes WHERE code ='" . esc_sql( $code ) . "' LIMIT 1" );
1539
+
1540
+ // did we find it?
1541
+ if ( empty( $dbcode->id ) ) {
1542
+ $error = __( 'The discount code could not be found.', 'paid-memberships-pro' );
1543
+ }
1544
+ }
1545
+
1546
+ // check if the code has started
1547
+ if ( ! $error ) {
1548
+ // fix the date timestamps
1549
+ $dbcode->starts = strtotime( date_i18n( 'm/d/Y', $dbcode->starts ) );
1550
+ $dbcode->expires = strtotime( date_i18n( 'm/d/Y', $dbcode->expires ) );
1551
+
1552
+ // today
1553
+ $today = strtotime( date_i18n( 'm/d/Y 00:00:00', current_time( 'timestamp' ) ) );
1554
+
1555
+ // has this code started yet?
1556
+ if ( ! empty( $dbcode->starts ) && $dbcode->starts > $today ) {
1557
+ $error = sprintf( __( 'This discount code goes into effect on %s.', 'paid-memberships-pro' ), date_i18n( get_option( 'date_format' ), $dbcode->starts ) );
1558
+ }
1559
+ }
1560
+
1561
+ // check if the code is expired
1562
+ if ( ! $error ) {
1563
+ if ( ! empty( $dbcode->expires ) && $dbcode->expires < $today ) {
1564
+ $error = sprintf( __( 'This discount code expired on %s.', 'paid-memberships-pro' ), date_i18n( get_option( 'date_format' ), $dbcode->expires ) );
1565
+ }
1566
+ }
1567
+
1568
+ // have we run out of uses?
1569
+ if ( ! $error ) {
1570
+ if ( $dbcode->uses > 0 ) {
1571
+ $used = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->pmpro_discount_codes_uses WHERE code_id = '" . $dbcode->id . "'" );
1572
+ if ( $used >= $dbcode->uses ) {
1573
+ $error = __( 'This discount code is no longer valid.', 'paid-memberships-pro' );
1574
+ }
1575
+ }
1576
+ }
1577
+
1578
+ // if a level was passed check if this code applies
1579
+ if ( ! $error ) {
1580
+ $pmpro_check_discount_code_levels = apply_filters( 'pmpro_check_discount_code_levels', true, $dbcode->id );
1581
+ if ( ! empty( $level_id ) && $pmpro_check_discount_code_levels ) {
1582
+ // clean up level id for security before the database call
1583
+ if ( is_array( $level_id ) ) {
1584
+ $levelnums = array_map( 'intval', $level_id );
1585
+ $level_id = implode( ',', $levelnums );
1586
+ } else {
1587
+ $level_id = intval( $level_id );
1588
+ }
1589
+ $code_level = $wpdb->get_row( "SELECT l.id, cl.*, l.name, l.description, l.allow_signups FROM $wpdb->pmpro_discount_codes_levels cl LEFT JOIN $wpdb->pmpro_membership_levels l ON cl.level_id = l.id WHERE cl.code_id = '" . $dbcode->id . "' AND cl.level_id IN (" . $level_id . ') LIMIT 1' );
1590
+
1591
+ if ( empty( $code_level ) ) {
1592
+ $error = __( 'This discount code does not apply to this membership level.', 'paid-memberships-pro' );
1593
+ }
1594
+ }
1595
+ }
1596
+
1597
+ /**
1598
+ * Filter the results of the discount code check.
1599
+ *
1600
+ * @since 1.7.13.1
1601
+ *
1602
+ * @param bool $okay true if code check is okay or false if there was an error
1603
+ * @param object $dbcode Object containing code data from the database row
1604
+ * @param int $level_id ID of the level the user is checking out for.
1605
+ * @param string $code Discount code string.
1606
+ *
1607
+ * @return mixed $okay true if okay, false or error message string if not okay
1608
+ */
1609
+ $okay = ! $error;
1610
+ $pmpro_check_discount_code = apply_filters( 'pmpro_check_discount_code', $okay, $dbcode, $level_id, $code );
1611
+ if ( is_string( $pmpro_check_discount_code ) ) {
1612
+ $error = $pmpro_check_discount_code; // string returned, this is an error
1613
+ } elseif ( ! $pmpro_check_discount_code && ! $error ) {
1614
+ $error = true; // no error before, but filter returned error
1615
+ } elseif ( $pmpro_check_discount_code ) {
1616
+ $error = false; // filter is true, so error false
1617
+ }
1618
+
1619
+ // return
1620
+ if ( $error ) {
1621
+ // there was an error
1622
+ if ( ! empty( $return_errors ) ) {
1623
+ return array( false, $error );
1624
+ } else {
1625
+ return false;
1626
+ }
1627
+ } else {
1628
+ // guess we're all good
1629
+ if ( ! empty( $return_errors ) ) {
1630
+ return array( true, __( 'This discount code is okay.', 'paid-memberships-pro' ) );
1631
+ } else {
1632
+ return true;
1633
+ }
1634
+ }
1635
+ }
1636
+
1637
+ function pmpro_no_quotes( $s, $quotes = array( "'", '"' ) ) {
1638
+ return str_replace( $quotes, '', $s );
1639
+ }
1640
+
1641
+ // from: http://www.php.net/manual/en/function.implode.php#86845
1642
+ function pmpro_implodeToEnglish( $array, $conjunction = 'and' ) {
1643
+ // sanity check
1644
+ if ( ! $array || ! count( $array ) ) {
1645
+ return '';
1646
+ }
1647
+
1648
+ // get last element
1649
+ $last = array_pop( $array );
1650
+
1651
+ // if it was the only element - return it
1652
+ if ( ! count( $array ) ) {
1653
+ return $last;
1654
+ }
1655
+
1656
+ // possibly translate the conjunction
1657
+ if ( $conjunction == 'and' ) {
1658
+ $conjunction = __( 'and', 'paid-memberships-pro' );
1659
+ }
1660
+
1661
+ return implode( ', ', $array ) . ' ' . $conjunction . ' ' . $last;
1662
+ }
1663
+
1664
+ // from yoast wordpress seo
1665
+ function pmpro_text_limit( $text, $limit, $finish = '&hellip;' ) {
1666
+ if ( strlen( $text ) > $limit ) {
1667
+ $text = substr( $text, 0, $limit );
1668
+ $text = substr( $text, 0, - ( strlen( strrchr( $text, ' ' ) ) ) );
1669
+ $text .= $finish;
1670
+ }
1671
+ return $text;
1672
+ }
1673
+
1674
+ /*
1675
+ pmpro_getMembershipLevelForUser() returns the first active membership level for a user
1676
+ *
1677
+ * If $user_id is omitted, the value will be retrieved from $current_user.
1678
+ *
1679
+ * Return values:
1680
+ * Success returns the level object.
1681
+ * Failure returns false.
1682
+ */
1683
+ function pmpro_getMembershipLevelForUser( $user_id = null, $force = false ) {
1684
+ if ( empty( $user_id ) ) {
1685
+ global $current_user;
1686
+ $user_id = $current_user->ID;
1687
+ }
1688
+
1689
+ if ( empty( $user_id ) ) {
1690
+ return false;
1691
+ }
1692
+
1693
+ // make sure user id is int for security
1694
+ $user_id = intval( $user_id );
1695
+
1696
+ global $all_membership_levels;
1697
+
1698
+ if ( isset( $all_membership_levels[ $user_id ] ) && ! $force ) {
1699
+ return $all_membership_levels[ $user_id ];
1700
+ } else {
1701
+ global $wpdb;
1702
+ $all_membership_levels[ $user_id ] = $wpdb->get_row(
1703
+ "SELECT
1704
+ l.id AS ID,
1705
+ l.id as id,
1706
+ mu.id as subscription_id,
1707
+ l.name AS name,
1708
+ l.description,
1709
+ l.expiration_number,
1710
+ l.expiration_period,
1711
+ l.allow_signups,
1712
+ mu.initial_payment,
1713
+ mu.billing_amount,
1714
+ mu.cycle_number,
1715
+ mu.cycle_period,
1716
+ mu.billing_limit,
1717
+ mu.trial_amount,
1718
+ mu.trial_limit,
1719
+ mu.code_id as code_id,
1720
+ UNIX_TIMESTAMP(startdate) as startdate,
1721
+ UNIX_TIMESTAMP(enddate) as enddate
1722
+ FROM {$wpdb->pmpro_membership_levels} AS l
1723
+ JOIN {$wpdb->pmpro_memberships_users} AS mu ON (l.id = mu.membership_id)
1724
+ WHERE mu.user_id = $user_id AND mu.status = 'active'
1725
+ LIMIT 1"
1726
+ );
1727
+
1728
+ // if null, change to false to avoid user meta conflicts
1729
+ if ( empty( $all_membership_levels[ $user_id ] ) ) {
1730
+ $all_membership_levels[ $user_id ] = false;
1731
+ }
1732
+
1733
+ /**
1734
+ * pmpro_get_membership_level_for_user filter.
1735
+ *
1736
+ * Filters the returned level.
1737
+ *
1738
+ * @since 1.8.5.4
1739
+ *
1740
+ * @param object $level Level object.
1741
+ */
1742
+ $all_membership_levels[ $user_id ] = apply_filters( 'pmpro_get_membership_level_for_user', $all_membership_levels[ $user_id ], $user_id );
1743
+
1744
+ return $all_membership_levels[ $user_id ];
1745
+ }
1746
+ }
1747
+
1748
+ /*
1749
+ pmpro_getMembershipLevelsForUser() returns the membership levels for a user
1750
+ *
1751
+ * If $user_id is omitted, the value will be retrieved from $current_user.
1752
+ * By default it only includes actvie memberships.
1753
+ *
1754
+ * Return values:
1755
+ * Success returns an array of level objects.
1756
+ * Failure returns false.
1757
+ */
1758
+ function pmpro_getMembershipLevelsForUser( $user_id = null, $include_inactive = false ) {
1759
+ if ( empty( $user_id ) ) {
1760
+ global $current_user;
1761
+ $user_id = $current_user->ID;
1762
+ }
1763
+
1764
+ if ( empty( $user_id ) ) {
1765
+ return false;
1766
+ }
1767
+
1768
+ // make sure user id is int for security
1769
+ $user_id = intval( $user_id );
1770
+
1771
+ global $wpdb;
1772
+
1773
+ $levels = $wpdb->get_results(
1774
+ "SELECT
1775
+ l.id AS ID,
1776
+ l.id as id,
1777
+ mu.id as subscription_id,
1778
+ l.name,
1779
+ l.description,
1780
+ l.expiration_number,
1781
+ l.expiration_period,
1782
+ mu.initial_payment,
1783
+ mu.billing_amount,
1784
+ mu.cycle_number,
1785
+ mu.cycle_period,
1786
+ mu.billing_limit,
1787
+ mu.trial_amount,
1788
+ mu.trial_limit,
1789
+ mu.code_id as code_id,
1790
+ UNIX_TIMESTAMP(startdate) as startdate,
1791
+ UNIX_TIMESTAMP(enddate) as enddate
1792
+ FROM {$wpdb->pmpro_membership_levels} AS l
1793
+ JOIN {$wpdb->pmpro_memberships_users} AS mu ON (l.id = mu.membership_id)
1794
+ WHERE mu.user_id = $user_id" . ( $include_inactive ? '' : " AND mu.status = 'active'
1795
+ GROUP BY ID" )
1796
+ );
1797
+ /**
1798
+ * pmpro_get_membership_levels_for_user filter.
1799
+ *
1800
+ * Filters the returned levels.
1801
+ *
1802
+ * @since 1.8.5.4
1803
+ *
1804
+ * @param array $levels Array of level objects.
1805
+ */
1806
+ $levels = apply_filters( 'pmpro_get_membership_levels_for_user', $levels, $user_id );
1807
+
1808
+ return $levels;
1809
+ }
1810
+
1811
+ /**
1812
+ * Get a specific membership level for a user if they have that level.
1813
+ * This is better to use when MMPU is enabled on the site.
1814
+ *
1815
+ * If $user_id is omitted, the value will be retrieved from $current_user.
1816
+ *
1817
+ * Return values:
1818
+ * Success returns the level object.
1819
+ * Failure returns false.
1820
+ *
1821
+ * @param int $user_id User ID to check for
1822
+ * @param int $level_id Level ID to check for.
1823
+ */
1824
+ function pmpro_getSpecificMembershipLevelForUser( $user_id = null, $level_id ) {
1825
+ if ( empty( $user_id ) ) {
1826
+ global $current_user;
1827
+ $user_id = $current_user->ID;
1828
+ }
1829
+
1830
+ if ( empty( $user_id ) || empty( $level_id ) ) {
1831
+ return false;
1832
+ }
1833
+
1834
+ $all_levels = pmpro_getMembershipLevelsForUser( $user_id );
1835
+
1836
+ foreach ( $all_levels as $level ) {
1837
+ if ( $level->id == $level_id ) {
1838
+ return $level;
1839
+ }
1840
+ }
1841
+
1842
+ return false;
1843
+ }
1844
+
1845
+ /*
1846
+ pmpro_getLevel() returns the level object for a level
1847
+ *
1848
+ * $level may be the level id or name
1849
+ *
1850
+ * Return values:
1851
+ * Success returns the level object.
1852
+ * Failure returns false.
1853
+ */
1854
+ function pmpro_getLevel( $level ) {
1855
+ global $pmpro_levels;
1856
+
1857
+ if ( is_object( $level ) && ! empty( $level->id ) ) {
1858
+ $level = $level->id;
1859
+ }
1860
+
1861
+ // was a name passed? (Todo: make sure level names have at least one non-numeric character.
1862
+ if ( is_numeric( $level ) ) {
1863
+ $level_id = intval( $level );
1864
+ if ( isset( $pmpro_levels[ $level_id ] ) ) {
1865
+ return $pmpro_levels[ $level_id ];
1866
+ } else {
1867
+ global $wpdb;
1868
+ $pmpro_levels[ $level_id ] = $wpdb->get_row( "SELECT * FROM $wpdb->pmpro_membership_levels WHERE id = '" . $level_id . "' LIMIT 1" );
1869
+ return $pmpro_levels[ $level_id ];
1870
+ }
1871
+ } else {
1872
+ global $wpdb;
1873
+ $level_obj = $wpdb->get_row( "SELECT * FROM $wpdb->pmpro_membership_levels WHERE name = '" . esc_sql( $level ) . "' LIMIT 1" );
1874
+
1875
+ if ( ! empty( $level_obj ) ) {
1876
+ $level_id = $level_obj->id;
1877
+ } else {
1878
+ return false;
1879
+ }
1880
+
1881
+ $pmpro_levels[ $level_id ] = $level_obj;
1882
+ return $pmpro_levels[ $level_id ];
1883
+ }
1884
+ }
1885
+
1886
+ /*
1887
+ Function to populate pmpro_levels with all levels. We query the DB every time just to be sure we have the latest.
1888
+ This should be called if you want to be sure you get all levels as $pmpro_levels may only have a subset of levels.
1889
+ */
1890
+ function pmpro_getAllLevels( $include_hidden = false, $force = false ) {
1891
+ global $pmpro_levels, $wpdb;
1892
+
1893
+ // just use what's cached (doesn't take into account include_hidden setting)
1894
+ if ( ! empty( $pmpro_levels ) && ! $force ) {
1895
+ return $pmpro_levels;
1896
+ }
1897
+
1898
+ // build query
1899
+ $sqlQuery = "SELECT * FROM $wpdb->pmpro_membership_levels ";
1900
+ if ( ! $include_hidden ) {
1901
+ $sqlQuery .= ' WHERE allow_signups = 1 ORDER BY id';
1902
+ }
1903
+
1904
+ // get levels from the DB
1905
+ $raw_levels = $wpdb->get_results( $sqlQuery );
1906
+
1907
+ // lets put them into an array where the key is the id of the level
1908
+ $pmpro_levels = array();
1909
+ foreach ( $raw_levels as $raw_level ) {
1910
+ $pmpro_levels[ $raw_level->id ] = $raw_level;
1911
+ }
1912
+
1913
+ return $pmpro_levels;
1914
+ }
1915
+
1916
+ /**
1917
+ * Get level at checkout and place into $pmpro_level global.
1918
+ */
1919
+ function pmpro_getLevelAtCheckout( $level_id = null, $discount_code = null ) {
1920
+ global $pmpro_level, $wpdb, $post;
1921
+
1922
+ // reset pmpro_level
1923
+ $pmpro_level = null;
1924
+
1925
+ // default to level passed in via URL
1926
+ if ( empty( $level_id ) && ! empty( $_REQUEST['level'] ) ) {
1927
+ $level_id = intval( $_REQUEST['level'] );
1928
+ }
1929
+
1930
+ // no level, check for a default level in the custom fields for this post
1931
+ if ( empty( $level_id ) && ! empty( $post ) ) {
1932
+ $level_id = get_post_meta( $post->ID, 'pmpro_default_level', true );
1933
+ }
1934
+
1935
+ // default to discount code passed in
1936
+ if ( empty( $discount_code ) && ! empty( $_REQUEST['discount_code'] ) ) {
1937
+ $discount_code = preg_replace( '/[^A-Za-z0-9\-]/', '', $_REQUEST['discount_code'] );
1938
+ }
1939
+
1940
+ // what level are they purchasing? (discount code passed)
1941
+ if ( ! empty( $level_id ) && ! empty( $discount_code ) ) {
1942
+ $discount_code_id = $wpdb->get_var( "SELECT id FROM $wpdb->pmpro_discount_codes WHERE code = '" . $discount_code . "' LIMIT 1" );
1943
+
1944
+ // check code
1945
+ $code_check = pmpro_checkDiscountCode( $discount_code, $level_id, true );
1946
+ if ( $code_check[0] != false ) {
1947
+ $sqlQuery = "SELECT l.id, cl.*, l.name, l.description, l.allow_signups FROM $wpdb->pmpro_discount_codes_levels cl LEFT JOIN $wpdb->pmpro_membership_levels l ON cl.level_id = l.id LEFT JOIN $wpdb->pmpro_discount_codes dc ON dc.id = cl.code_id WHERE dc.code = '" . $discount_code . "' AND cl.level_id = '" . $level_id . "' LIMIT 1";
1948
+ $pmpro_level = $wpdb->get_row( $sqlQuery );
1949
+
1950
+ // if the discount code doesn't adjust the level, let's just get the straight level
1951
+ if ( empty( $pmpro_level ) ) {
1952
+ $pmpro_level = $wpdb->get_row( "SELECT * FROM $wpdb->pmpro_membership_levels WHERE id = '" . $level_id . "' LIMIT 1" );
1953
+ }
1954
+
1955
+ // filter adjustments to the level
1956
+ $pmpro_level->code_id = $discount_code_id;
1957
+ $pmpro_level = apply_filters( 'pmpro_discount_code_level', $pmpro_level, $discount_code_id );
1958
+ } else {
1959
+ // error with discount code, we want to halt checkout
1960
+ pmpro_setMessage( $code_check[1], 'pmpro_error' );
1961
+ }
1962
+ }
1963
+
1964
+ // what level are they purchasing? (no discount code)
1965
+ if ( empty( $pmpro_level ) && ! empty( $level_id ) ) {
1966
+ $pmpro_level = $wpdb->get_row( "SELECT * FROM $wpdb->pmpro_membership_levels WHERE id = '" . esc_sql( $level_id ) . "' AND allow_signups = 1 LIMIT 1" );
1967
+ }
1968
+
1969
+ // filter the level (for upgrades, etc)
1970
+ $pmpro_level = apply_filters( 'pmpro_checkout_level', $pmpro_level );
1971
+
1972
+ return $pmpro_level;
1973
+ }
1974
+
1975
+ function pmpro_getCheckoutButton( $level_id, $button_text = null, $classes = null ) {
1976
+ if ( empty( $button_text ) ) {
1977
+ $button_text = __( 'Sign Up for !!name!! Now', 'paid-memberships-pro' );
1978
+ }
1979
+
1980
+ if ( empty( $classes ) ) {
1981
+ $classes = 'pmpro_btn';
1982
+ }
1983
+
1984
+ if ( empty( $level_id ) ) {
1985
+ $r = __( 'Please specify a level id.', 'paid-memberships-pro' );
1986
+ } else {
1987
+ // get level
1988
+ $level = pmpro_getLevel( $level_id );
1989
+
1990
+ if ( empty( $level ) ) {
1991
+ $r = sprintf( __( 'Level #%s not found.', 'paid-memberships-pro' ), $level_id );
1992
+ } else {
1993
+ // replace vars
1994
+ $replacements = array(
1995
+ '!!id!!' => $level->id,
1996
+ '!!name!!' => $level->name,
1997
+ '!!description!!' => $level->description,
1998
+ '!!confirmation!!' => $level->confirmation,
1999
+ '!!initial_payment!!' => $level->initial_payment,
2000
+ '!!billing_amount!!' => $level->billing_amount,
2001
+ '!!cycle_number!!' => $level->cycle_number,
2002
+ '!!cycle_period!!' => $level->cycle_period,
2003
+ '!!billing_limit!!' => $level->billing_limit,
2004
+ '!!trial_amount!!' => $level->trial_amount,
2005
+ '!!trial_limit!!' => $level->trial_limit,
2006
+ '!!expiration_number!!' => $level->expiration_number,
2007
+ '!!expiration_period!!' => $level->expiration_period,
2008
+ );
2009
+ $button_text = str_replace( array_keys( $replacements ), $replacements, $button_text );
2010
+ }
2011
+
2012
+ // button text
2013
+ $r = '<a href="' . pmpro_url( 'checkout', '?level=' . $level_id ) . '" class="' . $classes . '">' . $button_text . '</a>';
2014
+ }
2015
+ return $r;
2016
+ }
2017
+
2018
+ /**
2019
+ * Get the "domain" from a URL. By domain, we mean the host name, minus any subdomains. So just the domain and TLD.
2020
+ *
2021
+ * @param string $url The URL to parse. (generally pass site_url() in WP)
2022
+ * @return string The domain.
2023
+ */
2024
+ function pmpro_getDomainFromURL( $url = null ) {
2025
+ $domainparts = parse_url( $url );
2026
+ $domainparts = explode( '.', $domainparts['host'] );
2027
+ if ( count( $domainparts ) > 1 ) {
2028
+ // check for ips
2029
+ $isip = true;
2030
+ foreach ( $domainparts as $part ) {
2031
+ if ( ! is_numeric( $part ) ) {
2032
+ $isip = false;
2033
+ break;
2034
+ }
2035
+ }
2036
+
2037
+ if ( $isip ) {
2038
+ // ip, e.g. 127.1.1.1
2039
+ $domain = implode( '.', $domainparts );
2040
+ } else {
2041
+ // www.something.com, etc.
2042
+ $domain = $domainparts[ count( $domainparts ) - 2 ] . '.' . $domainparts[ count( $domainparts ) - 1 ];
2043
+ }
2044
+ } else {
2045
+ // localhost or another single word domain
2046
+ $domain = $domainparts[0];
2047
+ }
2048
+
2049
+ return $domain;
2050
+ }
2051
+
2052
+ /*
2053
+ Get a member's start date... either in general or for a specific level_id.
2054
+ */
2055
+ if ( ! function_exists( 'pmpro_getMemberStartdate' ) ) {
2056
+ function pmpro_getMemberStartdate( $user_id = null, $level_id = 0 ) {
2057
+ if ( empty( $user_id ) ) {
2058
+ global $current_user;
2059
+ $user_id = $current_user->ID;
2060
+ }
2061
+
2062
+ // make sure user and level id are int for security
2063
+ $user_id = intval( $user_id );
2064
+ $level_id = intval( $level_id );
2065
+
2066
+ global $pmpro_startdates; // for cache
2067
+ if ( empty( $pmpro_startdates[ $user_id ][ $level_id ] ) ) {
2068
+ global $wpdb;
2069
+
2070
+ if ( ! empty( $level_id ) ) {
2071
+ $sqlQuery = "SELECT UNIX_TIMESTAMP(startdate) FROM $wpdb->pmpro_memberships_users WHERE status = 'active' AND membership_id IN(" . esc_sql( $level_id ) . ") AND user_id = '" . $user_id . "' ORDER BY id LIMIT 1";
2072
+ } else {
2073
+ $sqlQuery = "SELECT UNIX_TIMESTAMP(startdate) FROM $wpdb->pmpro_memberships_users WHERE status = 'active' AND user_id = '" . $user_id . "' ORDER BY id LIMIT 1";
2074
+ }
2075
+
2076
+ $startdate = apply_filters( 'pmpro_member_startdate', $wpdb->get_var( $sqlQuery ), $user_id, $level_id );
2077
+
2078
+ $pmpro_startdates[ $user_id ][ $level_id ] = $startdate;
2079
+ }
2080
+
2081
+ return $pmpro_startdates[ $user_id ][ $level_id ];
2082
+ }
2083
+ }
2084
+
2085
+ /*
2086
+ How long has this member been a member
2087
+ */
2088
+ if ( ! function_exists( 'pmpro_getMemberDays' ) ) {
2089
+ function pmpro_getMemberDays( $user_id = null, $level_id = 0 ) {
2090
+ if ( empty( $user_id ) ) {
2091
+ global $current_user;
2092
+ $user_id = $current_user->ID;
2093
+ }
2094
+
2095
+ global $pmpro_member_days;
2096
+ if ( empty( $pmpro_member_days[ $user_id ][ $level_id ] ) ) {
2097
+ $startdate = pmpro_getMemberStartdate( $user_id, $level_id );
2098
+
2099
+ // check that there was a startdate at all
2100
+ if ( empty( $startdate ) ) {
2101
+ $pmpro_member_days[ $user_id ][ $level_id ] = 0;
2102
+ } else {
2103
+ $now = current_time( 'timestamp' );
2104
+ $days = ( $now - $startdate ) / 3600 / 24;
2105
+
2106
+ $pmpro_member_days[ $user_id ][ $level_id ] = $days;
2107
+ }
2108
+ }
2109
+
2110
+ return $pmpro_member_days[ $user_id ][ $level_id ];
2111
+ }
2112
+ }
2113
+
2114
+ // the start of a message handling script
2115
+ function pmpro_setMessage( $message, $type, $force = false ) {
2116
+ global $pmpro_msg, $pmpro_msgt;
2117
+
2118
+ // for now, we only show the first message generated
2119
+ if ( $force || empty( $pmpro_msg ) ) {
2120
+ $pmpro_msg = apply_filters( 'pmpro_set_message', $message, $type );
2121
+ $pmpro_msgt = $type;
2122
+ }
2123
+ }
2124
+
2125
+ /**
2126
+ * Show a a PMPro message set via pmpro_setMessage
2127
+ *
2128
+ * @since 1.8.5
2129
+ */
2130
+ function pmpro_showMessage() {
2131
+ global $pmpro_msg, $pmpro_msgt;
2132
+
2133
+ if ( ! empty( $pmpro_msg ) ) {
2134
+ ?>
2135
+ <div class="<?php echo $pmpro_msgt; ?>">
2136
+ <p><?php echo $pmpro_msg; ?></p>
2137
+ </div>
2138
+ <?php
2139
+ }
2140
+ }
2141
+
2142
+ // used in class definitions for input fields to see if there was an error
2143
+ function pmpro_getClassForField( $field ) {
2144
+ global $pmpro_error_fields, $pmpro_required_billing_fields, $pmpro_required_user_fields;
2145
+ $classes = array();
2146
+
2147
+ // error on this field?
2148
+ if ( ! empty( $pmpro_error_fields ) && in_array( $field, $pmpro_error_fields ) ) {
2149
+ $classes[] = 'pmpro_error';
2150
+ }
2151
+
2152
+ if ( is_array( $pmpro_required_billing_fields ) && is_array( $pmpro_required_user_fields ) ) {
2153
+ $required_fields = array_merge( array_keys( $pmpro_required_billing_fields ), array_keys( $pmpro_required_user_fields ) );
2154
+ } elseif ( is_array( $pmpro_required_billing_fields ) ) {
2155
+ $required_fields = array_keys( $pmpro_required_billing_fields );
2156
+ } elseif ( is_array( $pmpro_required_user_fields ) ) {
2157
+ $required_fields = array_keys( $pmpro_required_user_fields );
2158
+ } else {
2159
+ $required_fields = array();
2160
+ }
2161
+
2162
+ // required?
2163
+ if ( in_array( $field, $required_fields ) ) {
2164
+ $classes[] = 'pmpro_required';
2165
+ }
2166
+
2167
+ $classes = apply_filters( 'pmpro_field_classes', $classes, $field );
2168
+
2169
+ if ( ! empty( $classes ) ) {
2170
+ return implode( ' ', $classes );
2171
+ } else {
2172
+ return '';
2173
+ }
2174
+ }
2175
+
2176
+ // get a var from $_GET or $_POST
2177
+ function pmpro_getParam( $index, $method = 'REQUEST', $default = '', $sanitize_function = 'sanitize_text_field' ) {
2178
+ if ( $method == 'REQUEST' ) {
2179
+ if ( ! empty( $_REQUEST[ $index ] ) ) {
2180
+ return call_user_func( $sanitize_function, $_REQUEST[ $index ] );
2181
+ }
2182
+ } elseif ( $method == 'POST' ) {
2183
+ if ( ! empty( $_POST[ $index ] ) ) {
2184
+ return call_user_func( $sanitize_function, $_POST[ $index ] );
2185
+ }
2186
+ } elseif ( $method == 'GET' ) {
2187
+ if ( ! empty( $_GET[ $index ] ) ) {
2188
+ return call_user_func( $sanitize_function, $_GET[ $index ] );
2189
+ }
2190
+ }
2191
+
2192
+ return $default;
2193
+ }
2194
+
2195
+ /*
2196
+ Format an address from address, city, state, zip, country, and phone
2197
+ */
2198
+ function pmpro_formatAddress( $name, $address1, $address2, $city, $state, $zip, $country, $phone, $nl2br = true ) {
2199
+ $address = '';
2200
+
2201
+ if ( ! empty( $name ) ) {
2202
+ $address .= $name . "\n";
2203
+ }
2204
+
2205
+ if ( ! empty( $address1 ) ) {
2206
+ $address .= $address1 . "\n";
2207
+ }
2208
+
2209
+ if ( ! empty( $address2 ) ) {
2210
+ $address .= $address2 . "\n";
2211
+ }
2212
+
2213
+ if ( ! empty( $city ) && ! empty( $state ) ) {
2214
+ $address .= $city . ', ' . $state;
2215
+
2216
+ if ( ! empty( $zip ) ) {
2217
+ $address .= ' ' . $zip;
2218
+ }
2219
+
2220
+ $address .= "\n";
2221
+ }
2222
+
2223
+ if ( ! empty( $country ) ) {
2224
+ $address .= $country . "\n";
2225
+ }
2226
+
2227
+ if ( ! empty( $phone ) ) {
2228
+ $address .= formatPhone( $phone );
2229
+ }
2230
+
2231
+ if ( $nl2br ) {
2232
+ $address = nl2br( $address );
2233
+ }
2234
+
2235
+ return apply_filters( 'pmpro_formatted_address', $address, $name, $address1, $address2, $city, $state, $zip, $country, $phone, $nl2br );
2236
+ }
2237
+
2238
+ /*
2239
+ Checks if all required settings are set.
2240
+ */
2241
+ function pmpro_is_ready() {
2242
+ global $wpdb, $pmpro_pages, $pmpro_level_ready, $pmpro_gateway_ready, $pmpro_pages_ready;
2243
+
2244
+ // check if there is at least one level
2245
+ $pmpro_level_ready = (bool) $wpdb->get_var( "SELECT id FROM $wpdb->pmpro_membership_levels LIMIT 1" );
2246
+
2247
+ // check if the gateway settings are good. first check if it's needed (is there paid membership level)
2248
+ $paid_membership_level = $wpdb->get_var( "SELECT id FROM $wpdb->pmpro_membership_levels WHERE allow_signups = 1 AND (initial_payment > 0 OR billing_amount > 0 OR trial_amount > 0) LIMIT 1" );
2249
+ $paid_user_subscription = $wpdb->get_var( "SELECT user_id FROM $wpdb->pmpro_memberships_users WHERE initial_payment > 0 OR billing_amount > 0 OR trial_amount > 0 LIMIT 1" );
2250
+
2251
+ if ( empty( $paid_membership_level ) && empty( $paid_user_subscription ) ) {
2252
+ // no paid membership level now or attached to a user. we don't need the gateway setup
2253
+ $pmpro_gateway_ready = true;
2254
+ } else {
2255
+ $gateway = pmpro_getOption( 'gateway' );
2256
+ if ( $gateway == 'authorizenet' ) {
2257
+ if ( pmpro_getOption( 'gateway_environment' ) && pmpro_getOption( 'loginname' ) && pmpro_getOption( 'transactionkey' ) ) {
2258
+ $pmpro_gateway_ready = true;
2259
+ } else {
2260
+ $pmpro_gateway_ready = false;
2261
+ }
2262
+ } elseif ( $gateway == 'paypal' || $gateway == 'paypalexpress' ) {
2263
+ if ( pmpro_getOption( 'gateway_environment' ) && pmpro_getOption( 'gateway_email' ) && pmpro_getOption( 'apiusername' ) && pmpro_getOption( 'apipassword' ) && pmpro_getOption( 'apisignature' ) ) {
2264
+ $pmpro_gateway_ready = true;
2265
+ } else {
2266
+ $pmpro_gateway_ready = false;
2267
+ }
2268
+ } elseif ( $gateway == 'paypalstandard' ) {
2269
+ if ( pmpro_getOption( 'gateway_environment' ) && pmpro_getOption( 'gateway_email' ) ) {
2270
+ $pmpro_gateway_ready = true;
2271
+ } else {
2272
+ $pmpro_gateway_ready = false;
2273
+ }
2274
+ } elseif ( $gateway == 'payflowpro' ) {
2275
+ if ( pmpro_getOption( 'payflow_partner' ) && pmpro_getOption( 'payflow_vendor' ) && pmpro_getOption( 'payflow_user' ) && pmpro_getOption( 'payflow_pwd' ) ) {
2276
+ $pmpro_gateway_ready = true;
2277
+ } else {
2278
+ $pmpro_gateway_ready = false;
2279
+ }
2280
+ } elseif ( $gateway == 'stripe' ) {
2281
+ if ( pmpro_getOption( 'gateway_environment' ) && pmpro_getOption( 'stripe_secretkey' ) && pmpro_getOption( 'stripe_publishablekey' ) ) {
2282
+ $pmpro_gateway_ready = true;
2283
+ } else {
2284
+ $pmpro_gateway_ready = false;
2285
+ }
2286
+ } elseif ( $gateway == 'braintree' ) {
2287
+ if ( pmpro_getOption( 'gateway_environment' ) && pmpro_getOption( 'braintree_merchantid' ) && pmpro_getOption( 'braintree_publickey' ) && pmpro_getOption( 'braintree_privatekey' ) ) {
2288
+ $pmpro_gateway_ready = true;
2289
+ } else {
2290
+ $pmpro_gateway_ready = false;
2291
+ }
2292
+ } elseif ( $gateway == 'twocheckout' ) {
2293
+ if ( pmpro_getOption( 'gateway_environment' ) && pmpro_getOption( 'twocheckout_apiusername' ) && pmpro_getOption( 'twocheckout_apipassword' ) ) {
2294
+ $pmpro_gateway_ready = true;
2295
+ } else {
2296
+ $pmpro_gateway_ready = false;
2297
+ }
2298
+ } elseif ( $gateway == 'cybersource' ) {
2299
+ if ( pmpro_getOption( 'gateway_environment' ) && pmpro_getOption( 'cybersource_merchantid' ) && pmpro_getOption( 'cybersource_securitykey' ) ) {
2300
+ $pmpro_gateway_ready = true;
2301
+ } else {
2302
+ $pmpro_gateway_ready = false;
2303
+ }
2304
+ } elseif ( $gateway == 'check' ) {
2305
+ $pmpro_gateway_ready = true;
2306
+ } else {
2307
+ $pmpro_gateway_ready = false;
2308
+ }
2309
+ }
2310
+
2311
+ // check if we have all pages
2312
+ if ( $pmpro_pages['account'] &&
2313
+ $pmpro_pages['billing'] &&
2314
+ $pmpro_pages['cancel'] &&
2315
+ $pmpro_pages['checkout'] &&
2316
+ $pmpro_pages['confirmation'] &&
2317
+ $pmpro_pages['invoice'] &&
2318
+ $pmpro_pages['levels'] ) {
2319
+ $pmpro_pages_ready = true;
2320
+ } else {
2321
+ $pmpro_pages_ready = false;
2322
+ }
2323
+
2324
+ // now check both
2325
+ if ( $pmpro_gateway_ready && $pmpro_pages_ready ) {
2326
+ $r = true;
2327
+ } else {
2328
+ $r = false;
2329
+ }
2330
+
2331
+ /**
2332
+ * Filter to determine if PMPro setup is complete or
2333
+ * if notices or warnings need to be shown in the PMPro settings.
2334
+ *
2335
+ * Note: The filter should return true or false and also set
2336
+ * the $pmpro_level_ready, $pmpro_gateway_ready, $pmpro_pages_ready global variabls.
2337
+ *
2338
+ * @since 1.8.4.5
2339
+ *
2340
+ * @param bool $r ready?
2341
+ */
2342
+ $r = apply_filters( 'pmpro_is_ready', $r );
2343
+
2344
+ return $r;
2345
+ }
2346
+
2347
+ /**
2348
+ * Format a price per the currency settings.
2349
+ *
2350
+ * @since 1.7.15
2351
+ */
2352
+ function pmpro_formatPrice( $price ) {
2353
+ global $pmpro_currency, $pmpro_currency_symbol, $pmpro_currencies;
2354
+
2355
+ // start with the price formatted with two decimals
2356
+ $formatted = number_format( (double) $price, 2 );
2357
+
2358
+ // settings stored in array?
2359
+ if ( ! empty( $pmpro_currencies[ $pmpro_currency ] ) && is_array( $pmpro_currencies[ $pmpro_currency ] ) ) {
2360
+ // format number do decimals, with decimal_separator and thousands_separator
2361
+ $formatted = number_format(
2362
+ $price,
2363
+ ( isset( $pmpro_currencies[ $pmpro_currency ]['decimals'] ) ? (int) $pmpro_currencies[ $pmpro_currency ]['decimals'] : 2 ),
2364
+ ( isset( $pmpro_currencies[ $pmpro_currency ]['decimal_separator'] ) ? $pmpro_currencies[ $pmpro_currency ]['decimal_separator'] : '.' ),
2365
+ ( isset( $pmpro_currencies[ $pmpro_currency ]['thousands_separator'] ) ? $pmpro_currencies[ $pmpro_currency ]['thousands_separator'] : ',' )
2366
+ );
2367
+
2368
+ // which side is the symbol on?
2369
+ if ( ! empty( $pmpro_currencies[ $pmpro_currency ]['position'] ) && $pmpro_currencies[ $pmpro_currency ]['position'] == 'left' ) {
2370
+ $formatted = $pmpro_currency_symbol . $formatted;
2371
+ } else {
2372
+ $formatted = $formatted . $pmpro_currency_symbol;
2373
+ }
2374
+ } else {
2375
+ $formatted = $pmpro_currency_symbol . $formatted; // default to symbol on the left
2376
+ }
2377
+
2378
+ // filter
2379
+ return apply_filters( 'pmpro_format_price', $formatted, $price, $pmpro_currency, $pmpro_currency_symbol );
2380
+ }
2381
+
2382
+ /**
2383
+ * Which side does the currency symbol go on?
2384
+ *
2385
+ * @since 1.7.15
2386
+ */
2387
+ function pmpro_getCurrencyPosition() {
2388
+ global $pmpro_currency, $pmpro_currencies;
2389
+
2390
+ if ( ! empty( $pmpro_currencies[ $pmpro_currency ] ) && is_array( $pmpro_currencies[ $pmpro_currency ] ) && ! empty( $pmpro_currencies[ $pmpro_currency ]['position'] ) ) {
2391
+ return $pmpro_currencies[ $pmpro_currency ]['position'];
2392
+ } else {
2393
+ return 'left';
2394
+ }
2395
+ }
2396
+
2397
+ /*
2398
+ * What gateway should we be using?
2399
+ *
2400
+ * @since 1.8
2401
+ */
2402
+ function pmpro_getGateway() {
2403
+ // grab from param or options
2404
+ if ( ! empty( $_REQUEST['gateway'] ) ) {
2405
+ $gateway = $_REQUEST['gateway']; // gateway passed as param
2406
+ } elseif ( ! empty( $_REQUEST['review'] ) ) {
2407
+ $gateway = 'paypalexpress'; // if review param assume paypalexpress
2408
+ } else {
2409
+ $gateway = pmpro_getOption( 'gateway' ); // get from options
2410
+ }
2411
+
2412
+ // set valid gateways - the active gateway in the settings and any gateway added through the filter will be allowed
2413
+ if ( pmpro_getOption( 'gateway', true ) == 'paypal' ) {
2414
+ $valid_gateways = apply_filters( 'pmpro_valid_gateways', array( 'paypal', 'paypalexpress' ) );
2415
+ } else {
2416
+ $valid_gateways = apply_filters( 'pmpro_valid_gateways', array( pmpro_getOption( 'gateway', true ) ) );
2417
+ }
2418
+
2419
+ // make sure it's valid
2420
+ if ( ! in_array( $gateway, $valid_gateways ) ) {
2421
+ $gateway = false;
2422
+ }
2423
+
2424
+ // filter for good measure
2425
+ $gateway = apply_filters( 'pmpro_get_gateway', $gateway, $valid_gateways );
2426
+
2427
+ return $gateway;
2428
+ }
2429
+
2430
+ /*
2431
+ * Does the date provided fall in this month.
2432
+ * Used in logins/visits/views report.
2433
+ *
2434
+ * @since 1.8.3
2435
+ */
2436
+ function pmpro_isDateThisMonth( $str ) {
2437
+ $now = current_time( 'timestamp' );
2438
+ $this_month = intval( date_i18n( 'n', $now ) );
2439
+ $this_year = intval( date_i18n( 'Y', $now ) );
2440
+
2441
+ $date = strtotime( $str, $now );
2442
+ $date_month = intval( date_i18n( 'n', $date ) );
2443
+ $date_year = intval( date_i18n( 'Y', $date ) );
2444
+
2445
+ if ( $date_month === $this_month && $date_year === $this_year ) {
2446
+ return true;
2447
+ } else {
2448
+ return false;
2449
+ }
2450
+ }
2451
+
2452
+ /**
2453
+ * Function to generate PMPro front end pages.
2454
+ *
2455
+ * @param array $pages {
2456
+ * Formatted as array($name => $title) or array(array('title'=>'The Title', 'content'=>'The Content'))
2457
+ *
2458
+ * @type string $name Page name. (Letters, numbers, and underscores only.)
2459
+ * @type string $title Page title.
2460
+ * }
2461
+ * @return array $created_pages Created page IDs.
2462
+ * @since 1.8.5
2463
+ */
2464
+ function pmpro_generatePages( $pages ) {
2465
+
2466
+ global $pmpro_pages;
2467
+
2468
+ $pages_created = array();
2469
+
2470
+ if ( ! empty( $pages ) ) {
2471
+ foreach ( $pages as $name => $page ) {
2472
+
2473
+ // does it already exist?
2474
+ if ( ! empty( $pmpro_pages[ $name ] ) ) {
2475
+ continue;
2476
+ }
2477
+
2478
+ // no id set. create an array to store the page info
2479
+ if ( is_array( $page ) ) {
2480
+ $title = $page['title'];
2481
+ $content = $page['content'];
2482
+ } else {
2483
+ $title = $page;
2484
+ $content = '[pmpro_' . $name . ']';
2485
+ }
2486
+
2487
+ $insert = array(
2488
+ 'post_title' => $title,
2489
+ 'post_status' => 'publish',
2490
+ 'post_type' => 'page',
2491
+ 'post_content' => $content,
2492
+ 'comment_status' => 'closed',
2493
+ 'ping_status' => 'closed',
2494
+ );
2495
+
2496
+ // make non-account pages a subpage of account
2497
+ if ( $name != 'account' ) {
2498
+ $insert['post_parent'] = $pmpro_pages['account'];
2499
+ }
2500
+
2501
+ // create the page
2502
+ $pmpro_pages[ $name ] = wp_insert_post( $insert );
2503
+
2504
+ // update the option too
2505
+ pmpro_setOption( $name . '_page_id', $pmpro_pages[ $name ] );
2506
+ $pages_created[] = $pmpro_pages[ $name ];
2507
+ }
2508
+ }
2509
+
2510
+ return $pages_created;
2511
+ }
2512
+
2513
+ /**
2514
+ * Schedule a periodic event unless one with the same hook is already scheduled.
2515
+ *
2516
+ * @param int $timestamp Timestamp for when to run the event.
2517
+ * @param string $recurrence How often the event should recur.
2518
+ * @param string $hook Action hook to execute when cron is run.
2519
+ * @param array $args Optional. Arguments to pass to the hook's callback function.
2520
+ * @return false|void False when an event is not scheduled.
2521
+ * @since 1.8.7.3
2522
+ */
2523
+ function pmpro_maybe_schedule_event( $timestamp, $recurrence, $hook, $args = array() ) {
2524
+ $next = wp_next_scheduled( $hook, $args );
2525
+ if ( empty( $next ) ) {
2526
+ return wp_schedule_event( $timestamp, $recurrence, $hook, $args );
2527
+ } else {
2528
+ return false;
2529
+ }
2530
+ }
2531
+
2532
+ /**
2533
+ * Get an array of orders for a specific checkout ID
2534
+ *
2535
+ * @param int $checkout_id Checkout ID
2536
+ * @since 1.8.11
2537
+ */
2538
+ function pmpro_getMemberOrdersByCheckoutID( $checkout_id ) {
2539
+ global $wpdb;
2540
+
2541
+ $order_ids = $wpdb->get_col( $wpdb->prepare( "SELECT id FROM $wpdb->pmpro_membership_orders WHERE checkout_id = %d", $checkout_id ) );
2542
+
2543
+ $r = array();
2544
+ foreach ( $order_ids as $order_id ) {
2545
+ $r[] = new MemberOrder( $order_id );
2546
+ }
2547
+
2548
+ return $r;
2549
+ }
2550
+
2551
+ /**
2552
+ * Check that the test value is a member of a specific array for sanitization purposes.
2553
+ *
2554
+ * @param mixed $needle Value to be tested.
2555
+ * @param array $safe Array of safelist values.
2556
+ * @since 1.9.3
2557
+ */
2558
+ function pmpro_sanitize_with_safelist( $needle, $safelist ) {
2559
+ if ( ! in_array( $needle, $safelist ) ) {
2560
+ return false;
2561
+ } else {
2562
+ return $needle;
2563
+ }
2564
+ }
2565
+
2566
+ /**
2567
+ * Return an array of allowed order statuses
2568
+ *
2569
+ * @since 1.9.3
2570
+ */
2571
+ function pmpro_getOrderStatuses( $force = false ) {
2572
+ global $pmpro_order_statuses;
2573
+
2574
+ if ( ! isset( $pmpro_order_statuses ) || $force ) {
2575
+ global $wpdb;
2576
+ $statuses = array();
2577
+ $default_statuses = array( '', 'success', 'cancelled', 'review', 'token', 'refunded' );
2578
+ $used_statuses = $wpdb->get_col( "SELECT DISTINCT(status) FROM $wpdb->pmpro_membership_orders" );
2579
+ $statuses = array_unique( array_merge( $default_statuses, $used_statuses ) );
2580
+ asort( $statuses );
2581
+ $statuses = apply_filters( 'pmpro_order_statuses', $statuses );
2582
+ }
2583
+
2584
+ return $statuses;
2585
+ }
2586
+
2587
+ /**
2588
+ * Cleanup the wp_pmpro_memberships_users_table
2589
+ * (a) If a user has more than one active row for the same level,
2590
+ * the older ones are marked inactive.
2591
+ * (b) If any user has active rows for an non-existent level id,
2592
+ * those rows are marked as inactive.
2593
+ *
2594
+ * @since 1.9.4.4
2595
+ */
2596
+ function pmpro_cleanup_memberships_users_table() {
2597
+ global $wpdb;
2598
+
2599
+ // fix rows for levels that don't exists
2600
+ $sqlQuery = "UPDATE $wpdb->pmpro_memberships_users mu
2601
+ LEFT JOIN $wpdb->pmpro_membership_levels l ON mu.membership_id = l.id
2602
+ SET mu.status = 'inactive'
2603
+ WHERE mu.status = 'active'
2604
+ AND l.id IS NULL";
2605
+ $wpdb->query( $sqlQuery );
2606
+
2607
+ // fix rows where there is more than one active status for the same user/level
2608
+ $sqlQuery = "UPDATE $wpdb->pmpro_memberships_users t1
2609
+ INNER JOIN (SELECT mu1.id as id
2610
+ FROM $wpdb->pmpro_memberships_users mu1, $wpdb->pmpro_memberships_users mu2
2611
+ WHERE mu1.id < mu2.id
2612
+ AND mu1.user_id = mu2.user_id
2613
+ AND mu1.membership_id = mu2.membership_id
2614
+ AND mu1.status = 'active'
2615
+ AND mu2.status = 'active'
2616
+ GROUP BY mu1.id
2617
+ ORDER BY mu1.user_id, mu1.id DESC) t2
2618
+ ON t1.id = t2.id
2619
+ SET status = 'inactive'";
2620
+ $wpdb->query( $sqlQuery );
2621
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/upgradecheck.php CHANGED
@@ -219,6 +219,12 @@ function pmpro_checkForUpgrades()
219
  if($pmpro_db_version < 1.94) {
220
  $pmpro_db_version = pmpro_upgrade_1_9_4();
221
  }
 
 
 
 
 
 
222
  }
223
 
224
  function pmpro_db_delta()
219
  if($pmpro_db_version < 1.94) {
220
  $pmpro_db_version = pmpro_upgrade_1_9_4();
221
  }
222
+
223
+ if($pmpro_db_version < 1.944) {
224
+ pmpro_cleanup_memberships_users_table();
225
+ $pmpro_db_version = '1.944';
226
+ pmpro_setOption('db_version', '1.944');
227
+ }
228
  }
229
 
230
  function pmpro_db_delta()
languages/paid-memberships-pro.mo CHANGED
Binary file
languages/paid-memberships-pro.po CHANGED
@@ -6,7 +6,7 @@ msgid ""
6
  msgstr ""
7
  "Project-Id-Version: paid-memberships-pro\n"
8
  "Report-Msgid-Bugs-To: jason@strangerstudios.com\n"
9
- "POT-Creation-Date: 2017-12-07 19:45-0500\n"
10
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
11
  "Last-Translator: \n"
12
  "Language-Team: Stranger Studios <jason@strangerstudios.com>\n"
@@ -539,7 +539,7 @@ msgstr ""
539
  #: adminpages/advancedsettings.php:167 adminpages/advancedsettings.php:226
540
  #: adminpages/advancedsettings.php:238 adminpages/membershiplevels.php:694
541
  #: adminpages/paymentsettings.php:236
542
- #: classes/gateways/class.pmprogateway_stripe.php:297 includes/profile.php:125
543
  #: adminpages/advancedsettings.php:128 adminpages/advancedsettings.php:135
544
  #: adminpages/advancedsettings.php:148 adminpages/advancedsettings.php:151
545
  #: adminpages/advancedsettings.php:167 adminpages/advancedsettings.php:187
@@ -568,7 +568,8 @@ msgstr ""
568
  #: classes/gateways/class.pmprogateway_stripe.php:220
569
  #: classes/gateways/class.pmprogateway_stripe.php:222
570
  #: classes/gateways/class.pmprogateway_stripe.php:249
571
- #: classes/gateways/class.pmprogateway_stripe.php:281 includes/profile.php:101
 
572
  #: includes/profile.php:105 includes/profile.php:110 includes/profile.php:117
573
  #: includes/profile.php:121 includes/profile.php:123 includes/profile.php:125
574
  msgid "No"
@@ -618,7 +619,7 @@ msgstr ""
618
 
619
  #: adminpages/advancedsettings.php:227 adminpages/membershiplevels.php:694
620
  #: adminpages/paymentsettings.php:237
621
- #: classes/gateways/class.pmprogateway_stripe.php:298 includes/profile.php:126
622
  #: adminpages/advancedsettings.php:188 adminpages/advancedsettings.php:195
623
  #: adminpages/advancedsettings.php:208 adminpages/advancedsettings.php:211
624
  #: adminpages/advancedsettings.php:227 adminpages/membershiplevels.php:563
@@ -643,7 +644,8 @@ msgstr ""
643
  #: classes/gateways/class.pmprogateway_stripe.php:221
644
  #: classes/gateways/class.pmprogateway_stripe.php:223
645
  #: classes/gateways/class.pmprogateway_stripe.php:250
646
- #: classes/gateways/class.pmprogateway_stripe.php:282 includes/profile.php:102
 
647
  #: includes/profile.php:106 includes/profile.php:111 includes/profile.php:118
648
  #: includes/profile.php:122 includes/profile.php:124 includes/profile.php:126
649
  msgid "Yes"
@@ -679,16 +681,12 @@ msgstr ""
679
  msgid "Click here to signup for reCAPTCHA"
680
  msgstr ""
681
 
682
- #: adminpages/advancedsettings.php:248 adminpages/advancedsettings.php:209
683
- #: adminpages/advancedsettings.php:216 adminpages/advancedsettings.php:229
684
- #: adminpages/advancedsettings.php:232 adminpages/advancedsettings.php:248
685
- msgid "reCAPTCHA Public Key"
686
  msgstr ""
687
 
688
- #: adminpages/advancedsettings.php:251 adminpages/advancedsettings.php:212
689
- #: adminpages/advancedsettings.php:219 adminpages/advancedsettings.php:232
690
- #: adminpages/advancedsettings.php:235 adminpages/advancedsettings.php:251
691
- msgid "reCAPTCHA Private Key"
692
  msgstr ""
693
 
694
  #: adminpages/advancedsettings.php:257 adminpages/advancedsettings.php:218
@@ -883,7 +881,7 @@ msgstr ""
883
 
884
  #: adminpages/discountcodes.php:483
885
  #: classes/gateways/class.pmprogateway_braintree.php:459
886
- #: classes/gateways/class.pmprogateway_stripe.php:629 pages/billing.php:317
887
  #: pages/checkout.php:463 adminpages/discountcodes.php:367
888
  #: adminpages/discountcodes.php:370 adminpages/discountcodes.php:371
889
  #: adminpages/discountcodes.php:372 adminpages/discountcodes.php:377
@@ -909,7 +907,8 @@ msgstr ""
909
  #: classes/gateways/class.pmprogateway_stripe.php:532
910
  #: classes/gateways/class.pmprogateway_stripe.php:570
911
  #: classes/gateways/class.pmprogateway_stripe.php:597
912
- #: classes/gateways/class.pmprogateway_stripe.php:613 pages/billing.php:249
 
913
  #: pages/billing.php:253 pages/billing.php:262 pages/billing.php:265
914
  #: pages/billing.php:268 pages/billing.php:310 pages/billing.php:316
915
  #: pages/billing.php:317 pages/billing.php:319 pages/billing.php:342
@@ -1008,7 +1007,7 @@ msgstr ""
1008
 
1009
  #: adminpages/discountcodes.php:587 adminpages/discountcodes.php:641
1010
  #: adminpages/membershiplevels.php:410 adminpages/membershiplevels.php:511
1011
- #: classes/gateways/class.pmprogateway_stripe.php:687
1012
  #: adminpages/discountcodes.php:446 adminpages/discountcodes.php:466
1013
  #: adminpages/discountcodes.php:467 adminpages/discountcodes.php:468
1014
  #: adminpages/discountcodes.php:473 adminpages/discountcodes.php:492
@@ -1036,12 +1035,13 @@ msgstr ""
1036
  #: classes/gateways/class.pmprogateway_stripe.php:637
1037
  #: classes/gateways/class.pmprogateway_stripe.php:664
1038
  #: classes/gateways/class.pmprogateway_stripe.php:671
 
1039
  msgid "Day(s)"
1040
  msgstr ""
1041
 
1042
  #: adminpages/discountcodes.php:587 adminpages/discountcodes.php:641
1043
  #: adminpages/membershiplevels.php:410 adminpages/membershiplevels.php:511
1044
- #: classes/gateways/class.pmprogateway_stripe.php:687
1045
  #: adminpages/discountcodes.php:446 adminpages/discountcodes.php:466
1046
  #: adminpages/discountcodes.php:467 adminpages/discountcodes.php:468
1047
  #: adminpages/discountcodes.php:473 adminpages/discountcodes.php:492
@@ -1069,12 +1069,13 @@ msgstr ""
1069
  #: classes/gateways/class.pmprogateway_stripe.php:637
1070
  #: classes/gateways/class.pmprogateway_stripe.php:664
1071
  #: classes/gateways/class.pmprogateway_stripe.php:671
 
1072
  msgid "Month(s)"
1073
  msgstr ""
1074
 
1075
  #: adminpages/discountcodes.php:587 adminpages/discountcodes.php:641
1076
  #: adminpages/membershiplevels.php:410 adminpages/membershiplevels.php:511
1077
- #: classes/gateways/class.pmprogateway_stripe.php:687
1078
  #: adminpages/discountcodes.php:446 adminpages/discountcodes.php:466
1079
  #: adminpages/discountcodes.php:467 adminpages/discountcodes.php:468
1080
  #: adminpages/discountcodes.php:473 adminpages/discountcodes.php:492
@@ -1102,12 +1103,13 @@ msgstr ""
1102
  #: classes/gateways/class.pmprogateway_stripe.php:637
1103
  #: classes/gateways/class.pmprogateway_stripe.php:664
1104
  #: classes/gateways/class.pmprogateway_stripe.php:671
 
1105
  msgid "Week(s)"
1106
  msgstr ""
1107
 
1108
  #: adminpages/discountcodes.php:587 adminpages/discountcodes.php:641
1109
  #: adminpages/membershiplevels.php:410 adminpages/membershiplevels.php:511
1110
- #: classes/gateways/class.pmprogateway_stripe.php:687
1111
  #: adminpages/discountcodes.php:446 adminpages/discountcodes.php:466
1112
  #: adminpages/discountcodes.php:467 adminpages/discountcodes.php:468
1113
  #: adminpages/discountcodes.php:473 adminpages/discountcodes.php:492
@@ -1135,6 +1137,7 @@ msgstr ""
1135
  #: classes/gateways/class.pmprogateway_stripe.php:637
1136
  #: classes/gateways/class.pmprogateway_stripe.php:664
1137
  #: classes/gateways/class.pmprogateway_stripe.php:671
 
1138
  msgid "Year(s)"
1139
  msgstr ""
1140
 
@@ -1337,11 +1340,11 @@ msgstr ""
1337
  #: adminpages/discountcodes.php:668 adminpages/discountcodes.php:722
1338
  #: adminpages/memberslist.php:121 adminpages/memberslist.php:159
1339
  #: adminpages/memberslist.php:169 adminpages/memberslist.php:179
1340
- #: adminpages/reports/login.php:145 adminpages/reports/login.php:147
1341
- #: adminpages/reports/login.php:163 adminpages/reports/login.php:167
1342
- #: includes/profile.php:98 includes/profile.php:102 includes/profile.php:107
1343
- #: includes/profile.php:114 includes/profile.php:118 includes/profile.php:120
1344
- #: includes/profile.php:122
1345
  msgid "Expires"
1346
  msgstr ""
1347
 
@@ -1654,7 +1657,7 @@ msgid "Billing Details"
1654
  msgstr ""
1655
 
1656
  #: adminpages/membershiplevels.php:406
1657
- #: classes/gateways/class.pmprogateway_stripe.php:785
1658
  #: adminpages/membershiplevels.php:349 adminpages/membershiplevels.php:351
1659
  #: adminpages/membershiplevels.php:370 adminpages/membershiplevels.php:372
1660
  #: adminpages/membershiplevels.php:373 adminpages/membershiplevels.php:396
@@ -1672,6 +1675,7 @@ msgstr ""
1672
  #: classes/gateways/class.pmprogateway_stripe.php:735
1673
  #: classes/gateways/class.pmprogateway_stripe.php:762
1674
  #: classes/gateways/class.pmprogateway_stripe.php:769
 
1675
  msgid "per"
1676
  msgstr ""
1677
 
@@ -1997,7 +2001,7 @@ msgstr ""
1997
 
1998
  #: adminpages/memberslist.php:32 adminpages/reports/login.php:89
1999
  #: adminpages/reports/memberships.php:355 adminpages/reports/sales.php:226
2000
- #: classes/class.pmproemail.php:147 classes/class.pmproemail.php:192
2001
  #: adminpages/memberslist.php:32 adminpages/reports/login.php:67
2002
  #: adminpages/reports/login.php:69 adminpages/reports/login.php:85
2003
  #: adminpages/reports/login.php:89 adminpages/reports/memberships.php:281
@@ -2077,8 +2081,8 @@ msgstr ""
2077
  #: pages/checkout.php:311 pages/checkout.php:314 pages/checkout.php:317
2078
  #: pages/checkout.php:319 pages/checkout.php:321 pages/checkout.php:326
2079
  #: pages/checkout.php:329 pages/confirmation.php:59 pages/confirmation.php:61
2080
- #: pages/confirmation.php:67 pages/confirmation.php:69 pages/invoice.php:46
2081
- #: pages/invoice.php:48
2082
  msgid "Billing Address"
2083
  msgstr ""
2084
 
@@ -2113,29 +2117,29 @@ msgstr ""
2113
  msgid "Ended"
2114
  msgstr ""
2115
 
2116
- #: adminpages/memberslist.php:179
2117
  msgid "Cancelled"
2118
  msgstr ""
2119
 
2120
- #: adminpages/memberslist.php:181
2121
  msgid "Expired"
2122
  msgstr ""
2123
 
2124
  #: adminpages/memberslist.php:266 adminpages/reports/login.php:232
2125
  #: adminpages/memberslist.php:195 adminpages/memberslist.php:223
2126
  #: adminpages/memberslist.php:251 adminpages/memberslist.php:261
2127
- #: adminpages/memberslist.php:262 adminpages/reports/login.php:210
2128
- #: adminpages/reports/login.php:212 adminpages/reports/login.php:228
2129
- #: adminpages/reports/login.php:232
2130
  msgid "No members found."
2131
  msgstr ""
2132
 
2133
  #: adminpages/memberslist.php:266 adminpages/reports/login.php:232
2134
  #: adminpages/memberslist.php:195 adminpages/memberslist.php:223
2135
  #: adminpages/memberslist.php:251 adminpages/memberslist.php:261
2136
- #: adminpages/memberslist.php:262 adminpages/reports/login.php:210
2137
- #: adminpages/reports/login.php:212 adminpages/reports/login.php:228
2138
- #: adminpages/reports/login.php:232
2139
  msgid "Search all levels"
2140
  msgstr ""
2141
 
@@ -2180,7 +2184,7 @@ msgstr ""
2180
  msgid "Error saving order."
2181
  msgstr ""
2182
 
2183
- #: adminpages/orders.php:362 classes/class.memberorder.php:746
2184
  #: adminpages/orders.php:195 adminpages/orders.php:245
2185
  #: adminpages/orders.php:317 adminpages/orders.php:321
2186
  #: adminpages/orders.php:346 adminpages/orders.php:352
@@ -2278,8 +2282,8 @@ msgstr ""
2278
  #: adminpages/orders.php:426 adminpages/orders.php:455
2279
  #: adminpages/orders.php:481 adminpages/orders.php:512
2280
  #: adminpages/orders.php:523 adminpages/templates/orders-email.php:60
2281
- #: adminpages/templates/orders-print.php:89 pages/invoice.php:78
2282
- #: pages/invoice.php:80
2283
  msgid "Tax"
2284
  msgstr ""
2285
 
@@ -2301,8 +2305,8 @@ msgstr ""
2301
  #: adminpages/orders.php:942 adminpages/orders.php:971
2302
  #: adminpages/orders.php:1108 adminpages/orders.php:1139
2303
  #: adminpages/orders.php:1145 adminpages/templates/orders-email.php:64
2304
- #: adminpages/templates/orders-print.php:93 pages/invoice.php:82
2305
- #: pages/invoice.php:84
2306
  msgid "Total"
2307
  msgstr ""
2308
 
@@ -2329,7 +2333,7 @@ msgstr ""
2329
 
2330
  #: adminpages/orders.php:574
2331
  #: classes/gateways/class.pmprogateway_braintree.php:446
2332
- #: classes/gateways/class.pmprogateway_stripe.php:589 pages/billing.php:275
2333
  #: pages/checkout.php:423 adminpages/orders.php:339 adminpages/orders.php:389
2334
  #: adminpages/orders.php:461 adminpages/orders.php:490
2335
  #: adminpages/orders.php:532 adminpages/orders.php:563
@@ -2356,7 +2360,8 @@ msgstr ""
2356
  #: classes/gateways/class.pmprogateway_stripe.php:484
2357
  #: classes/gateways/class.pmprogateway_stripe.php:522
2358
  #: classes/gateways/class.pmprogateway_stripe.php:549
2359
- #: classes/gateways/class.pmprogateway_stripe.php:573 pages/billing.php:234
 
2360
  #: pages/billing.php:238 pages/billing.php:247 pages/billing.php:250
2361
  #: pages/billing.php:253 pages/billing.php:262 pages/billing.php:268
2362
  #: pages/billing.php:271 pages/billing.php:274 pages/billing.php:275
@@ -2421,7 +2426,7 @@ msgid "Status"
2421
  msgstr ""
2422
 
2423
  #: adminpages/orders.php:654 adminpages/orders.php:1147
2424
- #: classes/class.memberorder.php:747 adminpages/orders.php:394
2425
  #: adminpages/orders.php:444 adminpages/orders.php:516
2426
  #: adminpages/orders.php:545 adminpages/orders.php:604
2427
  #: adminpages/orders.php:612 adminpages/orders.php:643
@@ -2482,7 +2487,7 @@ msgstr ""
2482
  msgid "Generated by the gateway. Useful to cross reference orders."
2483
  msgstr ""
2484
 
2485
- #: adminpages/orders.php:706 classes/class.memberorder.php:748
2486
  #: adminpages/orders.php:432 adminpages/orders.php:482
2487
  #: adminpages/orders.php:483 adminpages/orders.php:555
2488
  #: adminpages/orders.php:584 adminpages/orders.php:664
@@ -2509,7 +2514,7 @@ msgstr ""
2509
  #: adminpages/orders.php:947 adminpages/orders.php:976
2510
  #: adminpages/orders.php:1113 adminpages/orders.php:1144
2511
  #: adminpages/orders.php:1150 pages/account.php:91 pages/invoice.php:87
2512
- #: pages/invoice.php:105 pages/invoice.php:107
2513
  #: shortcodes/pmpro_account.php:122 shortcodes/pmpro_account.php:124
2514
  #: shortcodes/pmpro_account.php:125 shortcodes/pmpro_account.php:127
2515
  msgid "Date"
@@ -2686,9 +2691,9 @@ msgstr ""
2686
  #: pages/confirmation.php:62 pages/confirmation.php:64
2687
  #: pages/confirmation.php:70 pages/confirmation.php:91
2688
  #: pages/confirmation.php:103 pages/confirmation.php:105
2689
- #: pages/confirmation.php:113 pages/confirmation.php:116 pages/invoice.php:27
2690
- #: pages/invoice.php:28 pages/invoice.php:49 pages/invoice.php:51
2691
- #: pages/invoice.php:70
2692
  msgid "Membership Level"
2693
  msgstr ""
2694
 
@@ -3291,10 +3296,8 @@ msgstr ""
3291
  msgid "Total Logins"
3292
  msgstr ""
3293
 
3294
- #: adminpages/reports/memberships.php:18
3295
- #: adminpages/reports/memberships.php:324
3296
- #: adminpages/reports/memberships.php:18
3297
- #: adminpages/reports/memberships.php:252
3298
  #: adminpages/reports/memberships.php:259
3299
  #: adminpages/reports/memberships.php:272
3300
  #: adminpages/reports/memberships.php:288
@@ -3486,8 +3489,8 @@ msgstr ""
3486
  #: adminpages/templates/orders-email.php:56
3487
  #: adminpages/templates/orders-print.php:85 pages/confirmation.php:91
3488
  #: pages/invoice.php:73 adminpages/templates/orders-email.php:56
3489
- #: adminpages/templates/orders-print.php:85 pages/invoice.php:77
3490
- #: pages/invoice.php:79
3491
  msgid "Subtotal"
3492
  msgstr ""
3493
 
@@ -3515,7 +3518,7 @@ msgid ""
3515
  "site's plugin page."
3516
  msgstr ""
3517
 
3518
- #: classes/class.memberorder.php:743 classes/class.memberorder.php:553
3519
  #: classes/class.memberorder.php:561 classes/class.memberorder.php:564
3520
  #: classes/class.memberorder.php:573 classes/class.memberorder.php:644
3521
  #: classes/class.memberorder.php:697 classes/class.memberorder.php:699
@@ -3530,11 +3533,11 @@ msgid ""
3530
  "active."
3531
  msgstr ""
3532
 
3533
- #: classes/class.memberorder.php:744 classes/class.memberorder.php:744
3534
  msgid "User Email"
3535
  msgstr ""
3536
 
3537
- #: classes/class.memberorder.php:745 classes/class.memberorder.php:745
3538
  msgid "User Display Name"
3539
  msgstr ""
3540
 
@@ -3543,14 +3546,14 @@ msgstr ""
3543
  msgid "An Email From %s"
3544
  msgstr ""
3545
 
3546
- #: classes/class.pmproemail.php:136 classes/class.pmproemail.php:120
3547
  #: classes/class.pmproemail.php:122 classes/class.pmproemail.php:125
3548
  #: classes/class.pmproemail.php:134 classes/class.pmproemail.php:136
3549
  #, php-format
3550
  msgid "Your membership at %s has been CANCELLED"
3551
  msgstr ""
3552
 
3553
- #: classes/class.pmproemail.php:169 classes/class.pmproemail.php:142
3554
  #: classes/class.pmproemail.php:144 classes/class.pmproemail.php:147
3555
  #: classes/class.pmproemail.php:156 classes/class.pmproemail.php:166
3556
  #: classes/class.pmproemail.php:169
@@ -3558,7 +3561,7 @@ msgstr ""
3558
  msgid "Membership for %s at %s has been CANCELLED"
3559
  msgstr ""
3560
 
3561
- #: classes/class.pmproemail.php:212 classes/class.pmproemail.php:172
3562
  #: classes/class.pmproemail.php:173 classes/class.pmproemail.php:175
3563
  #: classes/class.pmproemail.php:178 classes/class.pmproemail.php:187
3564
  #: classes/class.pmproemail.php:207 classes/class.pmproemail.php:212
@@ -3566,12 +3569,12 @@ msgstr ""
3566
  msgid "Your membership confirmation for %s"
3567
  msgstr ""
3568
 
3569
- #: classes/class.pmproemail.php:269 classes/class.pmproemail.php:278
3570
- #: classes/class.pmproemail.php:287 classes/class.pmproemail.php:369
3571
- #: classes/class.pmproemail.php:378 classes/class.pmproemail.php:696
3572
- #: classes/class.pmproemail.php:698
3573
  #: classes/gateways/class.pmprogateway_braintree.php:489
3574
- #: classes/gateways/class.pmprogateway_stripe.php:660 pages/checkout.php:70
3575
  #: pages/checkout.php:76 pages/checkout.php:498 pages/confirmation.php:58
3576
  #: pages/invoice.php:33 classes/class.pmproemail.php:216
3577
  #: classes/class.pmproemail.php:218 classes/class.pmproemail.php:225
@@ -3615,7 +3618,8 @@ msgstr ""
3615
  #: classes/gateways/class.pmprogateway_stripe.php:573
3616
  #: classes/gateways/class.pmprogateway_stripe.php:611
3617
  #: classes/gateways/class.pmprogateway_stripe.php:638
3618
- #: classes/gateways/class.pmprogateway_stripe.php:644 pages/checkout.php:66
 
3619
  #: pages/checkout.php:67 pages/checkout.php:68 pages/checkout.php:70
3620
  #: pages/checkout.php:75 pages/checkout.php:76 pages/checkout.php:77
3621
  #: pages/checkout.php:78 pages/checkout.php:83 pages/checkout.php:85
@@ -3629,8 +3633,8 @@ msgstr ""
3629
  msgid "Discount Code"
3630
  msgstr ""
3631
 
3632
- #: classes/class.pmproemail.php:294 classes/class.pmproemail.php:390
3633
- #: classes/class.pmproemail.php:705 classes/class.pmproemail.php:241
3634
  #: classes/class.pmproemail.php:243 classes/class.pmproemail.php:253
3635
  #: classes/class.pmproemail.php:256 classes/class.pmproemail.php:265
3636
  #: classes/class.pmproemail.php:285 classes/class.pmproemail.php:294
@@ -3646,7 +3650,7 @@ msgstr ""
3646
  msgid "This membership will expire on %s."
3647
  msgstr ""
3648
 
3649
- #: classes/class.pmproemail.php:316 classes/class.pmproemail.php:263
3650
  #: classes/class.pmproemail.php:265 classes/class.pmproemail.php:275
3651
  #: classes/class.pmproemail.php:278 classes/class.pmproemail.php:287
3652
  #: classes/class.pmproemail.php:307 classes/class.pmproemail.php:316
@@ -3654,19 +3658,19 @@ msgstr ""
3654
  msgid "Member Checkout for %s at %s"
3655
  msgstr ""
3656
 
3657
- #: classes/class.pmproemail.php:407 classes/class.pmproemail.php:375
3658
  #: classes/class.pmproemail.php:395 classes/class.pmproemail.php:407
3659
  #, php-format
3660
  msgid "Your billing information has been updated at %s"
3661
  msgstr ""
3662
 
3663
- #: classes/class.pmproemail.php:461 classes/class.pmproemail.php:428
3664
  #: classes/class.pmproemail.php:448 classes/class.pmproemail.php:461
3665
  #, php-format
3666
  msgid "Billing information has been updated for %s at %s"
3667
  msgstr ""
3668
 
3669
- #: classes/class.pmproemail.php:510 classes/class.pmproemail.php:425
3670
  #: classes/class.pmproemail.php:430 classes/class.pmproemail.php:464
3671
  #: classes/class.pmproemail.php:467 classes/class.pmproemail.php:476
3672
  #: classes/class.pmproemail.php:496 classes/class.pmproemail.php:510
@@ -3674,7 +3678,7 @@ msgstr ""
3674
  msgid "Membership Payment Failed at %s"
3675
  msgstr ""
3676
 
3677
- #: classes/class.pmproemail.php:557 classes/class.pmproemail.php:462
3678
  #: classes/class.pmproemail.php:468 classes/class.pmproemail.php:510
3679
  #: classes/class.pmproemail.php:513 classes/class.pmproemail.php:522
3680
  #: classes/class.pmproemail.php:542 classes/class.pmproemail.php:557
@@ -3682,7 +3686,7 @@ msgstr ""
3682
  msgid "Membership Payment Failed For %s at %s"
3683
  msgstr ""
3684
 
3685
- #: classes/class.pmproemail.php:605 classes/class.pmproemail.php:508
3686
  #: classes/class.pmproemail.php:557 classes/class.pmproemail.php:560
3687
  #: classes/class.pmproemail.php:569 classes/class.pmproemail.php:589
3688
  #: classes/class.pmproemail.php:605
@@ -3690,7 +3694,7 @@ msgstr ""
3690
  msgid "Credit Card on File Expiring Soon at %s"
3691
  msgstr ""
3692
 
3693
- #: classes/class.pmproemail.php:656 classes/class.pmproemail.php:501
3694
  #: classes/class.pmproemail.php:548 classes/class.pmproemail.php:605
3695
  #: classes/class.pmproemail.php:608 classes/class.pmproemail.php:617
3696
  #: classes/class.pmproemail.php:619 classes/class.pmproemail.php:639
@@ -3699,7 +3703,7 @@ msgstr ""
3699
  msgid "INVOICE for %s membership"
3700
  msgstr ""
3701
 
3702
- #: classes/class.pmproemail.php:733 classes/class.pmproemail.php:563
3703
  #: classes/class.pmproemail.php:611 classes/class.pmproemail.php:676
3704
  #: classes/class.pmproemail.php:679 classes/class.pmproemail.php:688
3705
  #: classes/class.pmproemail.php:690 classes/class.pmproemail.php:710
@@ -3708,7 +3712,7 @@ msgstr ""
3708
  msgid "Your trial at %s is ending soon"
3709
  msgstr ""
3710
 
3711
- #: classes/class.pmproemail.php:769 classes/class.pmproemail.php:596
3712
  #: classes/class.pmproemail.php:645 classes/class.pmproemail.php:710
3713
  #: classes/class.pmproemail.php:713 classes/class.pmproemail.php:722
3714
  #: classes/class.pmproemail.php:724 classes/class.pmproemail.php:744
@@ -3717,7 +3721,7 @@ msgstr ""
3717
  msgid "Your membership at %s has ended"
3718
  msgstr ""
3719
 
3720
- #: classes/class.pmproemail.php:796 classes/class.pmproemail.php:621
3721
  #: classes/class.pmproemail.php:670 classes/class.pmproemail.php:735
3722
  #: classes/class.pmproemail.php:738 classes/class.pmproemail.php:747
3723
  #: classes/class.pmproemail.php:749 classes/class.pmproemail.php:769
@@ -3726,7 +3730,7 @@ msgstr ""
3726
  msgid "Your membership at %s will end soon"
3727
  msgstr ""
3728
 
3729
- #: classes/class.pmproemail.php:818 classes/class.pmproemail.php:641
3730
  #: classes/class.pmproemail.php:690 classes/class.pmproemail.php:755
3731
  #: classes/class.pmproemail.php:758 classes/class.pmproemail.php:767
3732
  #: classes/class.pmproemail.php:769 classes/class.pmproemail.php:789
@@ -3735,7 +3739,7 @@ msgstr ""
3735
  msgid "Your membership at %s has been changed"
3736
  msgstr ""
3737
 
3738
- #: classes/class.pmproemail.php:823 classes/class.pmproemail.php:863
3739
  #: classes/class.pmproemail.php:759 classes/class.pmproemail.php:762
3740
  #: classes/class.pmproemail.php:771 classes/class.pmproemail.php:773
3741
  #: classes/class.pmproemail.php:793 classes/class.pmproemail.php:800
@@ -3746,7 +3750,7 @@ msgstr ""
3746
  msgid "The new level is %s"
3747
  msgstr ""
3748
 
3749
- #: classes/class.pmproemail.php:825 classes/class.pmproemail.php:647
3750
  #: classes/class.pmproemail.php:696 classes/class.pmproemail.php:761
3751
  #: classes/class.pmproemail.php:764 classes/class.pmproemail.php:773
3752
  #: classes/class.pmproemail.php:775 classes/class.pmproemail.php:795
@@ -3754,7 +3758,7 @@ msgstr ""
3754
  msgid "Your membership has been cancelled"
3755
  msgstr ""
3756
 
3757
- #: classes/class.pmproemail.php:829 classes/class.pmproemail.php:869
3758
  #: classes/class.pmproemail.php:651 classes/class.pmproemail.php:689
3759
  #: classes/class.pmproemail.php:700 classes/class.pmproemail.php:738
3760
  #: classes/class.pmproemail.php:765 classes/class.pmproemail.php:768
@@ -3768,7 +3772,7 @@ msgstr ""
3768
  msgid "This membership will expire on %s"
3769
  msgstr ""
3770
 
3771
- #: classes/class.pmproemail.php:833 classes/class.pmproemail.php:873
3772
  #: classes/class.pmproemail.php:655 classes/class.pmproemail.php:693
3773
  #: classes/class.pmproemail.php:704 classes/class.pmproemail.php:742
3774
  #: classes/class.pmproemail.php:769 classes/class.pmproemail.php:772
@@ -3781,7 +3785,7 @@ msgstr ""
3781
  msgid "This membership does not expire"
3782
  msgstr ""
3783
 
3784
- #: classes/class.pmproemail.php:859 classes/class.pmproemail.php:679
3785
  #: classes/class.pmproemail.php:728 classes/class.pmproemail.php:793
3786
  #: classes/class.pmproemail.php:796 classes/class.pmproemail.php:805
3787
  #: classes/class.pmproemail.php:806 classes/class.pmproemail.php:807
@@ -3790,20 +3794,20 @@ msgstr ""
3790
  msgid "Membership for %s at %s has been changed"
3791
  msgstr ""
3792
 
3793
- #: classes/class.pmproemail.php:865 classes/class.pmproemail.php:799
3794
  #: classes/class.pmproemail.php:802 classes/class.pmproemail.php:811
3795
  #: classes/class.pmproemail.php:812 classes/class.pmproemail.php:813
3796
  #: classes/class.pmproemail.php:832 classes/class.pmproemail.php:865
3797
  msgid "Membership has been cancelled"
3798
  msgstr ""
3799
 
3800
- #: classes/class.pmproemail.php:904 classes/class.pmproemail.php:848
3801
  #: classes/class.pmproemail.php:849 classes/class.pmproemail.php:850
3802
  #: classes/class.pmproemail.php:869 classes/class.pmproemail.php:904
3803
  msgid "Invoice for Order #: "
3804
  msgstr ""
3805
 
3806
- #: classes/class.pmproemail.php:948 classes/class.pmproemail.php:948
3807
  msgid ""
3808
  "<p>An administrator at !!sitename!! has changed your membership level.</p>\n"
3809
  "\n"
@@ -4082,7 +4086,7 @@ msgid "Client-Side Encryption Key"
4082
  msgstr ""
4083
 
4084
  #: classes/gateways/class.pmprogateway_braintree.php:313
4085
- #: classes/gateways/class.pmprogateway_stripe.php:305
4086
  #: adminpages/paymentsettings.php:462 adminpages/paymentsettings.php:470
4087
  #: adminpages/paymentsettings.php:503 adminpages/paymentsettings.php:509
4088
  #: adminpages/paymentsettings.php:511 adminpages/paymentsettings.php:517
@@ -4104,6 +4108,7 @@ msgstr ""
4104
  #: classes/gateways/class.pmprogateway_stripe.php:230
4105
  #: classes/gateways/class.pmprogateway_stripe.php:257
4106
  #: classes/gateways/class.pmprogateway_stripe.php:289
 
4107
  msgid "Web Hook URL"
4108
  msgstr ""
4109
 
@@ -4121,7 +4126,7 @@ msgid "To fully integrate with Braintree, be sure to set your Web Hook URL to"
4121
  msgstr ""
4122
 
4123
  #: classes/gateways/class.pmprogateway_braintree.php:434
4124
- #: classes/gateways/class.pmprogateway_stripe.php:577 pages/checkout.php:411
4125
  #: classes/gateways/class.pmprogateway_braintree.php:270
4126
  #: classes/gateways/class.pmprogateway_braintree.php:283
4127
  #: classes/gateways/class.pmprogateway_braintree.php:285
@@ -4144,7 +4149,8 @@ msgstr ""
4144
  #: classes/gateways/class.pmprogateway_stripe.php:461
4145
  #: classes/gateways/class.pmprogateway_stripe.php:499
4146
  #: classes/gateways/class.pmprogateway_stripe.php:526
4147
- #: classes/gateways/class.pmprogateway_stripe.php:561 pages/checkout.php:411
 
4148
  #: pages/checkout.php:476 pages/checkout.php:478 pages/checkout.php:485
4149
  #: pages/checkout.php:493 pages/checkout.php:494 pages/checkout.php:500
4150
  #: pages/checkout.php:501 pages/checkout.php:503 pages/checkout.php:510
@@ -4153,7 +4159,7 @@ msgid "Payment Information"
4153
  msgstr ""
4154
 
4155
  #: classes/gateways/class.pmprogateway_braintree.php:435
4156
- #: classes/gateways/class.pmprogateway_stripe.php:578 pages/checkout.php:412
4157
  #: classes/gateways/class.pmprogateway_braintree.php:270
4158
  #: classes/gateways/class.pmprogateway_braintree.php:283
4159
  #: classes/gateways/class.pmprogateway_braintree.php:285
@@ -4176,7 +4182,8 @@ msgstr ""
4176
  #: classes/gateways/class.pmprogateway_stripe.php:462
4177
  #: classes/gateways/class.pmprogateway_stripe.php:500
4178
  #: classes/gateways/class.pmprogateway_stripe.php:527
4179
- #: classes/gateways/class.pmprogateway_stripe.php:562 pages/checkout.php:412
 
4180
  #: pages/checkout.php:476 pages/checkout.php:478 pages/checkout.php:485
4181
  #: pages/checkout.php:493 pages/checkout.php:494 pages/checkout.php:500
4182
  #: pages/checkout.php:502 pages/checkout.php:504 pages/checkout.php:511
@@ -4186,9 +4193,8 @@ msgid "We Accept %s"
4186
  msgstr ""
4187
 
4188
  #: classes/gateways/class.pmprogateway_braintree.php:455
4189
- #: classes/gateways/class.pmprogateway_stripe.php:625 pages/billing.php:313
4190
- #: pages/checkout.php:459
4191
- #: classes/gateways/class.pmprogateway_braintree.php:303
4192
  #: classes/gateways/class.pmprogateway_braintree.php:316
4193
  #: classes/gateways/class.pmprogateway_braintree.php:318
4194
  #: classes/gateways/class.pmprogateway_braintree.php:321
@@ -4209,7 +4215,8 @@ msgstr ""
4209
  #: classes/gateways/class.pmprogateway_stripe.php:527
4210
  #: classes/gateways/class.pmprogateway_stripe.php:565
4211
  #: classes/gateways/class.pmprogateway_stripe.php:592
4212
- #: classes/gateways/class.pmprogateway_stripe.php:609 pages/billing.php:244
 
4213
  #: pages/billing.php:248 pages/billing.php:257 pages/billing.php:260
4214
  #: pages/billing.php:263 pages/billing.php:305 pages/billing.php:311
4215
  #: pages/billing.php:312 pages/billing.php:313 pages/billing.php:314
@@ -4254,9 +4261,8 @@ msgid "CVV"
4254
  msgstr ""
4255
 
4256
  #: classes/gateways/class.pmprogateway_braintree.php:484
4257
- #: classes/gateways/class.pmprogateway_stripe.php:655 pages/billing.php:353
4258
- #: pages/checkout.php:493
4259
- #: classes/gateways/class.pmprogateway_braintree.php:341
4260
  #: classes/gateways/class.pmprogateway_braintree.php:354
4261
  #: classes/gateways/class.pmprogateway_braintree.php:356
4262
  #: classes/gateways/class.pmprogateway_braintree.php:359
@@ -4277,7 +4283,8 @@ msgstr ""
4277
  #: classes/gateways/class.pmprogateway_stripe.php:565
4278
  #: classes/gateways/class.pmprogateway_stripe.php:603
4279
  #: classes/gateways/class.pmprogateway_stripe.php:630
4280
- #: classes/gateways/class.pmprogateway_stripe.php:639 pages/billing.php:282
 
4281
  #: pages/billing.php:286 pages/billing.php:295 pages/billing.php:298
4282
  #: pages/billing.php:302 pages/billing.php:344 pages/billing.php:352
4283
  #: pages/billing.php:353 pages/billing.php:355 pages/billing.php:358
@@ -4290,9 +4297,8 @@ msgid "what's this?"
4290
  msgstr ""
4291
 
4292
  #: classes/gateways/class.pmprogateway_braintree.php:491
4293
- #: classes/gateways/class.pmprogateway_stripe.php:662 pages/checkout.php:78
4294
- #: pages/checkout.php:500
4295
- #: classes/gateways/class.pmprogateway_braintree.php:351
4296
  #: classes/gateways/class.pmprogateway_braintree.php:364
4297
  #: classes/gateways/class.pmprogateway_braintree.php:366
4298
  #: classes/gateways/class.pmprogateway_braintree.php:369
@@ -4314,7 +4320,8 @@ msgstr ""
4314
  #: classes/gateways/class.pmprogateway_stripe.php:575
4315
  #: classes/gateways/class.pmprogateway_stripe.php:613
4316
  #: classes/gateways/class.pmprogateway_stripe.php:640
4317
- #: classes/gateways/class.pmprogateway_stripe.php:646 pages/checkout.php:78
 
4318
  #: pages/checkout.php:79 pages/checkout.php:80 pages/checkout.php:87
4319
  #: pages/checkout.php:88 pages/checkout.php:95 pages/checkout.php:98
4320
  #: pages/checkout.php:500 pages/checkout.php:551 pages/checkout.php:567
@@ -4352,7 +4359,7 @@ msgid "Payment error: Please contact the webmaster (braintree-load-error)"
4352
  msgstr ""
4353
 
4354
  #: classes/gateways/class.pmprogateway_braintree.php:554
4355
- #: classes/gateways/class.pmprogateway_stripe.php:1139
4356
  #: classes/gateways/class.pmprogateway_braintree.php:61
4357
  #: classes/gateways/class.pmprogateway_braintree.php:406
4358
  #: classes/gateways/class.pmprogateway_braintree.php:419
@@ -4377,6 +4384,7 @@ msgstr ""
4377
  #: classes/gateways/class.pmprogateway_stripe.php:1094
4378
  #: classes/gateways/class.pmprogateway_stripe.php:1105
4379
  #: classes/gateways/class.pmprogateway_stripe.php:1123
 
4380
  #: classes/gateways/class.pmprogateway_stripe.php:1143
4381
  #: classes/gateways/class.pmprogateway_stripe.php:1176
4382
  msgid "Unknown error: Initial payment failed."
@@ -5020,10 +5028,12 @@ msgstr ""
5020
  #: classes/gateways/class.pmprogateway_stripe.php:208
5021
  #: classes/gateways/class.pmprogateway_stripe.php:210
5022
  #: classes/gateways/class.pmprogateway_stripe.php:237
 
5023
  #: classes/gateways/class.pmprogateway_stripe.php:269
5024
  msgid "Publishable Key"
5025
  msgstr ""
5026
 
 
5027
  #: classes/gateways/class.pmprogateway_stripe.php:269
5028
  msgid "Your Publishable Key appears incorrect."
5029
  msgstr ""
@@ -5041,14 +5051,16 @@ msgstr ""
5041
  #: classes/gateways/class.pmprogateway_stripe.php:202
5042
  #: classes/gateways/class.pmprogateway_stripe.php:229
5043
  #: classes/gateways/class.pmprogateway_stripe.php:261
 
5044
  msgid "Secret Key"
5045
  msgstr ""
5046
 
 
5047
  #: classes/gateways/class.pmprogateway_stripe.php:285
5048
  msgid "Your Secret Key appears incorrect."
5049
  msgstr ""
5050
 
5051
- #: classes/gateways/class.pmprogateway_stripe.php:293
5052
  #: adminpages/paymentsettings.php:425 adminpages/paymentsettings.php:430
5053
  #: adminpages/paymentsettings.php:432
5054
  #: classes/gateways/class.pmprogateway_stripe.php:169
@@ -5061,10 +5073,11 @@ msgstr ""
5061
  #: classes/gateways/class.pmprogateway_stripe.php:218
5062
  #: classes/gateways/class.pmprogateway_stripe.php:245
5063
  #: classes/gateways/class.pmprogateway_stripe.php:277
 
5064
  msgid "Show Billing Address Fields"
5065
  msgstr ""
5066
 
5067
- #: classes/gateways/class.pmprogateway_stripe.php:300
5068
  #: adminpages/paymentsettings.php:437 adminpages/paymentsettings.php:439
5069
  #: classes/gateways/class.pmprogateway_stripe.php:176
5070
  #: classes/gateways/class.pmprogateway_stripe.php:177
@@ -5076,13 +5089,14 @@ msgstr ""
5076
  #: classes/gateways/class.pmprogateway_stripe.php:225
5077
  #: classes/gateways/class.pmprogateway_stripe.php:252
5078
  #: classes/gateways/class.pmprogateway_stripe.php:284
 
5079
  msgid ""
5080
  "Stripe doesn't require billing address fields. Choose 'No' to hide them on "
5081
  "the checkout page.<br /><strong>If No, make sure you disable address "
5082
  "verification in the Stripe dashboard settings.</strong>"
5083
  msgstr ""
5084
 
5085
- #: classes/gateways/class.pmprogateway_stripe.php:308
5086
  #: adminpages/paymentsettings.php:465 adminpages/paymentsettings.php:506
5087
  #: adminpages/paymentsettings.php:512 adminpages/paymentsettings.php:514
5088
  #: classes/gateways/class.pmprogateway_stripe.php:184
@@ -5095,24 +5109,27 @@ msgstr ""
5095
  #: classes/gateways/class.pmprogateway_stripe.php:233
5096
  #: classes/gateways/class.pmprogateway_stripe.php:260
5097
  #: classes/gateways/class.pmprogateway_stripe.php:292
 
5098
  msgid "To fully integrate with Stripe, be sure to set your Web Hook URL to"
5099
  msgstr ""
5100
 
 
 
5101
  #: classes/gateways/class.pmprogateway_stripe.php:654 pages/checkout.php:492
5102
- #: classes/gateways/class.pmprogateway_stripe.php:638 pages/checkout.php:492
5103
  msgid "Security Code (CVC)"
5104
  msgstr ""
5105
 
5106
- #: classes/gateways/class.pmprogateway_stripe.php:726
5107
  #: classes/gateways/class.pmprogateway_stripe.php:703
5108
  #: classes/gateways/class.pmprogateway_stripe.php:710
 
5109
  #, php-format
5110
  msgid ""
5111
  "%1$sNote:%2$s Subscription %3$s%4$s%5$s could not be found at Stripe. It may "
5112
  "have been deleted."
5113
  msgstr ""
5114
 
5115
- #: classes/gateways/class.pmprogateway_stripe.php:733
5116
  #: classes/gateways/class.pmprogateway_stripe.php:567
5117
  #: classes/gateways/class.pmprogateway_stripe.php:568
5118
  #: classes/gateways/class.pmprogateway_stripe.php:578
@@ -5126,10 +5143,11 @@ msgstr ""
5126
  #: classes/gateways/class.pmprogateway_stripe.php:683
5127
  #: classes/gateways/class.pmprogateway_stripe.php:710
5128
  #: classes/gateways/class.pmprogateway_stripe.php:717
 
5129
  msgid "Subscription Updates"
5130
  msgstr ""
5131
 
5132
- #: classes/gateways/class.pmprogateway_stripe.php:737
5133
  #: classes/gateways/class.pmprogateway_stripe.php:571
5134
  #: classes/gateways/class.pmprogateway_stripe.php:572
5135
  #: classes/gateways/class.pmprogateway_stripe.php:582
@@ -5143,12 +5161,13 @@ msgstr ""
5143
  #: classes/gateways/class.pmprogateway_stripe.php:687
5144
  #: classes/gateways/class.pmprogateway_stripe.php:714
5145
  #: classes/gateways/class.pmprogateway_stripe.php:721
 
5146
  msgid ""
5147
  "Subscription updates, allow you to change the member's subscription values "
5148
  "at predefined times. Be sure to click Update Profile after making changes."
5149
  msgstr ""
5150
 
5151
- #: classes/gateways/class.pmprogateway_stripe.php:739
5152
  #: classes/gateways/class.pmprogateway_stripe.php:573
5153
  #: classes/gateways/class.pmprogateway_stripe.php:574
5154
  #: classes/gateways/class.pmprogateway_stripe.php:584
@@ -5162,12 +5181,13 @@ msgstr ""
5162
  #: classes/gateways/class.pmprogateway_stripe.php:689
5163
  #: classes/gateways/class.pmprogateway_stripe.php:716
5164
  #: classes/gateways/class.pmprogateway_stripe.php:723
 
5165
  msgid ""
5166
  "Subscription updates, allow you to change the member's subscription values "
5167
  "at predefined times. Be sure to click Update User after making changes."
5168
  msgstr ""
5169
 
5170
- #: classes/gateways/class.pmprogateway_stripe.php:744 pages/billing.php:364
5171
  #: classes/gateways/class.pmprogateway_stripe.php:578
5172
  #: classes/gateways/class.pmprogateway_stripe.php:579
5173
  #: classes/gateways/class.pmprogateway_stripe.php:589
@@ -5180,7 +5200,8 @@ msgstr ""
5180
  #: classes/gateways/class.pmprogateway_stripe.php:656
5181
  #: classes/gateways/class.pmprogateway_stripe.php:694
5182
  #: classes/gateways/class.pmprogateway_stripe.php:721
5183
- #: classes/gateways/class.pmprogateway_stripe.php:728 pages/billing.php:294
 
5184
  #: pages/billing.php:298 pages/billing.php:329 pages/billing.php:338
5185
  #: pages/billing.php:341 pages/billing.php:343 pages/billing.php:347
5186
  #: pages/billing.php:363 pages/billing.php:364 pages/billing.php:370
@@ -5189,13 +5210,14 @@ msgstr ""
5189
  msgid "Update"
5190
  msgstr ""
5191
 
5192
- #: classes/gateways/class.pmprogateway_stripe.php:1135
5193
  #: classes/gateways/class.pmprogateway_stripe.php:1119
 
5194
  #: classes/gateways/class.pmprogateway_stripe.php:1172
5195
  msgid "Payment error: Please contact the webmaster (stripe-load-error)"
5196
  msgstr ""
5197
 
5198
- #: classes/gateways/class.pmprogateway_stripe.php:1373
5199
  #: classes/gateways/class.pmprogateway_stripe.php:190
5200
  #: classes/gateways/class.pmprogateway_stripe.php:192
5201
  #: classes/gateways/class.pmprogateway_stripe.php:199
@@ -5216,12 +5238,13 @@ msgstr ""
5216
  #: classes/gateways/class.pmprogateway_stripe.php:1326
5217
  #: classes/gateways/class.pmprogateway_stripe.php:1336
5218
  #: classes/gateways/class.pmprogateway_stripe.php:1357
 
5219
  #: classes/gateways/class.pmprogateway_stripe.php:1374
5220
  #: classes/gateways/class.pmprogateway_stripe.php:1410
5221
  msgid "Error creating customer record with Stripe:"
5222
  msgstr ""
5223
 
5224
- #: classes/gateways/class.pmprogateway_stripe.php:1432
5225
  #: classes/gateways/class.pmprogateway_stripe.php:1275
5226
  #: classes/gateways/class.pmprogateway_stripe.php:1303
5227
  #: classes/gateways/class.pmprogateway_stripe.php:1313
@@ -5232,12 +5255,13 @@ msgstr ""
5232
  #: classes/gateways/class.pmprogateway_stripe.php:1385
5233
  #: classes/gateways/class.pmprogateway_stripe.php:1395
5234
  #: classes/gateways/class.pmprogateway_stripe.php:1416
 
5235
  #: classes/gateways/class.pmprogateway_stripe.php:1433
5236
  #: classes/gateways/class.pmprogateway_stripe.php:1469
5237
  msgid "Error getting subscription with Stripe:"
5238
  msgstr ""
5239
 
5240
- #: classes/gateways/class.pmprogateway_stripe.php:1588
5241
  #: classes/gateways/class.pmprogateway_stripe.php:278
5242
  #: classes/gateways/class.pmprogateway_stripe.php:279
5243
  #: classes/gateways/class.pmprogateway_stripe.php:286
@@ -5266,12 +5290,13 @@ msgstr ""
5266
  #: classes/gateways/class.pmprogateway_stripe.php:1541
5267
  #: classes/gateways/class.pmprogateway_stripe.php:1551
5268
  #: classes/gateways/class.pmprogateway_stripe.php:1572
 
5269
  #: classes/gateways/class.pmprogateway_stripe.php:1589
5270
  #: classes/gateways/class.pmprogateway_stripe.php:1625
5271
  msgid "Error creating plan with Stripe:"
5272
  msgstr ""
5273
 
5274
- #: classes/gateways/class.pmprogateway_stripe.php:1619
5275
  #: classes/gateways/class.pmprogateway_stripe.php:294
5276
  #: classes/gateways/class.pmprogateway_stripe.php:295
5277
  #: classes/gateways/class.pmprogateway_stripe.php:302
@@ -5295,12 +5320,13 @@ msgstr ""
5295
  #: classes/gateways/class.pmprogateway_stripe.php:1572
5296
  #: classes/gateways/class.pmprogateway_stripe.php:1582
5297
  #: classes/gateways/class.pmprogateway_stripe.php:1603
 
5298
  #: classes/gateways/class.pmprogateway_stripe.php:1620
5299
  #: classes/gateways/class.pmprogateway_stripe.php:1656
5300
  msgid "Error subscribing customer to plan with Stripe:"
5301
  msgstr ""
5302
 
5303
- #: classes/gateways/class.pmprogateway_stripe.php:1714
5304
  #: classes/gateways/class.pmprogateway_stripe.php:769
5305
  #: classes/gateways/class.pmprogateway_stripe.php:770
5306
  #: classes/gateways/class.pmprogateway_stripe.php:780
@@ -5314,10 +5340,11 @@ msgstr ""
5314
  #: classes/gateways/class.pmprogateway_stripe.php:887
5315
  #: classes/gateways/class.pmprogateway_stripe.php:914
5316
  #: classes/gateways/class.pmprogateway_stripe.php:1698
 
5317
  msgid "Could not cancel the old subscription. Updates have not been processed."
5318
  msgstr ""
5319
 
5320
- #: classes/gateways/class.pmprogateway_stripe.php:1817
5321
  #: classes/gateways/class.pmprogateway_stripe.php:383
5322
  #: classes/gateways/class.pmprogateway_stripe.php:389
5323
  #: classes/gateways/class.pmprogateway_stripe.php:410
@@ -5340,10 +5367,11 @@ msgstr ""
5340
  #: classes/gateways/class.pmprogateway_stripe.php:1716
5341
  #: classes/gateways/class.pmprogateway_stripe.php:1752
5342
  #: classes/gateways/class.pmprogateway_stripe.php:1801
 
5343
  msgid "Could not cancel old subscription."
5344
  msgstr ""
5345
 
5346
- #: classes/gateways/class.pmprogateway_stripe.php:1834
5347
  #: classes/gateways/class.pmprogateway_stripe.php:1533
5348
  #: classes/gateways/class.pmprogateway_stripe.php:1534
5349
  #: classes/gateways/class.pmprogateway_stripe.php:1535
@@ -5363,26 +5391,29 @@ msgstr ""
5363
  #: classes/gateways/class.pmprogateway_stripe.php:1733
5364
  #: classes/gateways/class.pmprogateway_stripe.php:1769
5365
  #: classes/gateways/class.pmprogateway_stripe.php:1818
 
5366
  msgid "Could not find the customer."
5367
  msgstr ""
5368
 
5369
- #: classes/gateways/class.pmprogateway_stripe.php:1994
5370
  #: classes/gateways/class.pmprogateway_stripe.php:1836
5371
  #: classes/gateways/class.pmprogateway_stripe.php:1837
5372
  #: classes/gateways/class.pmprogateway_stripe.php:1847
5373
  #: classes/gateways/class.pmprogateway_stripe.php:1885
5374
  #: classes/gateways/class.pmprogateway_stripe.php:1921
5375
  #: classes/gateways/class.pmprogateway_stripe.php:1978
 
5376
  msgid "Error: "
5377
  msgstr ""
5378
 
5379
- #: classes/gateways/class.pmprogateway_stripe.php:2007
5380
  #: classes/gateways/class.pmprogateway_stripe.php:1849
5381
  #: classes/gateways/class.pmprogateway_stripe.php:1850
5382
  #: classes/gateways/class.pmprogateway_stripe.php:1860
5383
  #: classes/gateways/class.pmprogateway_stripe.php:1898
5384
  #: classes/gateways/class.pmprogateway_stripe.php:1934
5385
  #: classes/gateways/class.pmprogateway_stripe.php:1991
 
5386
  #, php-format
5387
  msgid "Error: Unkown error while refunding charge #%s"
5388
  msgstr ""
@@ -6796,7 +6827,7 @@ msgstr ""
6796
  msgid "Vietnamese Dong"
6797
  msgstr ""
6798
 
6799
- #: includes/filters.php:217 includes/filters.php:217
6800
  msgid ""
6801
  "There was a potential issue while setting the 'Profile Start Date' for a "
6802
  "user's subscription at checkout. PayPal does not allow one to set a Profile "
@@ -6813,20 +6844,20 @@ msgid ""
6813
  "situations."
6814
  msgstr ""
6815
 
6816
- #: includes/filters.php:218 includes/filters.php:218
6817
  #, php-format
6818
  msgid ""
6819
- "User: %s<br />Email: %s<br />Membership Level: %s<br />Order #: %s<br /"
6820
- ">Original Profile Start Date: %s<br />Adjusted Profile Start Date: %s<br /"
6821
- ">Trial Period: %s<br />Trial Frequency: %s<br />"
6822
  msgstr ""
6823
 
6824
- #: includes/filters.php:220 includes/filters.php:220
6825
  #, php-format
6826
  msgid "Profile Start Date Issue Detected and Fixed at %s"
6827
  msgstr ""
6828
 
6829
- #: includes/functions.php:329 includes/functions.php:464
6830
  #: includes/functions.php:160 includes/functions.php:196
6831
  #: includes/functions.php:200 includes/functions.php:202
6832
  #: includes/functions.php:203 includes/functions.php:204
@@ -6838,7 +6869,7 @@ msgstr ""
6838
  msgid "The price for membership is <strong>%s</strong> now"
6839
  msgstr ""
6840
 
6841
- #: includes/functions.php:331 includes/functions.php:466
6842
  #: includes/functions.php:202 includes/functions.php:204
6843
  #: includes/functions.php:205 includes/functions.php:206
6844
  #: includes/functions.php:209 includes/functions.php:245
@@ -6849,98 +6880,52 @@ msgstr ""
6849
  msgid "<strong>%s</strong> now"
6850
  msgstr ""
6851
 
6852
- #: includes/functions.php:340 includes/functions.php:169
6853
- #: includes/functions.php:205 includes/functions.php:211
6854
- #: includes/functions.php:213 includes/functions.php:214
6855
- #: includes/functions.php:215 includes/functions.php:218
6856
- #: includes/functions.php:254 includes/functions.php:320
6857
- #: includes/functions.php:326 includes/functions.php:331
6858
- #: includes/functions.php:340
6859
  #, php-format
6860
- msgid " and then <strong>%s per %s for %d more %s</strong>."
6861
  msgstr ""
6862
 
6863
- #: includes/functions.php:344 includes/functions.php:258
6864
- #: includes/functions.php:324 includes/functions.php:330
6865
- #: includes/functions.php:335 includes/functions.php:344
6866
  #, php-format
6867
- msgid " and then <strong>%s every %d %s for %d more payments</strong>."
6868
  msgstr ""
6869
 
6870
- #: includes/functions.php:349 includes/functions.php:178
6871
- #: includes/functions.php:214 includes/functions.php:220
6872
- #: includes/functions.php:222 includes/functions.php:223
6873
- #: includes/functions.php:224 includes/functions.php:227
6874
- #: includes/functions.php:263 includes/functions.php:329
6875
- #: includes/functions.php:335 includes/functions.php:340
6876
- #: includes/functions.php:349
6877
  #, php-format
6878
- msgid " and then <strong>%s after %d %s</strong>."
6879
  msgstr ""
6880
 
6881
- #: includes/functions.php:357 includes/functions.php:228
6882
- #: includes/functions.php:229 includes/functions.php:230
6883
- #: includes/functions.php:231 includes/functions.php:235
6884
- #: includes/functions.php:271 includes/functions.php:337
6885
- #: includes/functions.php:343 includes/functions.php:348
6886
- #: includes/functions.php:357
6887
  #, php-format
6888
- msgid "The price for membership is <strong>%s per %s</strong>."
6889
  msgstr ""
6890
 
6891
- #: includes/functions.php:359 includes/functions.php:230
6892
- #: includes/functions.php:233 includes/functions.php:237
6893
- #: includes/functions.php:273 includes/functions.php:339
6894
- #: includes/functions.php:345 includes/functions.php:350
6895
- #: includes/functions.php:359
6896
  #, php-format
6897
- msgid "<strong>%s per %s</strong>."
6898
  msgstr ""
6899
 
6900
- #: includes/functions.php:364 includes/functions.php:233
6901
- #: includes/functions.php:234 includes/functions.php:235
6902
- #: includes/functions.php:238 includes/functions.php:242
6903
- #: includes/functions.php:278 includes/functions.php:344
6904
- #: includes/functions.php:350 includes/functions.php:355
6905
- #: includes/functions.php:364
6906
  #, php-format
6907
- msgid "The price for membership is <strong>%s every %d %s</strong>."
6908
  msgstr ""
6909
 
6910
- #: includes/functions.php:366 includes/functions.php:237
6911
- #: includes/functions.php:240 includes/functions.php:244
6912
- #: includes/functions.php:280 includes/functions.php:346
6913
- #: includes/functions.php:352 includes/functions.php:357
6914
- #: includes/functions.php:366
6915
  #, php-format
6916
- msgid "<strong>%s every %d %s</strong>."
6917
  msgstr ""
6918
 
6919
- #: includes/functions.php:371 includes/functions.php:184
6920
- #: includes/functions.php:220 includes/functions.php:228
6921
- #: includes/functions.php:238 includes/functions.php:239
6922
- #: includes/functions.php:240 includes/functions.php:242
6923
- #: includes/functions.php:245 includes/functions.php:249
6924
- #: includes/functions.php:285 includes/functions.php:351
6925
- #: includes/functions.php:357 includes/functions.php:362
6926
- #: includes/functions.php:371
6927
  #, php-format
6928
- msgid " and then <strong>%s per %s</strong>."
6929
  msgstr ""
6930
 
6931
- #: includes/functions.php:375 includes/functions.php:188
6932
- #: includes/functions.php:224 includes/functions.php:232
6933
- #: includes/functions.php:242 includes/functions.php:243
6934
- #: includes/functions.php:244 includes/functions.php:246
6935
- #: includes/functions.php:249 includes/functions.php:253
6936
- #: includes/functions.php:289 includes/functions.php:355
6937
- #: includes/functions.php:361 includes/functions.php:366
6938
- #: includes/functions.php:375
6939
  #, php-format
6940
- msgid " and then <strong>%s every %d %s</strong>."
6941
  msgstr ""
6942
 
6943
- #: includes/functions.php:393 includes/functions.php:202
6944
  #: includes/functions.php:238 includes/functions.php:249
6945
  #: includes/functions.php:260 includes/functions.php:261
6946
  #: includes/functions.php:262 includes/functions.php:264
@@ -6951,7 +6936,7 @@ msgstr ""
6951
  msgid "After your initial payment, your first payment is Free."
6952
  msgstr ""
6953
 
6954
- #: includes/functions.php:397 includes/functions.php:206
6955
  #: includes/functions.php:242 includes/functions.php:253
6956
  #: includes/functions.php:264 includes/functions.php:265
6957
  #: includes/functions.php:266 includes/functions.php:268
@@ -6963,7 +6948,7 @@ msgstr ""
6963
  msgid "After your initial payment, your first %d payments are Free."
6964
  msgstr ""
6965
 
6966
- #: includes/functions.php:404 includes/functions.php:213
6967
  #: includes/functions.php:249 includes/functions.php:260
6968
  #: includes/functions.php:271 includes/functions.php:272
6969
  #: includes/functions.php:273 includes/functions.php:275
@@ -6975,91 +6960,63 @@ msgstr ""
6975
  msgid "After your initial payment, your first payment will cost %s."
6976
  msgstr ""
6977
 
6978
- #: includes/functions.php:408 includes/functions.php:217
6979
- #: includes/functions.php:253 includes/functions.php:264
6980
- #: includes/functions.php:275 includes/functions.php:276
6981
- #: includes/functions.php:277 includes/functions.php:279
6982
- #: includes/functions.php:282 includes/functions.php:286
6983
- #: includes/functions.php:322 includes/functions.php:388
6984
- #: includes/functions.php:394 includes/functions.php:399
6985
- #: includes/functions.php:408 pages/levels.php:97
6986
  #, php-format
6987
- msgid "After your initial payment, your first %d payments will cost %s."
6988
  msgstr ""
6989
 
6990
- #: includes/functions.php:419 includes/functions.php:532
6991
- #: includes/functions.php:228 includes/functions.php:264
6992
- #: includes/functions.php:275 includes/functions.php:286
6993
- #: includes/functions.php:287 includes/functions.php:288
6994
- #: includes/functions.php:290 includes/functions.php:293
6995
- #: includes/functions.php:297 includes/functions.php:333
6996
- #: includes/functions.php:399 includes/functions.php:405
6997
- #: includes/functions.php:410 includes/functions.php:419
6998
- #: includes/functions.php:523 includes/functions.php:532
6999
  #, php-format
7000
- msgid "Customers in %s will be charged %s%% tax."
7001
  msgstr ""
7002
 
7003
- #: includes/functions.php:478 includes/functions.php:469
7004
- #: includes/functions.php:478
7005
  #, php-format
7006
- msgid "<strong>%s per %s for %d more %s</strong>"
7007
  msgstr ""
7008
 
7009
- #: includes/functions.php:482 includes/functions.php:473
7010
- #: includes/functions.php:482
7011
  #, php-format
7012
- msgid "<strong>%s every %d %s for %d more payments</strong>"
7013
  msgstr ""
7014
 
7015
- #: includes/functions.php:487 includes/functions.php:478
7016
- #: includes/functions.php:487
7017
  #, php-format
7018
- msgid "<strong>%s after %d %s</strong>"
7019
  msgstr ""
7020
 
7021
- #: includes/functions.php:493 includes/functions.php:484
7022
- #: includes/functions.php:493
7023
  #, php-format
7024
- msgid "<strong>%s every %s</strong>"
7025
  msgstr ""
7026
 
7027
- #: includes/functions.php:497 includes/functions.php:488
7028
- #: includes/functions.php:497
7029
  #, php-format
7030
- msgid "<strong>%s every %d %s</strong>"
7031
  msgstr ""
7032
 
7033
- #: includes/functions.php:520 includes/functions.php:511
7034
  #: includes/functions.php:520
7035
  msgid "Trial pricing has been applied to the first payment."
7036
  msgstr ""
7037
 
7038
- #: includes/functions.php:522 includes/functions.php:513
7039
  #: includes/functions.php:522
7040
  #, php-format
7041
  msgid "Trial pricing has been applied to the first %d payments."
7042
  msgstr ""
7043
 
7044
- #: includes/functions.php:549 includes/functions.php:242
7045
- #: includes/functions.php:278 includes/functions.php:289
7046
- #: includes/functions.php:300 includes/functions.php:301
7047
- #: includes/functions.php:302 includes/functions.php:304
7048
- #: includes/functions.php:307 includes/functions.php:311
7049
- #: includes/functions.php:347 includes/functions.php:413
7050
- #: includes/functions.php:419 includes/functions.php:540
7051
- #: includes/functions.php:549
7052
  #, php-format
7053
- msgid "Membership expires after %d %s."
7054
  msgstr ""
7055
 
7056
- #: includes/functions.php:566 includes/functions.php:556
7057
- #: includes/functions.php:557 includes/functions.php:566
7058
  #, php-format
7059
- msgid "%s membership expires after %d %s"
7060
  msgstr ""
7061
 
7062
- #: includes/functions.php:956 includes/functions.php:491
7063
  #: includes/functions.php:514 includes/functions.php:525
7064
  #: includes/functions.php:536 includes/functions.php:537
7065
  #: includes/functions.php:538 includes/functions.php:545
@@ -7072,20 +7029,25 @@ msgstr ""
7072
  msgid "User ID not found."
7073
  msgstr ""
7074
 
7075
- #: includes/functions.php:976 includes/functions.php:508
7076
- #: includes/functions.php:531 includes/functions.php:542
7077
- #: includes/functions.php:553 includes/functions.php:554
7078
- #: includes/functions.php:555 includes/functions.php:562
7079
- #: includes/functions.php:586 includes/functions.php:587
7080
- #: includes/functions.php:589 includes/functions.php:596
7081
- #: includes/functions.php:612 includes/functions.php:635
7082
- #: includes/functions.php:714 includes/functions.php:780
7083
- #: includes/functions.php:786 includes/functions.php:965
7084
- #: includes/functions.php:967 includes/functions.php:976
 
 
 
 
 
7085
  msgid "Invalid level."
7086
  msgstr ""
7087
 
7088
- #: includes/functions.php:987 includes/functions.php:520
7089
  #: includes/functions.php:542 includes/functions.php:553
7090
  #: includes/functions.php:564 includes/functions.php:565
7091
  #: includes/functions.php:566 includes/functions.php:573
@@ -7098,7 +7060,7 @@ msgstr ""
7098
  msgid "not changing?"
7099
  msgstr ""
7100
 
7101
- #: includes/functions.php:1046 includes/functions.php:537
7102
  #: includes/functions.php:559 includes/functions.php:570
7103
  #: includes/functions.php:581 includes/functions.php:582
7104
  #: includes/functions.php:583 includes/functions.php:590
@@ -7126,14 +7088,14 @@ msgstr ""
7126
  msgid "Error interacting with database"
7127
  msgstr ""
7128
 
7129
- #: includes/functions.php:1138 includes/functions.php:907
7130
  #: includes/functions.php:1123 includes/functions.php:1127
7131
  #: includes/functions.php:1129 includes/functions.php:1138
7132
  #, php-format
7133
  msgid "Error interacting with database: %s"
7134
  msgstr ""
7135
 
7136
- #: includes/functions.php:1213 includes/functions.php:1252
7137
  #: includes/functions.php:629 includes/functions.php:651
7138
  #: includes/functions.php:667 includes/functions.php:668
7139
  #: includes/functions.php:678 includes/functions.php:681
@@ -7159,7 +7121,7 @@ msgstr ""
7159
  msgid "Membership level not found."
7160
  msgstr ""
7161
 
7162
- #: includes/functions.php:1620 includes/functions.php:1100
7163
  #: includes/functions.php:1101 includes/functions.php:1118
7164
  #: includes/functions.php:1142 includes/functions.php:1143
7165
  #: includes/functions.php:1150 includes/functions.php:1157
@@ -7171,7 +7133,7 @@ msgstr ""
7171
  msgid "No code was given to check."
7172
  msgstr ""
7173
 
7174
- #: includes/functions.php:1629 includes/functions.php:1050
7175
  #: includes/functions.php:1072 includes/functions.php:1088
7176
  #: includes/functions.php:1099 includes/functions.php:1102
7177
  #: includes/functions.php:1109 includes/functions.php:1110
@@ -7187,7 +7149,7 @@ msgstr ""
7187
  msgid "The discount code could not be found."
7188
  msgstr ""
7189
 
7190
- #: includes/functions.php:1644 includes/functions.php:1066
7191
  #: includes/functions.php:1088 includes/functions.php:1104
7192
  #: includes/functions.php:1115 includes/functions.php:1118
7193
  #: includes/functions.php:1124 includes/functions.php:1125
@@ -7204,7 +7166,7 @@ msgstr ""
7204
  msgid "This discount code goes into effect on %s."
7205
  msgstr ""
7206
 
7207
- #: includes/functions.php:1651 includes/functions.php:1075
7208
  #: includes/functions.php:1097 includes/functions.php:1113
7209
  #: includes/functions.php:1124 includes/functions.php:1127
7210
  #: includes/functions.php:1131 includes/functions.php:1132
@@ -7221,7 +7183,7 @@ msgstr ""
7221
  msgid "This discount code expired on %s."
7222
  msgstr ""
7223
 
7224
- #: includes/functions.php:1661 includes/functions.php:1087
7225
  #: includes/functions.php:1109 includes/functions.php:1125
7226
  #: includes/functions.php:1136 includes/functions.php:1139
7227
  #: includes/functions.php:1141 includes/functions.php:1142
@@ -7237,7 +7199,7 @@ msgstr ""
7237
  msgid "This discount code is no longer valid."
7238
  msgstr ""
7239
 
7240
- #: includes/functions.php:1681 includes/functions.php:1102
7241
  #: includes/functions.php:1124 includes/functions.php:1140
7242
  #: includes/functions.php:1151 includes/functions.php:1154
7243
  #: includes/functions.php:1155 includes/functions.php:1164
@@ -7252,7 +7214,7 @@ msgstr ""
7252
  msgid "This discount code does not apply to this membership level."
7253
  msgstr ""
7254
 
7255
- #: includes/functions.php:1718 includes/functions.php:1110
7256
  #: includes/functions.php:1132 includes/functions.php:1148
7257
  #: includes/functions.php:1159 includes/functions.php:1162
7258
  #: includes/functions.php:1172 includes/functions.php:1180
@@ -7268,7 +7230,7 @@ msgstr ""
7268
  msgid "This discount code is okay."
7269
  msgstr ""
7270
 
7271
- #: includes/functions.php:1745 includes/functions.php:1134
7272
  #: includes/functions.php:1156 includes/functions.php:1172
7273
  #: includes/functions.php:1183 includes/functions.php:1186
7274
  #: includes/functions.php:1196 includes/functions.php:1205
@@ -7284,7 +7246,7 @@ msgstr ""
7284
  msgid "and"
7285
  msgstr ""
7286
 
7287
- #: includes/functions.php:2033 includes/functions.php:1319
7288
  #: includes/functions.php:1341 includes/functions.php:1361
7289
  #: includes/functions.php:1372 includes/functions.php:1375
7290
  #: includes/functions.php:1385 includes/functions.php:1394
@@ -7297,11 +7259,11 @@ msgstr ""
7297
  #: includes/functions.php:1697 includes/functions.php:1703
7298
  #: includes/functions.php:2015 includes/functions.php:2019
7299
  #: includes/functions.php:2022 includes/functions.php:2024
7300
- #: includes/functions.php:2034
7301
  msgid "Sign Up for !!name!! Now"
7302
  msgstr ""
7303
 
7304
- #: includes/functions.php:2039 includes/functions.php:1325
7305
  #: includes/functions.php:1347 includes/functions.php:1367
7306
  #: includes/functions.php:1378 includes/functions.php:1381
7307
  #: includes/functions.php:1391 includes/functions.php:1400
@@ -7314,11 +7276,12 @@ msgstr ""
7314
  #: includes/functions.php:1703 includes/functions.php:1709
7315
  #: includes/functions.php:2021 includes/functions.php:2025
7316
  #: includes/functions.php:2028 includes/functions.php:2030
7317
- #: includes/functions.php:2040
7318
  msgid "Please specify a level id."
7319
  msgstr ""
7320
 
7321
- #: includes/functions.php:2046 includes/functions.php:2047
 
7322
  #, php-format
7323
  msgid "Level #%s not found."
7324
  msgstr ""
@@ -7573,10 +7536,11 @@ msgstr ""
7573
  #: pages/billing.php:27 pages/billing.php:28 pages/billing.php:30
7574
  #: pages/billing.php:44 pages/billing.php:45 pages/cancel.php:52
7575
  #: pages/cancel.php:60 pages/cancel.php:61 pages/invoice.php:89
7576
- #: pages/invoice.php:109 pages/levels.php:13 pages/levels.php:35
7577
- #: shortcodes/pmpro_account.php:43 shortcodes/pmpro_account.php:44
7578
- #: shortcodes/pmpro_account.php:123 shortcodes/pmpro_account.php:125
7579
- #: shortcodes/pmpro_account.php:126 shortcodes/pmpro_account.php:128
 
7580
  msgid "Level"
7581
  msgstr ""
7582
 
@@ -7767,7 +7731,7 @@ msgstr ""
7767
  msgid "We accept %s"
7768
  msgstr ""
7769
 
7770
- #: pages/billing.php:381 pages/billing.php:309 pages/billing.php:313
7771
  #: pages/billing.php:344 pages/billing.php:353 pages/billing.php:356
7772
  #: pages/billing.php:360 pages/billing.php:364 pages/billing.php:380
7773
  #: pages/billing.php:381 pages/billing.php:387 pages/billing.php:408
@@ -7993,7 +7957,8 @@ msgstr ""
7993
  #: pages/confirmation.php:45 pages/confirmation.php:46
7994
  #: pages/confirmation.php:52 pages/confirmation.php:102
7995
  #: pages/confirmation.php:104 pages/confirmation.php:112
7996
- #: pages/confirmation.php:115 pages/invoice.php:26 pages/invoice.php:27
 
7997
  msgid "Account"
7998
  msgstr ""
7999
 
@@ -8005,8 +7970,9 @@ msgstr ""
8005
 
8006
  #: pages/confirmation.php:79 pages/invoice.php:61 pages/account.php:105
8007
  #: pages/account.php:109 pages/confirmation.php:61 pages/confirmation.php:63
8008
- #: pages/confirmation.php:69 pages/confirmation.php:82 pages/invoice.php:48
8009
- #: pages/invoice.php:50 pages/invoice.php:61
 
8010
  msgid "Payment Method"
8011
  msgstr ""
8012
 
@@ -8019,19 +7985,21 @@ msgstr ""
8019
 
8020
  #: pages/confirmation.php:88 pages/invoice.php:70 pages/invoice.php:103
8021
  #: pages/confirmation.php:61 pages/confirmation.php:63
8022
- #: pages/confirmation.php:65 pages/confirmation.php:71 pages/invoice.php:50
8023
- #: pages/invoice.php:52 pages/invoice.php:90 pages/invoice.php:107
8024
- #: pages/invoice.php:109 pages/invoice.php:110
 
8025
  msgid "Total Billed"
8026
  msgstr ""
8027
 
8028
- #: pages/confirmation.php:94 pages/invoice.php:76 pages/invoice.php:80
8029
- #: pages/invoice.php:82
8030
  msgid "Coupon"
8031
  msgstr ""
8032
 
8033
  #: pages/confirmation.php:111 pages/confirmation.php:97
8034
  #: pages/confirmation.php:100 pages/confirmation.php:103
 
8035
  #, php-format
8036
  msgid ""
8037
  "Below are details about your membership account. A welcome email has been "
@@ -8040,37 +8008,37 @@ msgstr ""
8040
 
8041
  #: pages/confirmation.php:124 pages/confirmation.php:103
8042
  #: pages/confirmation.php:105 pages/confirmation.php:113
8043
- #: pages/confirmation.php:116
8044
  msgid "Pending"
8045
  msgstr ""
8046
 
8047
  #: pages/confirmation.php:132 pages/invoice.php:134 pages/confirmation.php:111
8048
  #: pages/confirmation.php:113 pages/confirmation.php:121
8049
- #: pages/confirmation.php:124 pages/invoice.php:121 pages/invoice.php:139
8050
- #: pages/invoice.php:141
8051
  msgid "View Your Membership Account &rarr;"
8052
  msgstr ""
8053
 
8054
  #: pages/confirmation.php:134 pages/confirmation.php:113
8055
  #: pages/confirmation.php:115 pages/confirmation.php:123
8056
- #: pages/confirmation.php:126
8057
  msgid ""
8058
  "If your account is not activated within a few minutes, please contact the "
8059
  "site owner."
8060
  msgstr ""
8061
 
8062
- #: pages/invoice.php:101 pages/invoice.php:88 pages/invoice.php:106
8063
- #: pages/invoice.php:108
8064
  msgid "Invoice #"
8065
  msgstr ""
8066
 
8067
- #: pages/invoice.php:127 pages/invoice.php:114 pages/invoice.php:132
8068
- #: pages/invoice.php:134
8069
  msgid "No invoices found."
8070
  msgstr ""
8071
 
8072
- #: pages/invoice.php:138 pages/invoice.php:125 pages/invoice.php:143
8073
- #: pages/invoice.php:145
8074
  msgid "&larr; View All Invoices"
8075
  msgstr ""
8076
 
@@ -8144,73 +8112,74 @@ msgstr ""
8144
  msgid "Your membership status has been updated - Thank you!"
8145
  msgstr ""
8146
 
8147
- #: preheaders/account.php:12 preheaders/levels.php:24
8148
- #: preheaders/account.php:11 preheaders/account.php:12
8149
- #: preheaders/levels.php:23 preheaders/levels.php:24
8150
  msgid ""
8151
  "Sorry, your request could not be completed - please try again in a few "
8152
  "moments."
8153
  msgstr ""
8154
 
8155
  #: preheaders/billing.php:147 preheaders/checkout.php:322
8156
- #: preheaders/billing.php:145 preheaders/billing.php:258
8157
- #: preheaders/billing.php:265 preheaders/billing.php:266
8158
- #: preheaders/billing.php:270 preheaders/billing.php:273
8159
- #: preheaders/billing.php:279 preheaders/checkout.php:322
8160
- #: preheaders/checkout.php:332 preheaders/checkout.php:336
8161
- #: preheaders/checkout.php:364 preheaders/checkout.php:458
8162
- #: preheaders/checkout.php:464 preheaders/checkout.php:465
8163
- #: preheaders/checkout.php:470 preheaders/checkout.php:481
8164
- #: preheaders/checkout.php:482
8165
  msgid "Please complete all required fields."
8166
  msgstr ""
8167
 
8168
  #: preheaders/billing.php:150 preheaders/checkout.php:330
8169
- #: preheaders/billing.php:148 preheaders/billing.php:263
8170
- #: preheaders/billing.php:268 preheaders/billing.php:269
8171
- #: preheaders/billing.php:273 preheaders/billing.php:276
8172
- #: preheaders/billing.php:284 preheaders/checkout.php:330
8173
- #: preheaders/checkout.php:340 preheaders/checkout.php:344
8174
- #: preheaders/checkout.php:372 preheaders/checkout.php:466
8175
- #: preheaders/checkout.php:473 preheaders/checkout.php:474
8176
- #: preheaders/checkout.php:478 preheaders/checkout.php:491
8177
- #: preheaders/checkout.php:492
8178
  msgid "Your email addresses do not match. Please try again."
8179
  msgstr ""
8180
 
8181
  #: preheaders/billing.php:153 preheaders/checkout.php:335
8182
- #: preheaders/billing.php:151 preheaders/billing.php:268
8183
- #: preheaders/billing.php:271 preheaders/billing.php:272
8184
- #: preheaders/billing.php:276 preheaders/billing.php:279
8185
- #: preheaders/billing.php:289 preheaders/checkout.php:335
8186
- #: preheaders/checkout.php:345 preheaders/checkout.php:349
8187
- #: preheaders/checkout.php:377 preheaders/checkout.php:471
8188
- #: preheaders/checkout.php:478 preheaders/checkout.php:480
8189
- #: preheaders/checkout.php:483 preheaders/checkout.php:497
8190
- #: preheaders/checkout.php:498
8191
  msgid "The email address entered is in an invalid format. Please try again."
8192
  msgstr ""
8193
 
8194
  #: preheaders/billing.php:157 preheaders/billing.php:155
8195
- #: preheaders/billing.php:274 preheaders/billing.php:275
8196
- #: preheaders/billing.php:276 preheaders/billing.php:280
8197
- #: preheaders/billing.php:283 preheaders/billing.php:295
 
8198
  msgid "All good!"
8199
  msgstr ""
8200
 
8201
  #: preheaders/billing.php:224 preheaders/billing.php:222
8202
- #: preheaders/billing.php:340 preheaders/billing.php:345
8203
- #: preheaders/billing.php:346 preheaders/billing.php:350
8204
- #: preheaders/billing.php:353 preheaders/billing.php:370
 
8205
  #, php-format
8206
  msgid "Information updated. <a href=\"%s\">&laquo; back to my account</a>"
8207
  msgstr ""
8208
 
8209
  #: preheaders/billing.php:230 preheaders/billing.php:228
8210
- #: preheaders/billing.php:347 preheaders/billing.php:351
8211
- #: preheaders/billing.php:352 preheaders/billing.php:356
8212
- #: preheaders/billing.php:359 preheaders/billing.php:378
8213
- #: preheaders/billing.php:380
8214
  msgid "Error updating billing information."
8215
  msgstr ""
8216
 
@@ -8500,17 +8469,17 @@ msgstr ""
8500
  msgid "Amount"
8501
  msgstr ""
8502
 
8503
- #: shortcodes/pmpro_account.php:157 pages/account.php:121
8504
- #: pages/account.php:140 pages/account.php:144
8505
- #: shortcodes/pmpro_account.php:152 shortcodes/pmpro_account.php:154
8506
- #: shortcodes/pmpro_account.php:155 shortcodes/pmpro_account.php:157
8507
  msgid "View All Invoices"
8508
  msgstr ""
8509
 
8510
- #: shortcodes/pmpro_account.php:164 pages/account.php:128
8511
- #: pages/account.php:146 pages/account.php:150
8512
- #: shortcodes/pmpro_account.php:159 shortcodes/pmpro_account.php:161
8513
- #: shortcodes/pmpro_account.php:162 shortcodes/pmpro_account.php:164
8514
  msgid "Member Links"
8515
  msgstr ""
8516
 
@@ -8532,6 +8501,18 @@ msgstr ""
8532
  msgid "User Forum"
8533
  msgstr ""
8534
 
 
 
 
 
 
 
 
 
 
 
 
 
8535
  #: adminpages/advancedsettings.php:272 adminpages/advancedsettings.php:285
8536
  msgid "selected"
8537
  msgstr ""
@@ -8761,6 +8742,24 @@ msgstr ""
8761
  msgid "South African Rand"
8762
  msgstr ""
8763
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8764
  #: includes/functions.php:173 includes/functions.php:209
8765
  #: includes/functions.php:215 includes/functions.php:217
8766
  #: includes/functions.php:218 includes/functions.php:219
@@ -8769,6 +8768,144 @@ msgstr ""
8769
  msgid " and then <strong>%s every %d %s for %d more %s</strong>."
8770
  msgstr ""
8771
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8772
  #: includes/license.php:89 includes/license.php:92
8773
  msgid ""
8774
  "Enter your support license key.</strong> Your license key can be found in "
6
  msgstr ""
7
  "Project-Id-Version: paid-memberships-pro\n"
8
  "Report-Msgid-Bugs-To: jason@strangerstudios.com\n"
9
+ "POT-Creation-Date: 2018-03-14 19:33-0400\n"
10
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
11
  "Last-Translator: \n"
12
  "Language-Team: Stranger Studios <jason@strangerstudios.com>\n"
539
  #: adminpages/advancedsettings.php:167 adminpages/advancedsettings.php:226
540
  #: adminpages/advancedsettings.php:238 adminpages/membershiplevels.php:694
541
  #: adminpages/paymentsettings.php:236
542
+ #: classes/gateways/class.pmprogateway_stripe.php:298 includes/profile.php:125
543
  #: adminpages/advancedsettings.php:128 adminpages/advancedsettings.php:135
544
  #: adminpages/advancedsettings.php:148 adminpages/advancedsettings.php:151
545
  #: adminpages/advancedsettings.php:167 adminpages/advancedsettings.php:187
568
  #: classes/gateways/class.pmprogateway_stripe.php:220
569
  #: classes/gateways/class.pmprogateway_stripe.php:222
570
  #: classes/gateways/class.pmprogateway_stripe.php:249
571
+ #: classes/gateways/class.pmprogateway_stripe.php:281
572
+ #: classes/gateways/class.pmprogateway_stripe.php:297 includes/profile.php:101
573
  #: includes/profile.php:105 includes/profile.php:110 includes/profile.php:117
574
  #: includes/profile.php:121 includes/profile.php:123 includes/profile.php:125
575
  msgid "No"
619
 
620
  #: adminpages/advancedsettings.php:227 adminpages/membershiplevels.php:694
621
  #: adminpages/paymentsettings.php:237
622
+ #: classes/gateways/class.pmprogateway_stripe.php:299 includes/profile.php:126
623
  #: adminpages/advancedsettings.php:188 adminpages/advancedsettings.php:195
624
  #: adminpages/advancedsettings.php:208 adminpages/advancedsettings.php:211
625
  #: adminpages/advancedsettings.php:227 adminpages/membershiplevels.php:563
644
  #: classes/gateways/class.pmprogateway_stripe.php:221
645
  #: classes/gateways/class.pmprogateway_stripe.php:223
646
  #: classes/gateways/class.pmprogateway_stripe.php:250
647
+ #: classes/gateways/class.pmprogateway_stripe.php:282
648
+ #: classes/gateways/class.pmprogateway_stripe.php:298 includes/profile.php:102
649
  #: includes/profile.php:106 includes/profile.php:111 includes/profile.php:118
650
  #: includes/profile.php:122 includes/profile.php:124 includes/profile.php:126
651
  msgid "Yes"
681
  msgid "Click here to signup for reCAPTCHA"
682
  msgstr ""
683
 
684
+ #: adminpages/advancedsettings.php:248
685
+ msgid "reCAPTCHA Site Key"
 
 
686
  msgstr ""
687
 
688
+ #: adminpages/advancedsettings.php:251
689
+ msgid "reCAPTCHA Secret Key"
 
 
690
  msgstr ""
691
 
692
  #: adminpages/advancedsettings.php:257 adminpages/advancedsettings.php:218
881
 
882
  #: adminpages/discountcodes.php:483
883
  #: classes/gateways/class.pmprogateway_braintree.php:459
884
+ #: classes/gateways/class.pmprogateway_stripe.php:630 pages/billing.php:317
885
  #: pages/checkout.php:463 adminpages/discountcodes.php:367
886
  #: adminpages/discountcodes.php:370 adminpages/discountcodes.php:371
887
  #: adminpages/discountcodes.php:372 adminpages/discountcodes.php:377
907
  #: classes/gateways/class.pmprogateway_stripe.php:532
908
  #: classes/gateways/class.pmprogateway_stripe.php:570
909
  #: classes/gateways/class.pmprogateway_stripe.php:597
910
+ #: classes/gateways/class.pmprogateway_stripe.php:613
911
+ #: classes/gateways/class.pmprogateway_stripe.php:629 pages/billing.php:249
912
  #: pages/billing.php:253 pages/billing.php:262 pages/billing.php:265
913
  #: pages/billing.php:268 pages/billing.php:310 pages/billing.php:316
914
  #: pages/billing.php:317 pages/billing.php:319 pages/billing.php:342
1007
 
1008
  #: adminpages/discountcodes.php:587 adminpages/discountcodes.php:641
1009
  #: adminpages/membershiplevels.php:410 adminpages/membershiplevels.php:511
1010
+ #: classes/gateways/class.pmprogateway_stripe.php:688
1011
  #: adminpages/discountcodes.php:446 adminpages/discountcodes.php:466
1012
  #: adminpages/discountcodes.php:467 adminpages/discountcodes.php:468
1013
  #: adminpages/discountcodes.php:473 adminpages/discountcodes.php:492
1035
  #: classes/gateways/class.pmprogateway_stripe.php:637
1036
  #: classes/gateways/class.pmprogateway_stripe.php:664
1037
  #: classes/gateways/class.pmprogateway_stripe.php:671
1038
+ #: classes/gateways/class.pmprogateway_stripe.php:687
1039
  msgid "Day(s)"
1040
  msgstr ""
1041
 
1042
  #: adminpages/discountcodes.php:587 adminpages/discountcodes.php:641
1043
  #: adminpages/membershiplevels.php:410 adminpages/membershiplevels.php:511
1044
+ #: classes/gateways/class.pmprogateway_stripe.php:688
1045
  #: adminpages/discountcodes.php:446 adminpages/discountcodes.php:466
1046
  #: adminpages/discountcodes.php:467 adminpages/discountcodes.php:468
1047
  #: adminpages/discountcodes.php:473 adminpages/discountcodes.php:492
1069
  #: classes/gateways/class.pmprogateway_stripe.php:637
1070
  #: classes/gateways/class.pmprogateway_stripe.php:664
1071
  #: classes/gateways/class.pmprogateway_stripe.php:671
1072
+ #: classes/gateways/class.pmprogateway_stripe.php:687
1073
  msgid "Month(s)"
1074
  msgstr ""
1075
 
1076
  #: adminpages/discountcodes.php:587 adminpages/discountcodes.php:641
1077
  #: adminpages/membershiplevels.php:410 adminpages/membershiplevels.php:511
1078
+ #: classes/gateways/class.pmprogateway_stripe.php:688
1079
  #: adminpages/discountcodes.php:446 adminpages/discountcodes.php:466
1080
  #: adminpages/discountcodes.php:467 adminpages/discountcodes.php:468
1081
  #: adminpages/discountcodes.php:473 adminpages/discountcodes.php:492
1103
  #: classes/gateways/class.pmprogateway_stripe.php:637
1104
  #: classes/gateways/class.pmprogateway_stripe.php:664
1105
  #: classes/gateways/class.pmprogateway_stripe.php:671
1106
+ #: classes/gateways/class.pmprogateway_stripe.php:687
1107
  msgid "Week(s)"
1108
  msgstr ""
1109
 
1110
  #: adminpages/discountcodes.php:587 adminpages/discountcodes.php:641
1111
  #: adminpages/membershiplevels.php:410 adminpages/membershiplevels.php:511
1112
+ #: classes/gateways/class.pmprogateway_stripe.php:688
1113
  #: adminpages/discountcodes.php:446 adminpages/discountcodes.php:466
1114
  #: adminpages/discountcodes.php:467 adminpages/discountcodes.php:468
1115
  #: adminpages/discountcodes.php:473 adminpages/discountcodes.php:492
1137
  #: classes/gateways/class.pmprogateway_stripe.php:637
1138
  #: classes/gateways/class.pmprogateway_stripe.php:664
1139
  #: classes/gateways/class.pmprogateway_stripe.php:671
1140
+ #: classes/gateways/class.pmprogateway_stripe.php:687
1141
  msgid "Year(s)"
1142
  msgstr ""
1143
 
1340
  #: adminpages/discountcodes.php:668 adminpages/discountcodes.php:722
1341
  #: adminpages/memberslist.php:121 adminpages/memberslist.php:159
1342
  #: adminpages/memberslist.php:169 adminpages/memberslist.php:179
1343
+ #: adminpages/memberslist.php:183 adminpages/reports/login.php:145
1344
+ #: adminpages/reports/login.php:147 adminpages/reports/login.php:163
1345
+ #: adminpages/reports/login.php:167 includes/profile.php:98
1346
+ #: includes/profile.php:102 includes/profile.php:107 includes/profile.php:114
1347
+ #: includes/profile.php:118 includes/profile.php:120 includes/profile.php:122
1348
  msgid "Expires"
1349
  msgstr ""
1350
 
1657
  msgstr ""
1658
 
1659
  #: adminpages/membershiplevels.php:406
1660
+ #: classes/gateways/class.pmprogateway_stripe.php:786
1661
  #: adminpages/membershiplevels.php:349 adminpages/membershiplevels.php:351
1662
  #: adminpages/membershiplevels.php:370 adminpages/membershiplevels.php:372
1663
  #: adminpages/membershiplevels.php:373 adminpages/membershiplevels.php:396
1675
  #: classes/gateways/class.pmprogateway_stripe.php:735
1676
  #: classes/gateways/class.pmprogateway_stripe.php:762
1677
  #: classes/gateways/class.pmprogateway_stripe.php:769
1678
+ #: classes/gateways/class.pmprogateway_stripe.php:785
1679
  msgid "per"
1680
  msgstr ""
1681
 
2001
 
2002
  #: adminpages/memberslist.php:32 adminpages/reports/login.php:89
2003
  #: adminpages/reports/memberships.php:355 adminpages/reports/sales.php:226
2004
+ #: classes/class.pmproemail.php:154 classes/class.pmproemail.php:199
2005
  #: adminpages/memberslist.php:32 adminpages/reports/login.php:67
2006
  #: adminpages/reports/login.php:69 adminpages/reports/login.php:85
2007
  #: adminpages/reports/login.php:89 adminpages/reports/memberships.php:281
2081
  #: pages/checkout.php:311 pages/checkout.php:314 pages/checkout.php:317
2082
  #: pages/checkout.php:319 pages/checkout.php:321 pages/checkout.php:326
2083
  #: pages/checkout.php:329 pages/confirmation.php:59 pages/confirmation.php:61
2084
+ #: pages/confirmation.php:66 pages/confirmation.php:67
2085
+ #: pages/confirmation.php:69 pages/invoice.php:46 pages/invoice.php:48
2086
  msgid "Billing Address"
2087
  msgstr ""
2088
 
2117
  msgid "Ended"
2118
  msgstr ""
2119
 
2120
+ #: adminpages/memberslist.php:179 adminpages/memberslist.php:179
2121
  msgid "Cancelled"
2122
  msgstr ""
2123
 
2124
+ #: adminpages/memberslist.php:181 adminpages/memberslist.php:181
2125
  msgid "Expired"
2126
  msgstr ""
2127
 
2128
  #: adminpages/memberslist.php:266 adminpages/reports/login.php:232
2129
  #: adminpages/memberslist.php:195 adminpages/memberslist.php:223
2130
  #: adminpages/memberslist.php:251 adminpages/memberslist.php:261
2131
+ #: adminpages/memberslist.php:262 adminpages/memberslist.php:266
2132
+ #: adminpages/reports/login.php:210 adminpages/reports/login.php:212
2133
+ #: adminpages/reports/login.php:228 adminpages/reports/login.php:232
2134
  msgid "No members found."
2135
  msgstr ""
2136
 
2137
  #: adminpages/memberslist.php:266 adminpages/reports/login.php:232
2138
  #: adminpages/memberslist.php:195 adminpages/memberslist.php:223
2139
  #: adminpages/memberslist.php:251 adminpages/memberslist.php:261
2140
+ #: adminpages/memberslist.php:262 adminpages/memberslist.php:266
2141
+ #: adminpages/reports/login.php:210 adminpages/reports/login.php:212
2142
+ #: adminpages/reports/login.php:228 adminpages/reports/login.php:232
2143
  msgid "Search all levels"
2144
  msgstr ""
2145
 
2184
  msgid "Error saving order."
2185
  msgstr ""
2186
 
2187
+ #: adminpages/orders.php:362 classes/class.memberorder.php:743
2188
  #: adminpages/orders.php:195 adminpages/orders.php:245
2189
  #: adminpages/orders.php:317 adminpages/orders.php:321
2190
  #: adminpages/orders.php:346 adminpages/orders.php:352
2282
  #: adminpages/orders.php:426 adminpages/orders.php:455
2283
  #: adminpages/orders.php:481 adminpages/orders.php:512
2284
  #: adminpages/orders.php:523 adminpages/templates/orders-email.php:60
2285
+ #: adminpages/templates/orders-print.php:89 pages/confirmation.php:92
2286
+ #: pages/invoice.php:74 pages/invoice.php:78 pages/invoice.php:80
2287
  msgid "Tax"
2288
  msgstr ""
2289
 
2305
  #: adminpages/orders.php:942 adminpages/orders.php:971
2306
  #: adminpages/orders.php:1108 adminpages/orders.php:1139
2307
  #: adminpages/orders.php:1145 adminpages/templates/orders-email.php:64
2308
+ #: adminpages/templates/orders-print.php:93 pages/confirmation.php:96
2309
+ #: pages/invoice.php:78 pages/invoice.php:82 pages/invoice.php:84
2310
  msgid "Total"
2311
  msgstr ""
2312
 
2333
 
2334
  #: adminpages/orders.php:574
2335
  #: classes/gateways/class.pmprogateway_braintree.php:446
2336
+ #: classes/gateways/class.pmprogateway_stripe.php:590 pages/billing.php:275
2337
  #: pages/checkout.php:423 adminpages/orders.php:339 adminpages/orders.php:389
2338
  #: adminpages/orders.php:461 adminpages/orders.php:490
2339
  #: adminpages/orders.php:532 adminpages/orders.php:563
2360
  #: classes/gateways/class.pmprogateway_stripe.php:484
2361
  #: classes/gateways/class.pmprogateway_stripe.php:522
2362
  #: classes/gateways/class.pmprogateway_stripe.php:549
2363
+ #: classes/gateways/class.pmprogateway_stripe.php:573
2364
+ #: classes/gateways/class.pmprogateway_stripe.php:589 pages/billing.php:234
2365
  #: pages/billing.php:238 pages/billing.php:247 pages/billing.php:250
2366
  #: pages/billing.php:253 pages/billing.php:262 pages/billing.php:268
2367
  #: pages/billing.php:271 pages/billing.php:274 pages/billing.php:275
2426
  msgstr ""
2427
 
2428
  #: adminpages/orders.php:654 adminpages/orders.php:1147
2429
+ #: classes/class.memberorder.php:744 adminpages/orders.php:394
2430
  #: adminpages/orders.php:444 adminpages/orders.php:516
2431
  #: adminpages/orders.php:545 adminpages/orders.php:604
2432
  #: adminpages/orders.php:612 adminpages/orders.php:643
2487
  msgid "Generated by the gateway. Useful to cross reference orders."
2488
  msgstr ""
2489
 
2490
+ #: adminpages/orders.php:706 classes/class.memberorder.php:745
2491
  #: adminpages/orders.php:432 adminpages/orders.php:482
2492
  #: adminpages/orders.php:483 adminpages/orders.php:555
2493
  #: adminpages/orders.php:584 adminpages/orders.php:664
2514
  #: adminpages/orders.php:947 adminpages/orders.php:976
2515
  #: adminpages/orders.php:1113 adminpages/orders.php:1144
2516
  #: adminpages/orders.php:1150 pages/account.php:91 pages/invoice.php:87
2517
+ #: pages/invoice.php:100 pages/invoice.php:105 pages/invoice.php:107
2518
  #: shortcodes/pmpro_account.php:122 shortcodes/pmpro_account.php:124
2519
  #: shortcodes/pmpro_account.php:125 shortcodes/pmpro_account.php:127
2520
  msgid "Date"
2691
  #: pages/confirmation.php:62 pages/confirmation.php:64
2692
  #: pages/confirmation.php:70 pages/confirmation.php:91
2693
  #: pages/confirmation.php:103 pages/confirmation.php:105
2694
+ #: pages/confirmation.php:113 pages/confirmation.php:116
2695
+ #: pages/confirmation.php:124 pages/invoice.php:27 pages/invoice.php:28
2696
+ #: pages/invoice.php:49 pages/invoice.php:51 pages/invoice.php:70
2697
  msgid "Membership Level"
2698
  msgstr ""
2699
 
3296
  msgid "Total Logins"
3297
  msgstr ""
3298
 
3299
+ #: adminpages/reports/memberships.php:18 adminpages/reports/memberships.php:324
3300
+ #: adminpages/reports/memberships.php:18 adminpages/reports/memberships.php:252
 
 
3301
  #: adminpages/reports/memberships.php:259
3302
  #: adminpages/reports/memberships.php:272
3303
  #: adminpages/reports/memberships.php:288
3489
  #: adminpages/templates/orders-email.php:56
3490
  #: adminpages/templates/orders-print.php:85 pages/confirmation.php:91
3491
  #: pages/invoice.php:73 adminpages/templates/orders-email.php:56
3492
+ #: adminpages/templates/orders-print.php:85 pages/confirmation.php:91
3493
+ #: pages/invoice.php:73 pages/invoice.php:77 pages/invoice.php:79
3494
  msgid "Subtotal"
3495
  msgstr ""
3496
 
3518
  "site's plugin page."
3519
  msgstr ""
3520
 
3521
+ #: classes/class.memberorder.php:740 classes/class.memberorder.php:553
3522
  #: classes/class.memberorder.php:561 classes/class.memberorder.php:564
3523
  #: classes/class.memberorder.php:573 classes/class.memberorder.php:644
3524
  #: classes/class.memberorder.php:697 classes/class.memberorder.php:699
3533
  "active."
3534
  msgstr ""
3535
 
3536
+ #: classes/class.memberorder.php:741 classes/class.memberorder.php:744
3537
  msgid "User Email"
3538
  msgstr ""
3539
 
3540
+ #: classes/class.memberorder.php:742 classes/class.memberorder.php:745
3541
  msgid "User Display Name"
3542
  msgstr ""
3543
 
3546
  msgid "An Email From %s"
3547
  msgstr ""
3548
 
3549
+ #: classes/class.pmproemail.php:143 classes/class.pmproemail.php:120
3550
  #: classes/class.pmproemail.php:122 classes/class.pmproemail.php:125
3551
  #: classes/class.pmproemail.php:134 classes/class.pmproemail.php:136
3552
  #, php-format
3553
  msgid "Your membership at %s has been CANCELLED"
3554
  msgstr ""
3555
 
3556
+ #: classes/class.pmproemail.php:176 classes/class.pmproemail.php:142
3557
  #: classes/class.pmproemail.php:144 classes/class.pmproemail.php:147
3558
  #: classes/class.pmproemail.php:156 classes/class.pmproemail.php:166
3559
  #: classes/class.pmproemail.php:169
3561
  msgid "Membership for %s at %s has been CANCELLED"
3562
  msgstr ""
3563
 
3564
+ #: classes/class.pmproemail.php:219 classes/class.pmproemail.php:172
3565
  #: classes/class.pmproemail.php:173 classes/class.pmproemail.php:175
3566
  #: classes/class.pmproemail.php:178 classes/class.pmproemail.php:187
3567
  #: classes/class.pmproemail.php:207 classes/class.pmproemail.php:212
3569
  msgid "Your membership confirmation for %s"
3570
  msgstr ""
3571
 
3572
+ #: classes/class.pmproemail.php:276 classes/class.pmproemail.php:285
3573
+ #: classes/class.pmproemail.php:294 classes/class.pmproemail.php:376
3574
+ #: classes/class.pmproemail.php:385 classes/class.pmproemail.php:703
3575
+ #: classes/class.pmproemail.php:705
3576
  #: classes/gateways/class.pmprogateway_braintree.php:489
3577
+ #: classes/gateways/class.pmprogateway_stripe.php:661 pages/checkout.php:70
3578
  #: pages/checkout.php:76 pages/checkout.php:498 pages/confirmation.php:58
3579
  #: pages/invoice.php:33 classes/class.pmproemail.php:216
3580
  #: classes/class.pmproemail.php:218 classes/class.pmproemail.php:225
3618
  #: classes/gateways/class.pmprogateway_stripe.php:573
3619
  #: classes/gateways/class.pmprogateway_stripe.php:611
3620
  #: classes/gateways/class.pmprogateway_stripe.php:638
3621
+ #: classes/gateways/class.pmprogateway_stripe.php:644
3622
+ #: classes/gateways/class.pmprogateway_stripe.php:660 pages/checkout.php:66
3623
  #: pages/checkout.php:67 pages/checkout.php:68 pages/checkout.php:70
3624
  #: pages/checkout.php:75 pages/checkout.php:76 pages/checkout.php:77
3625
  #: pages/checkout.php:78 pages/checkout.php:83 pages/checkout.php:85
3633
  msgid "Discount Code"
3634
  msgstr ""
3635
 
3636
+ #: classes/class.pmproemail.php:301 classes/class.pmproemail.php:397
3637
+ #: classes/class.pmproemail.php:712 classes/class.pmproemail.php:241
3638
  #: classes/class.pmproemail.php:243 classes/class.pmproemail.php:253
3639
  #: classes/class.pmproemail.php:256 classes/class.pmproemail.php:265
3640
  #: classes/class.pmproemail.php:285 classes/class.pmproemail.php:294
3650
  msgid "This membership will expire on %s."
3651
  msgstr ""
3652
 
3653
+ #: classes/class.pmproemail.php:323 classes/class.pmproemail.php:263
3654
  #: classes/class.pmproemail.php:265 classes/class.pmproemail.php:275
3655
  #: classes/class.pmproemail.php:278 classes/class.pmproemail.php:287
3656
  #: classes/class.pmproemail.php:307 classes/class.pmproemail.php:316
3658
  msgid "Member Checkout for %s at %s"
3659
  msgstr ""
3660
 
3661
+ #: classes/class.pmproemail.php:414 classes/class.pmproemail.php:375
3662
  #: classes/class.pmproemail.php:395 classes/class.pmproemail.php:407
3663
  #, php-format
3664
  msgid "Your billing information has been updated at %s"
3665
  msgstr ""
3666
 
3667
+ #: classes/class.pmproemail.php:468 classes/class.pmproemail.php:428
3668
  #: classes/class.pmproemail.php:448 classes/class.pmproemail.php:461
3669
  #, php-format
3670
  msgid "Billing information has been updated for %s at %s"
3671
  msgstr ""
3672
 
3673
+ #: classes/class.pmproemail.php:517 classes/class.pmproemail.php:425
3674
  #: classes/class.pmproemail.php:430 classes/class.pmproemail.php:464
3675
  #: classes/class.pmproemail.php:467 classes/class.pmproemail.php:476
3676
  #: classes/class.pmproemail.php:496 classes/class.pmproemail.php:510
3678
  msgid "Membership Payment Failed at %s"
3679
  msgstr ""
3680
 
3681
+ #: classes/class.pmproemail.php:564 classes/class.pmproemail.php:462
3682
  #: classes/class.pmproemail.php:468 classes/class.pmproemail.php:510
3683
  #: classes/class.pmproemail.php:513 classes/class.pmproemail.php:522
3684
  #: classes/class.pmproemail.php:542 classes/class.pmproemail.php:557
3686
  msgid "Membership Payment Failed For %s at %s"
3687
  msgstr ""
3688
 
3689
+ #: classes/class.pmproemail.php:612 classes/class.pmproemail.php:508
3690
  #: classes/class.pmproemail.php:557 classes/class.pmproemail.php:560
3691
  #: classes/class.pmproemail.php:569 classes/class.pmproemail.php:589
3692
  #: classes/class.pmproemail.php:605
3694
  msgid "Credit Card on File Expiring Soon at %s"
3695
  msgstr ""
3696
 
3697
+ #: classes/class.pmproemail.php:663 classes/class.pmproemail.php:501
3698
  #: classes/class.pmproemail.php:548 classes/class.pmproemail.php:605
3699
  #: classes/class.pmproemail.php:608 classes/class.pmproemail.php:617
3700
  #: classes/class.pmproemail.php:619 classes/class.pmproemail.php:639
3703
  msgid "INVOICE for %s membership"
3704
  msgstr ""
3705
 
3706
+ #: classes/class.pmproemail.php:740 classes/class.pmproemail.php:563
3707
  #: classes/class.pmproemail.php:611 classes/class.pmproemail.php:676
3708
  #: classes/class.pmproemail.php:679 classes/class.pmproemail.php:688
3709
  #: classes/class.pmproemail.php:690 classes/class.pmproemail.php:710
3712
  msgid "Your trial at %s is ending soon"
3713
  msgstr ""
3714
 
3715
+ #: classes/class.pmproemail.php:776 classes/class.pmproemail.php:596
3716
  #: classes/class.pmproemail.php:645 classes/class.pmproemail.php:710
3717
  #: classes/class.pmproemail.php:713 classes/class.pmproemail.php:722
3718
  #: classes/class.pmproemail.php:724 classes/class.pmproemail.php:744
3721
  msgid "Your membership at %s has ended"
3722
  msgstr ""
3723
 
3724
+ #: classes/class.pmproemail.php:803 classes/class.pmproemail.php:621
3725
  #: classes/class.pmproemail.php:670 classes/class.pmproemail.php:735
3726
  #: classes/class.pmproemail.php:738 classes/class.pmproemail.php:747
3727
  #: classes/class.pmproemail.php:749 classes/class.pmproemail.php:769
3730
  msgid "Your membership at %s will end soon"
3731
  msgstr ""
3732
 
3733
+ #: classes/class.pmproemail.php:825 classes/class.pmproemail.php:641
3734
  #: classes/class.pmproemail.php:690 classes/class.pmproemail.php:755
3735
  #: classes/class.pmproemail.php:758 classes/class.pmproemail.php:767
3736
  #: classes/class.pmproemail.php:769 classes/class.pmproemail.php:789
3739
  msgid "Your membership at %s has been changed"
3740
  msgstr ""
3741
 
3742
+ #: classes/class.pmproemail.php:830 classes/class.pmproemail.php:870
3743
  #: classes/class.pmproemail.php:759 classes/class.pmproemail.php:762
3744
  #: classes/class.pmproemail.php:771 classes/class.pmproemail.php:773
3745
  #: classes/class.pmproemail.php:793 classes/class.pmproemail.php:800
3750
  msgid "The new level is %s"
3751
  msgstr ""
3752
 
3753
+ #: classes/class.pmproemail.php:832 classes/class.pmproemail.php:647
3754
  #: classes/class.pmproemail.php:696 classes/class.pmproemail.php:761
3755
  #: classes/class.pmproemail.php:764 classes/class.pmproemail.php:773
3756
  #: classes/class.pmproemail.php:775 classes/class.pmproemail.php:795
3758
  msgid "Your membership has been cancelled"
3759
  msgstr ""
3760
 
3761
+ #: classes/class.pmproemail.php:836 classes/class.pmproemail.php:876
3762
  #: classes/class.pmproemail.php:651 classes/class.pmproemail.php:689
3763
  #: classes/class.pmproemail.php:700 classes/class.pmproemail.php:738
3764
  #: classes/class.pmproemail.php:765 classes/class.pmproemail.php:768
3772
  msgid "This membership will expire on %s"
3773
  msgstr ""
3774
 
3775
+ #: classes/class.pmproemail.php:840 classes/class.pmproemail.php:880
3776
  #: classes/class.pmproemail.php:655 classes/class.pmproemail.php:693
3777
  #: classes/class.pmproemail.php:704 classes/class.pmproemail.php:742
3778
  #: classes/class.pmproemail.php:769 classes/class.pmproemail.php:772
3785
  msgid "This membership does not expire"
3786
  msgstr ""
3787
 
3788
+ #: classes/class.pmproemail.php:866 classes/class.pmproemail.php:679
3789
  #: classes/class.pmproemail.php:728 classes/class.pmproemail.php:793
3790
  #: classes/class.pmproemail.php:796 classes/class.pmproemail.php:805
3791
  #: classes/class.pmproemail.php:806 classes/class.pmproemail.php:807
3794
  msgid "Membership for %s at %s has been changed"
3795
  msgstr ""
3796
 
3797
+ #: classes/class.pmproemail.php:872 classes/class.pmproemail.php:799
3798
  #: classes/class.pmproemail.php:802 classes/class.pmproemail.php:811
3799
  #: classes/class.pmproemail.php:812 classes/class.pmproemail.php:813
3800
  #: classes/class.pmproemail.php:832 classes/class.pmproemail.php:865
3801
  msgid "Membership has been cancelled"
3802
  msgstr ""
3803
 
3804
+ #: classes/class.pmproemail.php:911 classes/class.pmproemail.php:848
3805
  #: classes/class.pmproemail.php:849 classes/class.pmproemail.php:850
3806
  #: classes/class.pmproemail.php:869 classes/class.pmproemail.php:904
3807
  msgid "Invoice for Order #: "
3808
  msgstr ""
3809
 
3810
+ #: classes/class.pmproemail.php:955 classes/class.pmproemail.php:948
3811
  msgid ""
3812
  "<p>An administrator at !!sitename!! has changed your membership level.</p>\n"
3813
  "\n"
4086
  msgstr ""
4087
 
4088
  #: classes/gateways/class.pmprogateway_braintree.php:313
4089
+ #: classes/gateways/class.pmprogateway_stripe.php:306
4090
  #: adminpages/paymentsettings.php:462 adminpages/paymentsettings.php:470
4091
  #: adminpages/paymentsettings.php:503 adminpages/paymentsettings.php:509
4092
  #: adminpages/paymentsettings.php:511 adminpages/paymentsettings.php:517
4108
  #: classes/gateways/class.pmprogateway_stripe.php:230
4109
  #: classes/gateways/class.pmprogateway_stripe.php:257
4110
  #: classes/gateways/class.pmprogateway_stripe.php:289
4111
+ #: classes/gateways/class.pmprogateway_stripe.php:305
4112
  msgid "Web Hook URL"
4113
  msgstr ""
4114
 
4126
  msgstr ""
4127
 
4128
  #: classes/gateways/class.pmprogateway_braintree.php:434
4129
+ #: classes/gateways/class.pmprogateway_stripe.php:578 pages/checkout.php:411
4130
  #: classes/gateways/class.pmprogateway_braintree.php:270
4131
  #: classes/gateways/class.pmprogateway_braintree.php:283
4132
  #: classes/gateways/class.pmprogateway_braintree.php:285
4149
  #: classes/gateways/class.pmprogateway_stripe.php:461
4150
  #: classes/gateways/class.pmprogateway_stripe.php:499
4151
  #: classes/gateways/class.pmprogateway_stripe.php:526
4152
+ #: classes/gateways/class.pmprogateway_stripe.php:561
4153
+ #: classes/gateways/class.pmprogateway_stripe.php:577 pages/checkout.php:411
4154
  #: pages/checkout.php:476 pages/checkout.php:478 pages/checkout.php:485
4155
  #: pages/checkout.php:493 pages/checkout.php:494 pages/checkout.php:500
4156
  #: pages/checkout.php:501 pages/checkout.php:503 pages/checkout.php:510
4159
  msgstr ""
4160
 
4161
  #: classes/gateways/class.pmprogateway_braintree.php:435
4162
+ #: classes/gateways/class.pmprogateway_stripe.php:579 pages/checkout.php:412
4163
  #: classes/gateways/class.pmprogateway_braintree.php:270
4164
  #: classes/gateways/class.pmprogateway_braintree.php:283
4165
  #: classes/gateways/class.pmprogateway_braintree.php:285
4182
  #: classes/gateways/class.pmprogateway_stripe.php:462
4183
  #: classes/gateways/class.pmprogateway_stripe.php:500
4184
  #: classes/gateways/class.pmprogateway_stripe.php:527
4185
+ #: classes/gateways/class.pmprogateway_stripe.php:562
4186
+ #: classes/gateways/class.pmprogateway_stripe.php:578 pages/checkout.php:412
4187
  #: pages/checkout.php:476 pages/checkout.php:478 pages/checkout.php:485
4188
  #: pages/checkout.php:493 pages/checkout.php:494 pages/checkout.php:500
4189
  #: pages/checkout.php:502 pages/checkout.php:504 pages/checkout.php:511
4193
  msgstr ""
4194
 
4195
  #: classes/gateways/class.pmprogateway_braintree.php:455
4196
+ #: classes/gateways/class.pmprogateway_stripe.php:626 pages/billing.php:313
4197
+ #: pages/checkout.php:459 classes/gateways/class.pmprogateway_braintree.php:303
 
4198
  #: classes/gateways/class.pmprogateway_braintree.php:316
4199
  #: classes/gateways/class.pmprogateway_braintree.php:318
4200
  #: classes/gateways/class.pmprogateway_braintree.php:321
4215
  #: classes/gateways/class.pmprogateway_stripe.php:527
4216
  #: classes/gateways/class.pmprogateway_stripe.php:565
4217
  #: classes/gateways/class.pmprogateway_stripe.php:592
4218
+ #: classes/gateways/class.pmprogateway_stripe.php:609
4219
+ #: classes/gateways/class.pmprogateway_stripe.php:625 pages/billing.php:244
4220
  #: pages/billing.php:248 pages/billing.php:257 pages/billing.php:260
4221
  #: pages/billing.php:263 pages/billing.php:305 pages/billing.php:311
4222
  #: pages/billing.php:312 pages/billing.php:313 pages/billing.php:314
4261
  msgstr ""
4262
 
4263
  #: classes/gateways/class.pmprogateway_braintree.php:484
4264
+ #: classes/gateways/class.pmprogateway_stripe.php:656 pages/billing.php:353
4265
+ #: pages/checkout.php:493 classes/gateways/class.pmprogateway_braintree.php:341
 
4266
  #: classes/gateways/class.pmprogateway_braintree.php:354
4267
  #: classes/gateways/class.pmprogateway_braintree.php:356
4268
  #: classes/gateways/class.pmprogateway_braintree.php:359
4283
  #: classes/gateways/class.pmprogateway_stripe.php:565
4284
  #: classes/gateways/class.pmprogateway_stripe.php:603
4285
  #: classes/gateways/class.pmprogateway_stripe.php:630
4286
+ #: classes/gateways/class.pmprogateway_stripe.php:639
4287
+ #: classes/gateways/class.pmprogateway_stripe.php:655 pages/billing.php:282
4288
  #: pages/billing.php:286 pages/billing.php:295 pages/billing.php:298
4289
  #: pages/billing.php:302 pages/billing.php:344 pages/billing.php:352
4290
  #: pages/billing.php:353 pages/billing.php:355 pages/billing.php:358
4297
  msgstr ""
4298
 
4299
  #: classes/gateways/class.pmprogateway_braintree.php:491
4300
+ #: classes/gateways/class.pmprogateway_stripe.php:663 pages/checkout.php:78
4301
+ #: pages/checkout.php:500 classes/gateways/class.pmprogateway_braintree.php:351
 
4302
  #: classes/gateways/class.pmprogateway_braintree.php:364
4303
  #: classes/gateways/class.pmprogateway_braintree.php:366
4304
  #: classes/gateways/class.pmprogateway_braintree.php:369
4320
  #: classes/gateways/class.pmprogateway_stripe.php:575
4321
  #: classes/gateways/class.pmprogateway_stripe.php:613
4322
  #: classes/gateways/class.pmprogateway_stripe.php:640
4323
+ #: classes/gateways/class.pmprogateway_stripe.php:646
4324
+ #: classes/gateways/class.pmprogateway_stripe.php:662 pages/checkout.php:78
4325
  #: pages/checkout.php:79 pages/checkout.php:80 pages/checkout.php:87
4326
  #: pages/checkout.php:88 pages/checkout.php:95 pages/checkout.php:98
4327
  #: pages/checkout.php:500 pages/checkout.php:551 pages/checkout.php:567
4359
  msgstr ""
4360
 
4361
  #: classes/gateways/class.pmprogateway_braintree.php:554
4362
+ #: classes/gateways/class.pmprogateway_stripe.php:1140
4363
  #: classes/gateways/class.pmprogateway_braintree.php:61
4364
  #: classes/gateways/class.pmprogateway_braintree.php:406
4365
  #: classes/gateways/class.pmprogateway_braintree.php:419
4384
  #: classes/gateways/class.pmprogateway_stripe.php:1094
4385
  #: classes/gateways/class.pmprogateway_stripe.php:1105
4386
  #: classes/gateways/class.pmprogateway_stripe.php:1123
4387
+ #: classes/gateways/class.pmprogateway_stripe.php:1139
4388
  #: classes/gateways/class.pmprogateway_stripe.php:1143
4389
  #: classes/gateways/class.pmprogateway_stripe.php:1176
4390
  msgid "Unknown error: Initial payment failed."
5028
  #: classes/gateways/class.pmprogateway_stripe.php:208
5029
  #: classes/gateways/class.pmprogateway_stripe.php:210
5030
  #: classes/gateways/class.pmprogateway_stripe.php:237
5031
+ #: classes/gateways/class.pmprogateway_stripe.php:261
5032
  #: classes/gateways/class.pmprogateway_stripe.php:269
5033
  msgid "Publishable Key"
5034
  msgstr ""
5035
 
5036
+ #: classes/gateways/class.pmprogateway_stripe.php:269
5037
  #: classes/gateways/class.pmprogateway_stripe.php:269
5038
  msgid "Your Publishable Key appears incorrect."
5039
  msgstr ""
5051
  #: classes/gateways/class.pmprogateway_stripe.php:202
5052
  #: classes/gateways/class.pmprogateway_stripe.php:229
5053
  #: classes/gateways/class.pmprogateway_stripe.php:261
5054
+ #: classes/gateways/class.pmprogateway_stripe.php:277
5055
  msgid "Secret Key"
5056
  msgstr ""
5057
 
5058
+ #: classes/gateways/class.pmprogateway_stripe.php:286
5059
  #: classes/gateways/class.pmprogateway_stripe.php:285
5060
  msgid "Your Secret Key appears incorrect."
5061
  msgstr ""
5062
 
5063
+ #: classes/gateways/class.pmprogateway_stripe.php:294
5064
  #: adminpages/paymentsettings.php:425 adminpages/paymentsettings.php:430
5065
  #: adminpages/paymentsettings.php:432
5066
  #: classes/gateways/class.pmprogateway_stripe.php:169
5073
  #: classes/gateways/class.pmprogateway_stripe.php:218
5074
  #: classes/gateways/class.pmprogateway_stripe.php:245
5075
  #: classes/gateways/class.pmprogateway_stripe.php:277
5076
+ #: classes/gateways/class.pmprogateway_stripe.php:293
5077
  msgid "Show Billing Address Fields"
5078
  msgstr ""
5079
 
5080
+ #: classes/gateways/class.pmprogateway_stripe.php:301
5081
  #: adminpages/paymentsettings.php:437 adminpages/paymentsettings.php:439
5082
  #: classes/gateways/class.pmprogateway_stripe.php:176
5083
  #: classes/gateways/class.pmprogateway_stripe.php:177
5089
  #: classes/gateways/class.pmprogateway_stripe.php:225
5090
  #: classes/gateways/class.pmprogateway_stripe.php:252
5091
  #: classes/gateways/class.pmprogateway_stripe.php:284
5092
+ #: classes/gateways/class.pmprogateway_stripe.php:300
5093
  msgid ""
5094
  "Stripe doesn't require billing address fields. Choose 'No' to hide them on "
5095
  "the checkout page.<br /><strong>If No, make sure you disable address "
5096
  "verification in the Stripe dashboard settings.</strong>"
5097
  msgstr ""
5098
 
5099
+ #: classes/gateways/class.pmprogateway_stripe.php:309
5100
  #: adminpages/paymentsettings.php:465 adminpages/paymentsettings.php:506
5101
  #: adminpages/paymentsettings.php:512 adminpages/paymentsettings.php:514
5102
  #: classes/gateways/class.pmprogateway_stripe.php:184
5109
  #: classes/gateways/class.pmprogateway_stripe.php:233
5110
  #: classes/gateways/class.pmprogateway_stripe.php:260
5111
  #: classes/gateways/class.pmprogateway_stripe.php:292
5112
+ #: classes/gateways/class.pmprogateway_stripe.php:308
5113
  msgid "To fully integrate with Stripe, be sure to set your Web Hook URL to"
5114
  msgstr ""
5115
 
5116
+ #: classes/gateways/class.pmprogateway_stripe.php:655 pages/checkout.php:492
5117
+ #: classes/gateways/class.pmprogateway_stripe.php:638
5118
  #: classes/gateways/class.pmprogateway_stripe.php:654 pages/checkout.php:492
 
5119
  msgid "Security Code (CVC)"
5120
  msgstr ""
5121
 
5122
+ #: classes/gateways/class.pmprogateway_stripe.php:727
5123
  #: classes/gateways/class.pmprogateway_stripe.php:703
5124
  #: classes/gateways/class.pmprogateway_stripe.php:710
5125
+ #: classes/gateways/class.pmprogateway_stripe.php:726
5126
  #, php-format
5127
  msgid ""
5128
  "%1$sNote:%2$s Subscription %3$s%4$s%5$s could not be found at Stripe. It may "
5129
  "have been deleted."
5130
  msgstr ""
5131
 
5132
+ #: classes/gateways/class.pmprogateway_stripe.php:734
5133
  #: classes/gateways/class.pmprogateway_stripe.php:567
5134
  #: classes/gateways/class.pmprogateway_stripe.php:568
5135
  #: classes/gateways/class.pmprogateway_stripe.php:578
5143
  #: classes/gateways/class.pmprogateway_stripe.php:683
5144
  #: classes/gateways/class.pmprogateway_stripe.php:710
5145
  #: classes/gateways/class.pmprogateway_stripe.php:717
5146
+ #: classes/gateways/class.pmprogateway_stripe.php:733
5147
  msgid "Subscription Updates"
5148
  msgstr ""
5149
 
5150
+ #: classes/gateways/class.pmprogateway_stripe.php:738
5151
  #: classes/gateways/class.pmprogateway_stripe.php:571
5152
  #: classes/gateways/class.pmprogateway_stripe.php:572
5153
  #: classes/gateways/class.pmprogateway_stripe.php:582
5161
  #: classes/gateways/class.pmprogateway_stripe.php:687
5162
  #: classes/gateways/class.pmprogateway_stripe.php:714
5163
  #: classes/gateways/class.pmprogateway_stripe.php:721
5164
+ #: classes/gateways/class.pmprogateway_stripe.php:737
5165
  msgid ""
5166
  "Subscription updates, allow you to change the member's subscription values "
5167
  "at predefined times. Be sure to click Update Profile after making changes."
5168
  msgstr ""
5169
 
5170
+ #: classes/gateways/class.pmprogateway_stripe.php:740
5171
  #: classes/gateways/class.pmprogateway_stripe.php:573
5172
  #: classes/gateways/class.pmprogateway_stripe.php:574
5173
  #: classes/gateways/class.pmprogateway_stripe.php:584
5181
  #: classes/gateways/class.pmprogateway_stripe.php:689
5182
  #: classes/gateways/class.pmprogateway_stripe.php:716
5183
  #: classes/gateways/class.pmprogateway_stripe.php:723
5184
+ #: classes/gateways/class.pmprogateway_stripe.php:739
5185
  msgid ""
5186
  "Subscription updates, allow you to change the member's subscription values "
5187
  "at predefined times. Be sure to click Update User after making changes."
5188
  msgstr ""
5189
 
5190
+ #: classes/gateways/class.pmprogateway_stripe.php:745 pages/billing.php:364
5191
  #: classes/gateways/class.pmprogateway_stripe.php:578
5192
  #: classes/gateways/class.pmprogateway_stripe.php:579
5193
  #: classes/gateways/class.pmprogateway_stripe.php:589
5200
  #: classes/gateways/class.pmprogateway_stripe.php:656
5201
  #: classes/gateways/class.pmprogateway_stripe.php:694
5202
  #: classes/gateways/class.pmprogateway_stripe.php:721
5203
+ #: classes/gateways/class.pmprogateway_stripe.php:728
5204
+ #: classes/gateways/class.pmprogateway_stripe.php:744 pages/billing.php:294
5205
  #: pages/billing.php:298 pages/billing.php:329 pages/billing.php:338
5206
  #: pages/billing.php:341 pages/billing.php:343 pages/billing.php:347
5207
  #: pages/billing.php:363 pages/billing.php:364 pages/billing.php:370
5210
  msgid "Update"
5211
  msgstr ""
5212
 
5213
+ #: classes/gateways/class.pmprogateway_stripe.php:1136
5214
  #: classes/gateways/class.pmprogateway_stripe.php:1119
5215
+ #: classes/gateways/class.pmprogateway_stripe.php:1135
5216
  #: classes/gateways/class.pmprogateway_stripe.php:1172
5217
  msgid "Payment error: Please contact the webmaster (stripe-load-error)"
5218
  msgstr ""
5219
 
5220
+ #: classes/gateways/class.pmprogateway_stripe.php:1374
5221
  #: classes/gateways/class.pmprogateway_stripe.php:190
5222
  #: classes/gateways/class.pmprogateway_stripe.php:192
5223
  #: classes/gateways/class.pmprogateway_stripe.php:199
5238
  #: classes/gateways/class.pmprogateway_stripe.php:1326
5239
  #: classes/gateways/class.pmprogateway_stripe.php:1336
5240
  #: classes/gateways/class.pmprogateway_stripe.php:1357
5241
+ #: classes/gateways/class.pmprogateway_stripe.php:1373
5242
  #: classes/gateways/class.pmprogateway_stripe.php:1374
5243
  #: classes/gateways/class.pmprogateway_stripe.php:1410
5244
  msgid "Error creating customer record with Stripe:"
5245
  msgstr ""
5246
 
5247
+ #: classes/gateways/class.pmprogateway_stripe.php:1433
5248
  #: classes/gateways/class.pmprogateway_stripe.php:1275
5249
  #: classes/gateways/class.pmprogateway_stripe.php:1303
5250
  #: classes/gateways/class.pmprogateway_stripe.php:1313
5255
  #: classes/gateways/class.pmprogateway_stripe.php:1385
5256
  #: classes/gateways/class.pmprogateway_stripe.php:1395
5257
  #: classes/gateways/class.pmprogateway_stripe.php:1416
5258
+ #: classes/gateways/class.pmprogateway_stripe.php:1432
5259
  #: classes/gateways/class.pmprogateway_stripe.php:1433
5260
  #: classes/gateways/class.pmprogateway_stripe.php:1469
5261
  msgid "Error getting subscription with Stripe:"
5262
  msgstr ""
5263
 
5264
+ #: classes/gateways/class.pmprogateway_stripe.php:1589
5265
  #: classes/gateways/class.pmprogateway_stripe.php:278
5266
  #: classes/gateways/class.pmprogateway_stripe.php:279
5267
  #: classes/gateways/class.pmprogateway_stripe.php:286
5290
  #: classes/gateways/class.pmprogateway_stripe.php:1541
5291
  #: classes/gateways/class.pmprogateway_stripe.php:1551
5292
  #: classes/gateways/class.pmprogateway_stripe.php:1572
5293
+ #: classes/gateways/class.pmprogateway_stripe.php:1588
5294
  #: classes/gateways/class.pmprogateway_stripe.php:1589
5295
  #: classes/gateways/class.pmprogateway_stripe.php:1625
5296
  msgid "Error creating plan with Stripe:"
5297
  msgstr ""
5298
 
5299
+ #: classes/gateways/class.pmprogateway_stripe.php:1620
5300
  #: classes/gateways/class.pmprogateway_stripe.php:294
5301
  #: classes/gateways/class.pmprogateway_stripe.php:295
5302
  #: classes/gateways/class.pmprogateway_stripe.php:302
5320
  #: classes/gateways/class.pmprogateway_stripe.php:1572
5321
  #: classes/gateways/class.pmprogateway_stripe.php:1582
5322
  #: classes/gateways/class.pmprogateway_stripe.php:1603
5323
+ #: classes/gateways/class.pmprogateway_stripe.php:1619
5324
  #: classes/gateways/class.pmprogateway_stripe.php:1620
5325
  #: classes/gateways/class.pmprogateway_stripe.php:1656
5326
  msgid "Error subscribing customer to plan with Stripe:"
5327
  msgstr ""
5328
 
5329
+ #: classes/gateways/class.pmprogateway_stripe.php:1715
5330
  #: classes/gateways/class.pmprogateway_stripe.php:769
5331
  #: classes/gateways/class.pmprogateway_stripe.php:770
5332
  #: classes/gateways/class.pmprogateway_stripe.php:780
5340
  #: classes/gateways/class.pmprogateway_stripe.php:887
5341
  #: classes/gateways/class.pmprogateway_stripe.php:914
5342
  #: classes/gateways/class.pmprogateway_stripe.php:1698
5343
+ #: classes/gateways/class.pmprogateway_stripe.php:1714
5344
  msgid "Could not cancel the old subscription. Updates have not been processed."
5345
  msgstr ""
5346
 
5347
+ #: classes/gateways/class.pmprogateway_stripe.php:1818
5348
  #: classes/gateways/class.pmprogateway_stripe.php:383
5349
  #: classes/gateways/class.pmprogateway_stripe.php:389
5350
  #: classes/gateways/class.pmprogateway_stripe.php:410
5367
  #: classes/gateways/class.pmprogateway_stripe.php:1716
5368
  #: classes/gateways/class.pmprogateway_stripe.php:1752
5369
  #: classes/gateways/class.pmprogateway_stripe.php:1801
5370
+ #: classes/gateways/class.pmprogateway_stripe.php:1817
5371
  msgid "Could not cancel old subscription."
5372
  msgstr ""
5373
 
5374
+ #: classes/gateways/class.pmprogateway_stripe.php:1835
5375
  #: classes/gateways/class.pmprogateway_stripe.php:1533
5376
  #: classes/gateways/class.pmprogateway_stripe.php:1534
5377
  #: classes/gateways/class.pmprogateway_stripe.php:1535
5391
  #: classes/gateways/class.pmprogateway_stripe.php:1733
5392
  #: classes/gateways/class.pmprogateway_stripe.php:1769
5393
  #: classes/gateways/class.pmprogateway_stripe.php:1818
5394
+ #: classes/gateways/class.pmprogateway_stripe.php:1834
5395
  msgid "Could not find the customer."
5396
  msgstr ""
5397
 
5398
+ #: classes/gateways/class.pmprogateway_stripe.php:1995
5399
  #: classes/gateways/class.pmprogateway_stripe.php:1836
5400
  #: classes/gateways/class.pmprogateway_stripe.php:1837
5401
  #: classes/gateways/class.pmprogateway_stripe.php:1847
5402
  #: classes/gateways/class.pmprogateway_stripe.php:1885
5403
  #: classes/gateways/class.pmprogateway_stripe.php:1921
5404
  #: classes/gateways/class.pmprogateway_stripe.php:1978
5405
+ #: classes/gateways/class.pmprogateway_stripe.php:1994
5406
  msgid "Error: "
5407
  msgstr ""
5408
 
5409
+ #: classes/gateways/class.pmprogateway_stripe.php:2008
5410
  #: classes/gateways/class.pmprogateway_stripe.php:1849
5411
  #: classes/gateways/class.pmprogateway_stripe.php:1850
5412
  #: classes/gateways/class.pmprogateway_stripe.php:1860
5413
  #: classes/gateways/class.pmprogateway_stripe.php:1898
5414
  #: classes/gateways/class.pmprogateway_stripe.php:1934
5415
  #: classes/gateways/class.pmprogateway_stripe.php:1991
5416
+ #: classes/gateways/class.pmprogateway_stripe.php:2007
5417
  #, php-format
5418
  msgid "Error: Unkown error while refunding charge #%s"
5419
  msgstr ""
6827
  msgid "Vietnamese Dong"
6828
  msgstr ""
6829
 
6830
+ #: includes/filters.php:224 includes/filters.php:217
6831
  msgid ""
6832
  "There was a potential issue while setting the 'Profile Start Date' for a "
6833
  "user's subscription at checkout. PayPal does not allow one to set a Profile "
6844
  "situations."
6845
  msgstr ""
6846
 
6847
+ #: includes/filters.php:225
6848
  #, php-format
6849
  msgid ""
6850
+ "User: %1$s<br />Email: %2$s<br />Membership Level: %3$s<br />Order #: "
6851
+ "%4$s<br />Original Profile Start Date: %5$s<br />Adjusted Profile Start "
6852
+ "Date: %6$s<br />Trial Period: %7$s<br />Trial Frequency: %8$s<br />"
6853
  msgstr ""
6854
 
6855
+ #: includes/filters.php:227 includes/filters.php:220
6856
  #, php-format
6857
  msgid "Profile Start Date Issue Detected and Fixed at %s"
6858
  msgstr ""
6859
 
6860
+ #: includes/functions.php:321 includes/functions.php:433
6861
  #: includes/functions.php:160 includes/functions.php:196
6862
  #: includes/functions.php:200 includes/functions.php:202
6863
  #: includes/functions.php:203 includes/functions.php:204
6869
  msgid "The price for membership is <strong>%s</strong> now"
6870
  msgstr ""
6871
 
6872
+ #: includes/functions.php:323 includes/functions.php:435
6873
  #: includes/functions.php:202 includes/functions.php:204
6874
  #: includes/functions.php:205 includes/functions.php:206
6875
  #: includes/functions.php:209 includes/functions.php:245
6880
  msgid "<strong>%s</strong> now"
6881
  msgstr ""
6882
 
6883
+ #: includes/functions.php:330
 
 
 
 
 
 
6884
  #, php-format
6885
+ msgid " and then <strong>%1$s per %2$s for %3$d more %4$s</strong>."
6886
  msgstr ""
6887
 
6888
+ #: includes/functions.php:332
 
 
6889
  #, php-format
6890
+ msgid " and then <strong>%1$s every %2$d %3$s for %4$d more payments</strong>."
6891
  msgstr ""
6892
 
6893
+ #: includes/functions.php:335
 
 
 
 
 
 
6894
  #, php-format
6895
+ msgid " and then <strong>%1$s after %2$d %3$s</strong>."
6896
  msgstr ""
6897
 
6898
+ #: includes/functions.php:340
 
 
 
 
 
6899
  #, php-format
6900
+ msgid "The price for membership is <strong>%1$s per %2$s</strong>."
6901
  msgstr ""
6902
 
6903
+ #: includes/functions.php:342
 
 
 
 
6904
  #, php-format
6905
+ msgid "<strong>%1$s per %2$s</strong>."
6906
  msgstr ""
6907
 
6908
+ #: includes/functions.php:346
 
 
 
 
 
6909
  #, php-format
6910
+ msgid "The price for membership is <strong>%1$s every %2$d %3$s</strong>."
6911
  msgstr ""
6912
 
6913
+ #: includes/functions.php:348
 
 
 
 
6914
  #, php-format
6915
+ msgid "<strong>%1$s every %2$d %3$s</strong>."
6916
  msgstr ""
6917
 
6918
+ #: includes/functions.php:353
 
 
 
 
 
 
 
6919
  #, php-format
6920
+ msgid " and then <strong>%1$s per %2$s</strong>."
6921
  msgstr ""
6922
 
6923
+ #: includes/functions.php:355
 
 
 
 
 
 
 
6924
  #, php-format
6925
+ msgid " and then <strong>%1$s every %2$d %3$s</strong>."
6926
  msgstr ""
6927
 
6928
+ #: includes/functions.php:370 includes/functions.php:202
6929
  #: includes/functions.php:238 includes/functions.php:249
6930
  #: includes/functions.php:260 includes/functions.php:261
6931
  #: includes/functions.php:262 includes/functions.php:264
6936
  msgid "After your initial payment, your first payment is Free."
6937
  msgstr ""
6938
 
6939
+ #: includes/functions.php:372 includes/functions.php:206
6940
  #: includes/functions.php:242 includes/functions.php:253
6941
  #: includes/functions.php:264 includes/functions.php:265
6942
  #: includes/functions.php:266 includes/functions.php:268
6948
  msgid "After your initial payment, your first %d payments are Free."
6949
  msgstr ""
6950
 
6951
+ #: includes/functions.php:376 includes/functions.php:213
6952
  #: includes/functions.php:249 includes/functions.php:260
6953
  #: includes/functions.php:271 includes/functions.php:272
6954
  #: includes/functions.php:273 includes/functions.php:275
6960
  msgid "After your initial payment, your first payment will cost %s."
6961
  msgstr ""
6962
 
6963
+ #: includes/functions.php:378
 
 
 
 
 
 
 
6964
  #, php-format
6965
+ msgid "After your initial payment, your first %1$d payments will cost %2$s."
6966
  msgstr ""
6967
 
6968
+ #: includes/functions.php:388 includes/functions.php:489
 
 
 
 
 
 
 
 
6969
  #, php-format
6970
+ msgid "Customers in %1$s will be charged %2$s%% tax."
6971
  msgstr ""
6972
 
6973
+ #: includes/functions.php:446
 
6974
  #, php-format
6975
+ msgid "<strong>%1$s per %2$s for %3$d more %4$s</strong>"
6976
  msgstr ""
6977
 
6978
+ #: includes/functions.php:448
 
6979
  #, php-format
6980
+ msgid "<strong>%1$s every %2$d %3$s for %4$d more payments</strong>"
6981
  msgstr ""
6982
 
6983
+ #: includes/functions.php:451
 
6984
  #, php-format
6985
+ msgid "<strong>%1$s after %2$d %3$s</strong>"
6986
  msgstr ""
6987
 
6988
+ #: includes/functions.php:454
 
6989
  #, php-format
6990
+ msgid "<strong>%1$s every %2$s</strong>"
6991
  msgstr ""
6992
 
6993
+ #: includes/functions.php:456
 
6994
  #, php-format
6995
+ msgid "<strong>%1$s every %2$d %3$s</strong>"
6996
  msgstr ""
6997
 
6998
+ #: includes/functions.php:478 includes/functions.php:511
6999
  #: includes/functions.php:520
7000
  msgid "Trial pricing has been applied to the first payment."
7001
  msgstr ""
7002
 
7003
+ #: includes/functions.php:480 includes/functions.php:513
7004
  #: includes/functions.php:522
7005
  #, php-format
7006
  msgid "Trial pricing has been applied to the first %d payments."
7007
  msgstr ""
7008
 
7009
+ #: includes/functions.php:505
 
 
 
 
 
 
 
7010
  #, php-format
7011
+ msgid "Membership expires after %1$d %2$s."
7012
  msgstr ""
7013
 
7014
+ #: includes/functions.php:524
 
7015
  #, php-format
7016
+ msgid "%1$s membership expires after %2$d %3$s"
7017
  msgstr ""
7018
 
7019
+ #: includes/functions.php:877 includes/functions.php:491
7020
  #: includes/functions.php:514 includes/functions.php:525
7021
  #: includes/functions.php:536 includes/functions.php:537
7022
  #: includes/functions.php:538 includes/functions.php:545
7029
  msgid "User ID not found."
7030
  msgstr ""
7031
 
7032
+ #: includes/functions.php:889
7033
+ msgid "No membership_id specified in pmpro_changeMembershipLevel."
7034
+ msgstr ""
7035
+
7036
+ #: includes/functions.php:895 includes/functions.php:903
7037
+ #: includes/functions.php:508 includes/functions.php:531
7038
+ #: includes/functions.php:542 includes/functions.php:553
7039
+ #: includes/functions.php:554 includes/functions.php:555
7040
+ #: includes/functions.php:562 includes/functions.php:586
7041
+ #: includes/functions.php:587 includes/functions.php:589
7042
+ #: includes/functions.php:596 includes/functions.php:612
7043
+ #: includes/functions.php:635 includes/functions.php:714
7044
+ #: includes/functions.php:780 includes/functions.php:786
7045
+ #: includes/functions.php:965 includes/functions.php:967
7046
+ #: includes/functions.php:976
7047
  msgid "Invalid level."
7048
  msgstr ""
7049
 
7050
+ #: includes/functions.php:914 includes/functions.php:520
7051
  #: includes/functions.php:542 includes/functions.php:553
7052
  #: includes/functions.php:564 includes/functions.php:565
7053
  #: includes/functions.php:566 includes/functions.php:573
7060
  msgid "not changing?"
7061
  msgstr ""
7062
 
7063
+ #: includes/functions.php:970 includes/functions.php:537
7064
  #: includes/functions.php:559 includes/functions.php:570
7065
  #: includes/functions.php:581 includes/functions.php:582
7066
  #: includes/functions.php:583 includes/functions.php:590
7088
  msgid "Error interacting with database"
7089
  msgstr ""
7090
 
7091
+ #: includes/functions.php:1067 includes/functions.php:907
7092
  #: includes/functions.php:1123 includes/functions.php:1127
7093
  #: includes/functions.php:1129 includes/functions.php:1138
7094
  #, php-format
7095
  msgid "Error interacting with database: %s"
7096
  msgstr ""
7097
 
7098
+ #: includes/functions.php:1141 includes/functions.php:1179
7099
  #: includes/functions.php:629 includes/functions.php:651
7100
  #: includes/functions.php:667 includes/functions.php:668
7101
  #: includes/functions.php:678 includes/functions.php:681
7121
  msgid "Membership level not found."
7122
  msgstr ""
7123
 
7124
+ #: includes/functions.php:1533 includes/functions.php:1100
7125
  #: includes/functions.php:1101 includes/functions.php:1118
7126
  #: includes/functions.php:1142 includes/functions.php:1143
7127
  #: includes/functions.php:1150 includes/functions.php:1157
7133
  msgid "No code was given to check."
7134
  msgstr ""
7135
 
7136
+ #: includes/functions.php:1542 includes/functions.php:1050
7137
  #: includes/functions.php:1072 includes/functions.php:1088
7138
  #: includes/functions.php:1099 includes/functions.php:1102
7139
  #: includes/functions.php:1109 includes/functions.php:1110
7149
  msgid "The discount code could not be found."
7150
  msgstr ""
7151
 
7152
+ #: includes/functions.php:1557 includes/functions.php:1066
7153
  #: includes/functions.php:1088 includes/functions.php:1104
7154
  #: includes/functions.php:1115 includes/functions.php:1118
7155
  #: includes/functions.php:1124 includes/functions.php:1125
7166
  msgid "This discount code goes into effect on %s."
7167
  msgstr ""
7168
 
7169
+ #: includes/functions.php:1564 includes/functions.php:1075
7170
  #: includes/functions.php:1097 includes/functions.php:1113
7171
  #: includes/functions.php:1124 includes/functions.php:1127
7172
  #: includes/functions.php:1131 includes/functions.php:1132
7183
  msgid "This discount code expired on %s."
7184
  msgstr ""
7185
 
7186
+ #: includes/functions.php:1573 includes/functions.php:1087
7187
  #: includes/functions.php:1109 includes/functions.php:1125
7188
  #: includes/functions.php:1136 includes/functions.php:1139
7189
  #: includes/functions.php:1141 includes/functions.php:1142
7199
  msgid "This discount code is no longer valid."
7200
  msgstr ""
7201
 
7202
+ #: includes/functions.php:1592 includes/functions.php:1102
7203
  #: includes/functions.php:1124 includes/functions.php:1140
7204
  #: includes/functions.php:1151 includes/functions.php:1154
7205
  #: includes/functions.php:1155 includes/functions.php:1164
7214
  msgid "This discount code does not apply to this membership level."
7215
  msgstr ""
7216
 
7217
+ #: includes/functions.php:1630 includes/functions.php:1110
7218
  #: includes/functions.php:1132 includes/functions.php:1148
7219
  #: includes/functions.php:1159 includes/functions.php:1162
7220
  #: includes/functions.php:1172 includes/functions.php:1180
7230
  msgid "This discount code is okay."
7231
  msgstr ""
7232
 
7233
+ #: includes/functions.php:1658 includes/functions.php:1134
7234
  #: includes/functions.php:1156 includes/functions.php:1172
7235
  #: includes/functions.php:1183 includes/functions.php:1186
7236
  #: includes/functions.php:1196 includes/functions.php:1205
7246
  msgid "and"
7247
  msgstr ""
7248
 
7249
+ #: includes/functions.php:1977 includes/functions.php:1319
7250
  #: includes/functions.php:1341 includes/functions.php:1361
7251
  #: includes/functions.php:1372 includes/functions.php:1375
7252
  #: includes/functions.php:1385 includes/functions.php:1394
7259
  #: includes/functions.php:1697 includes/functions.php:1703
7260
  #: includes/functions.php:2015 includes/functions.php:2019
7261
  #: includes/functions.php:2022 includes/functions.php:2024
7262
+ #: includes/functions.php:2033 includes/functions.php:2034
7263
  msgid "Sign Up for !!name!! Now"
7264
  msgstr ""
7265
 
7266
+ #: includes/functions.php:1985 includes/functions.php:1325
7267
  #: includes/functions.php:1347 includes/functions.php:1367
7268
  #: includes/functions.php:1378 includes/functions.php:1381
7269
  #: includes/functions.php:1391 includes/functions.php:1400
7276
  #: includes/functions.php:1703 includes/functions.php:1709
7277
  #: includes/functions.php:2021 includes/functions.php:2025
7278
  #: includes/functions.php:2028 includes/functions.php:2030
7279
+ #: includes/functions.php:2039 includes/functions.php:2040
7280
  msgid "Please specify a level id."
7281
  msgstr ""
7282
 
7283
+ #: includes/functions.php:1991 includes/functions.php:2046
7284
+ #: includes/functions.php:2047
7285
  #, php-format
7286
  msgid "Level #%s not found."
7287
  msgstr ""
7536
  #: pages/billing.php:27 pages/billing.php:28 pages/billing.php:30
7537
  #: pages/billing.php:44 pages/billing.php:45 pages/cancel.php:52
7538
  #: pages/cancel.php:60 pages/cancel.php:61 pages/invoice.php:89
7539
+ #: pages/invoice.php:102 pages/invoice.php:109 pages/levels.php:13
7540
+ #: pages/levels.php:35 shortcodes/pmpro_account.php:43
7541
+ #: shortcodes/pmpro_account.php:44 shortcodes/pmpro_account.php:123
7542
+ #: shortcodes/pmpro_account.php:125 shortcodes/pmpro_account.php:126
7543
+ #: shortcodes/pmpro_account.php:128
7544
  msgid "Level"
7545
  msgstr ""
7546
 
7731
  msgid "We accept %s"
7732
  msgstr ""
7733
 
7734
+ #: pages/billing.php:385 pages/billing.php:309 pages/billing.php:313
7735
  #: pages/billing.php:344 pages/billing.php:353 pages/billing.php:356
7736
  #: pages/billing.php:360 pages/billing.php:364 pages/billing.php:380
7737
  #: pages/billing.php:381 pages/billing.php:387 pages/billing.php:408
7957
  #: pages/confirmation.php:45 pages/confirmation.php:46
7958
  #: pages/confirmation.php:52 pages/confirmation.php:102
7959
  #: pages/confirmation.php:104 pages/confirmation.php:112
7960
+ #: pages/confirmation.php:115 pages/confirmation.php:123 pages/invoice.php:26
7961
+ #: pages/invoice.php:27
7962
  msgid "Account"
7963
  msgstr ""
7964
 
7970
 
7971
  #: pages/confirmation.php:79 pages/invoice.php:61 pages/account.php:105
7972
  #: pages/account.php:109 pages/confirmation.php:61 pages/confirmation.php:63
7973
+ #: pages/confirmation.php:69 pages/confirmation.php:79
7974
+ #: pages/confirmation.php:82 pages/invoice.php:48 pages/invoice.php:50
7975
+ #: pages/invoice.php:61
7976
  msgid "Payment Method"
7977
  msgstr ""
7978
 
7985
 
7986
  #: pages/confirmation.php:88 pages/invoice.php:70 pages/invoice.php:103
7987
  #: pages/confirmation.php:61 pages/confirmation.php:63
7988
+ #: pages/confirmation.php:65 pages/confirmation.php:71
7989
+ #: pages/confirmation.php:88 pages/invoice.php:50 pages/invoice.php:52
7990
+ #: pages/invoice.php:70 pages/invoice.php:90 pages/invoice.php:103
7991
+ #: pages/invoice.php:107 pages/invoice.php:109 pages/invoice.php:110
7992
  msgid "Total Billed"
7993
  msgstr ""
7994
 
7995
+ #: pages/confirmation.php:94 pages/invoice.php:76 pages/confirmation.php:94
7996
+ #: pages/invoice.php:76 pages/invoice.php:80 pages/invoice.php:82
7997
  msgid "Coupon"
7998
  msgstr ""
7999
 
8000
  #: pages/confirmation.php:111 pages/confirmation.php:97
8001
  #: pages/confirmation.php:100 pages/confirmation.php:103
8002
+ #: pages/confirmation.php:111
8003
  #, php-format
8004
  msgid ""
8005
  "Below are details about your membership account. A welcome email has been "
8008
 
8009
  #: pages/confirmation.php:124 pages/confirmation.php:103
8010
  #: pages/confirmation.php:105 pages/confirmation.php:113
8011
+ #: pages/confirmation.php:116 pages/confirmation.php:124
8012
  msgid "Pending"
8013
  msgstr ""
8014
 
8015
  #: pages/confirmation.php:132 pages/invoice.php:134 pages/confirmation.php:111
8016
  #: pages/confirmation.php:113 pages/confirmation.php:121
8017
+ #: pages/confirmation.php:124 pages/confirmation.php:132 pages/invoice.php:121
8018
+ #: pages/invoice.php:134 pages/invoice.php:139 pages/invoice.php:141
8019
  msgid "View Your Membership Account &rarr;"
8020
  msgstr ""
8021
 
8022
  #: pages/confirmation.php:134 pages/confirmation.php:113
8023
  #: pages/confirmation.php:115 pages/confirmation.php:123
8024
+ #: pages/confirmation.php:126 pages/confirmation.php:134
8025
  msgid ""
8026
  "If your account is not activated within a few minutes, please contact the "
8027
  "site owner."
8028
  msgstr ""
8029
 
8030
+ #: pages/invoice.php:101 pages/invoice.php:88 pages/invoice.php:101
8031
+ #: pages/invoice.php:106 pages/invoice.php:108
8032
  msgid "Invoice #"
8033
  msgstr ""
8034
 
8035
+ #: pages/invoice.php:127 pages/invoice.php:114 pages/invoice.php:127
8036
+ #: pages/invoice.php:132 pages/invoice.php:134
8037
  msgid "No invoices found."
8038
  msgstr ""
8039
 
8040
+ #: pages/invoice.php:138 pages/invoice.php:125 pages/invoice.php:138
8041
+ #: pages/invoice.php:143 pages/invoice.php:145
8042
  msgid "&larr; View All Invoices"
8043
  msgstr ""
8044
 
8112
  msgid "Your membership status has been updated - Thank you!"
8113
  msgstr ""
8114
 
8115
+ #: preheaders/account.php:12 preheaders/levels.php:24 preheaders/account.php:11
8116
+ #: preheaders/account.php:12 preheaders/levels.php:23 preheaders/levels.php:24
 
8117
  msgid ""
8118
  "Sorry, your request could not be completed - please try again in a few "
8119
  "moments."
8120
  msgstr ""
8121
 
8122
  #: preheaders/billing.php:147 preheaders/checkout.php:322
8123
+ #: preheaders/billing.php:145 preheaders/billing.php:147
8124
+ #: preheaders/billing.php:258 preheaders/billing.php:265
8125
+ #: preheaders/billing.php:266 preheaders/billing.php:270
8126
+ #: preheaders/billing.php:273 preheaders/billing.php:279
8127
+ #: preheaders/checkout.php:322 preheaders/checkout.php:332
8128
+ #: preheaders/checkout.php:336 preheaders/checkout.php:364
8129
+ #: preheaders/checkout.php:458 preheaders/checkout.php:464
8130
+ #: preheaders/checkout.php:465 preheaders/checkout.php:470
8131
+ #: preheaders/checkout.php:481 preheaders/checkout.php:482
8132
  msgid "Please complete all required fields."
8133
  msgstr ""
8134
 
8135
  #: preheaders/billing.php:150 preheaders/checkout.php:330
8136
+ #: preheaders/billing.php:148 preheaders/billing.php:150
8137
+ #: preheaders/billing.php:263 preheaders/billing.php:268
8138
+ #: preheaders/billing.php:269 preheaders/billing.php:273
8139
+ #: preheaders/billing.php:276 preheaders/billing.php:284
8140
+ #: preheaders/checkout.php:330 preheaders/checkout.php:340
8141
+ #: preheaders/checkout.php:344 preheaders/checkout.php:372
8142
+ #: preheaders/checkout.php:466 preheaders/checkout.php:473
8143
+ #: preheaders/checkout.php:474 preheaders/checkout.php:478
8144
+ #: preheaders/checkout.php:491 preheaders/checkout.php:492
8145
  msgid "Your email addresses do not match. Please try again."
8146
  msgstr ""
8147
 
8148
  #: preheaders/billing.php:153 preheaders/checkout.php:335
8149
+ #: preheaders/billing.php:151 preheaders/billing.php:153
8150
+ #: preheaders/billing.php:268 preheaders/billing.php:271
8151
+ #: preheaders/billing.php:272 preheaders/billing.php:276
8152
+ #: preheaders/billing.php:279 preheaders/billing.php:289
8153
+ #: preheaders/checkout.php:335 preheaders/checkout.php:345
8154
+ #: preheaders/checkout.php:349 preheaders/checkout.php:377
8155
+ #: preheaders/checkout.php:471 preheaders/checkout.php:478
8156
+ #: preheaders/checkout.php:480 preheaders/checkout.php:483
8157
+ #: preheaders/checkout.php:497 preheaders/checkout.php:498
8158
  msgid "The email address entered is in an invalid format. Please try again."
8159
  msgstr ""
8160
 
8161
  #: preheaders/billing.php:157 preheaders/billing.php:155
8162
+ #: preheaders/billing.php:157 preheaders/billing.php:274
8163
+ #: preheaders/billing.php:275 preheaders/billing.php:276
8164
+ #: preheaders/billing.php:280 preheaders/billing.php:283
8165
+ #: preheaders/billing.php:295
8166
  msgid "All good!"
8167
  msgstr ""
8168
 
8169
  #: preheaders/billing.php:224 preheaders/billing.php:222
8170
+ #: preheaders/billing.php:224 preheaders/billing.php:340
8171
+ #: preheaders/billing.php:345 preheaders/billing.php:346
8172
+ #: preheaders/billing.php:350 preheaders/billing.php:353
8173
+ #: preheaders/billing.php:370
8174
  #, php-format
8175
  msgid "Information updated. <a href=\"%s\">&laquo; back to my account</a>"
8176
  msgstr ""
8177
 
8178
  #: preheaders/billing.php:230 preheaders/billing.php:228
8179
+ #: preheaders/billing.php:230 preheaders/billing.php:347
8180
+ #: preheaders/billing.php:351 preheaders/billing.php:352
8181
+ #: preheaders/billing.php:356 preheaders/billing.php:359
8182
+ #: preheaders/billing.php:378 preheaders/billing.php:380
8183
  msgid "Error updating billing information."
8184
  msgstr ""
8185
 
8469
  msgid "Amount"
8470
  msgstr ""
8471
 
8472
+ #: shortcodes/pmpro_account.php:157 pages/account.php:121 pages/account.php:140
8473
+ #: pages/account.php:144 shortcodes/pmpro_account.php:152
8474
+ #: shortcodes/pmpro_account.php:154 shortcodes/pmpro_account.php:155
8475
+ #: shortcodes/pmpro_account.php:157
8476
  msgid "View All Invoices"
8477
  msgstr ""
8478
 
8479
+ #: shortcodes/pmpro_account.php:164 pages/account.php:128 pages/account.php:146
8480
+ #: pages/account.php:150 shortcodes/pmpro_account.php:159
8481
+ #: shortcodes/pmpro_account.php:161 shortcodes/pmpro_account.php:162
8482
+ #: shortcodes/pmpro_account.php:164
8483
  msgid "Member Links"
8484
  msgstr ""
8485
 
8501
  msgid "User Forum"
8502
  msgstr ""
8503
 
8504
+ #: adminpages/advancedsettings.php:209 adminpages/advancedsettings.php:216
8505
+ #: adminpages/advancedsettings.php:229 adminpages/advancedsettings.php:232
8506
+ #: adminpages/advancedsettings.php:248
8507
+ msgid "reCAPTCHA Public Key"
8508
+ msgstr ""
8509
+
8510
+ #: adminpages/advancedsettings.php:212 adminpages/advancedsettings.php:219
8511
+ #: adminpages/advancedsettings.php:232 adminpages/advancedsettings.php:235
8512
+ #: adminpages/advancedsettings.php:251
8513
+ msgid "reCAPTCHA Private Key"
8514
+ msgstr ""
8515
+
8516
  #: adminpages/advancedsettings.php:272 adminpages/advancedsettings.php:285
8517
  msgid "selected"
8518
  msgstr ""
8742
  msgid "South African Rand"
8743
  msgstr ""
8744
 
8745
+ #: includes/filters.php:218
8746
+ #, php-format
8747
+ msgid ""
8748
+ "User: %s<br />Email: %s<br />Membership Level: %s<br />Order #: %s<br /"
8749
+ ">Original Profile Start Date: %s<br />Adjusted Profile Start Date: %s<br /"
8750
+ ">Trial Period: %s<br />Trial Frequency: %s<br />"
8751
+ msgstr ""
8752
+
8753
+ #: includes/functions.php:169 includes/functions.php:205
8754
+ #: includes/functions.php:211 includes/functions.php:213
8755
+ #: includes/functions.php:214 includes/functions.php:215
8756
+ #: includes/functions.php:218 includes/functions.php:254
8757
+ #: includes/functions.php:320 includes/functions.php:326
8758
+ #: includes/functions.php:331 includes/functions.php:340
8759
+ #, php-format
8760
+ msgid " and then <strong>%s per %s for %d more %s</strong>."
8761
+ msgstr ""
8762
+
8763
  #: includes/functions.php:173 includes/functions.php:209
8764
  #: includes/functions.php:215 includes/functions.php:217
8765
  #: includes/functions.php:218 includes/functions.php:219
8768
  msgid " and then <strong>%s every %d %s for %d more %s</strong>."
8769
  msgstr ""
8770
 
8771
+ #: includes/functions.php:178 includes/functions.php:214
8772
+ #: includes/functions.php:220 includes/functions.php:222
8773
+ #: includes/functions.php:223 includes/functions.php:224
8774
+ #: includes/functions.php:227 includes/functions.php:263
8775
+ #: includes/functions.php:329 includes/functions.php:335
8776
+ #: includes/functions.php:340 includes/functions.php:349
8777
+ #, php-format
8778
+ msgid " and then <strong>%s after %d %s</strong>."
8779
+ msgstr ""
8780
+
8781
+ #: includes/functions.php:184 includes/functions.php:220
8782
+ #: includes/functions.php:228 includes/functions.php:238
8783
+ #: includes/functions.php:239 includes/functions.php:240
8784
+ #: includes/functions.php:242 includes/functions.php:245
8785
+ #: includes/functions.php:249 includes/functions.php:285
8786
+ #: includes/functions.php:351 includes/functions.php:357
8787
+ #: includes/functions.php:362 includes/functions.php:371
8788
+ #, php-format
8789
+ msgid " and then <strong>%s per %s</strong>."
8790
+ msgstr ""
8791
+
8792
+ #: includes/functions.php:188 includes/functions.php:224
8793
+ #: includes/functions.php:232 includes/functions.php:242
8794
+ #: includes/functions.php:243 includes/functions.php:244
8795
+ #: includes/functions.php:246 includes/functions.php:249
8796
+ #: includes/functions.php:253 includes/functions.php:289
8797
+ #: includes/functions.php:355 includes/functions.php:361
8798
+ #: includes/functions.php:366 includes/functions.php:375
8799
+ #, php-format
8800
+ msgid " and then <strong>%s every %d %s</strong>."
8801
+ msgstr ""
8802
+
8803
+ #: includes/functions.php:217 includes/functions.php:253
8804
+ #: includes/functions.php:264 includes/functions.php:275
8805
+ #: includes/functions.php:276 includes/functions.php:277
8806
+ #: includes/functions.php:279 includes/functions.php:282
8807
+ #: includes/functions.php:286 includes/functions.php:322
8808
+ #: includes/functions.php:388 includes/functions.php:394
8809
+ #: includes/functions.php:399 includes/functions.php:408 pages/levels.php:97
8810
+ #, php-format
8811
+ msgid "After your initial payment, your first %d payments will cost %s."
8812
+ msgstr ""
8813
+
8814
+ #: includes/functions.php:228 includes/functions.php:264
8815
+ #: includes/functions.php:275 includes/functions.php:286
8816
+ #: includes/functions.php:287 includes/functions.php:288
8817
+ #: includes/functions.php:290 includes/functions.php:293
8818
+ #: includes/functions.php:297 includes/functions.php:333
8819
+ #: includes/functions.php:399 includes/functions.php:405
8820
+ #: includes/functions.php:410 includes/functions.php:419
8821
+ #: includes/functions.php:523 includes/functions.php:532
8822
+ #, php-format
8823
+ msgid "Customers in %s will be charged %s%% tax."
8824
+ msgstr ""
8825
+
8826
+ #: includes/functions.php:228 includes/functions.php:229
8827
+ #: includes/functions.php:230 includes/functions.php:231
8828
+ #: includes/functions.php:235 includes/functions.php:271
8829
+ #: includes/functions.php:337 includes/functions.php:343
8830
+ #: includes/functions.php:348 includes/functions.php:357
8831
+ #, php-format
8832
+ msgid "The price for membership is <strong>%s per %s</strong>."
8833
+ msgstr ""
8834
+
8835
+ #: includes/functions.php:230 includes/functions.php:233
8836
+ #: includes/functions.php:237 includes/functions.php:273
8837
+ #: includes/functions.php:339 includes/functions.php:345
8838
+ #: includes/functions.php:350 includes/functions.php:359
8839
+ #, php-format
8840
+ msgid "<strong>%s per %s</strong>."
8841
+ msgstr ""
8842
+
8843
+ #: includes/functions.php:233 includes/functions.php:234
8844
+ #: includes/functions.php:235 includes/functions.php:238
8845
+ #: includes/functions.php:242 includes/functions.php:278
8846
+ #: includes/functions.php:344 includes/functions.php:350
8847
+ #: includes/functions.php:355 includes/functions.php:364
8848
+ #, php-format
8849
+ msgid "The price for membership is <strong>%s every %d %s</strong>."
8850
+ msgstr ""
8851
+
8852
+ #: includes/functions.php:237 includes/functions.php:240
8853
+ #: includes/functions.php:244 includes/functions.php:280
8854
+ #: includes/functions.php:346 includes/functions.php:352
8855
+ #: includes/functions.php:357 includes/functions.php:366
8856
+ #, php-format
8857
+ msgid "<strong>%s every %d %s</strong>."
8858
+ msgstr ""
8859
+
8860
+ #: includes/functions.php:242 includes/functions.php:278
8861
+ #: includes/functions.php:289 includes/functions.php:300
8862
+ #: includes/functions.php:301 includes/functions.php:302
8863
+ #: includes/functions.php:304 includes/functions.php:307
8864
+ #: includes/functions.php:311 includes/functions.php:347
8865
+ #: includes/functions.php:413 includes/functions.php:419
8866
+ #: includes/functions.php:540 includes/functions.php:549
8867
+ #, php-format
8868
+ msgid "Membership expires after %d %s."
8869
+ msgstr ""
8870
+
8871
+ #: includes/functions.php:258 includes/functions.php:324
8872
+ #: includes/functions.php:330 includes/functions.php:335
8873
+ #: includes/functions.php:344
8874
+ #, php-format
8875
+ msgid " and then <strong>%s every %d %s for %d more payments</strong>."
8876
+ msgstr ""
8877
+
8878
+ #: includes/functions.php:469 includes/functions.php:478
8879
+ #, php-format
8880
+ msgid "<strong>%s per %s for %d more %s</strong>"
8881
+ msgstr ""
8882
+
8883
+ #: includes/functions.php:473 includes/functions.php:482
8884
+ #, php-format
8885
+ msgid "<strong>%s every %d %s for %d more payments</strong>"
8886
+ msgstr ""
8887
+
8888
+ #: includes/functions.php:478 includes/functions.php:487
8889
+ #, php-format
8890
+ msgid "<strong>%s after %d %s</strong>"
8891
+ msgstr ""
8892
+
8893
+ #: includes/functions.php:484 includes/functions.php:493
8894
+ #, php-format
8895
+ msgid "<strong>%s every %s</strong>"
8896
+ msgstr ""
8897
+
8898
+ #: includes/functions.php:488 includes/functions.php:497
8899
+ #, php-format
8900
+ msgid "<strong>%s every %d %s</strong>"
8901
+ msgstr ""
8902
+
8903
+ #: includes/functions.php:556 includes/functions.php:557
8904
+ #: includes/functions.php:566
8905
+ #, php-format
8906
+ msgid "%s membership expires after %d %s"
8907
+ msgstr ""
8908
+
8909
  #: includes/license.php:89 includes/license.php:92
8910
  msgid ""
8911
  "Enter your support license key.</strong> Your license key can be found in "
languages/paid-memberships-pro.pot CHANGED
@@ -6,7 +6,7 @@ msgid ""
6
  msgstr ""
7
  "Project-Id-Version: paid-memberships-pro\n"
8
  "Report-Msgid-Bugs-To: jason@strangerstudios.com\n"
9
- "POT-Creation-Date: 2017-12-07 19:45-0500\n"
10
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
11
  "Last-Translator: \n"
12
  "Language-Team: Stranger Studios <jason@strangerstudios.com>\n"
@@ -539,7 +539,7 @@ msgstr ""
539
  #: adminpages/advancedsettings.php:167 adminpages/advancedsettings.php:226
540
  #: adminpages/advancedsettings.php:238 adminpages/membershiplevels.php:694
541
  #: adminpages/paymentsettings.php:236
542
- #: classes/gateways/class.pmprogateway_stripe.php:297 includes/profile.php:125
543
  #: adminpages/advancedsettings.php:128 adminpages/advancedsettings.php:135
544
  #: adminpages/advancedsettings.php:148 adminpages/advancedsettings.php:151
545
  #: adminpages/advancedsettings.php:167 adminpages/advancedsettings.php:187
@@ -568,7 +568,8 @@ msgstr ""
568
  #: classes/gateways/class.pmprogateway_stripe.php:220
569
  #: classes/gateways/class.pmprogateway_stripe.php:222
570
  #: classes/gateways/class.pmprogateway_stripe.php:249
571
- #: classes/gateways/class.pmprogateway_stripe.php:281 includes/profile.php:101
 
572
  #: includes/profile.php:105 includes/profile.php:110 includes/profile.php:117
573
  #: includes/profile.php:121 includes/profile.php:123 includes/profile.php:125
574
  msgid "No"
@@ -618,7 +619,7 @@ msgstr ""
618
 
619
  #: adminpages/advancedsettings.php:227 adminpages/membershiplevels.php:694
620
  #: adminpages/paymentsettings.php:237
621
- #: classes/gateways/class.pmprogateway_stripe.php:298 includes/profile.php:126
622
  #: adminpages/advancedsettings.php:188 adminpages/advancedsettings.php:195
623
  #: adminpages/advancedsettings.php:208 adminpages/advancedsettings.php:211
624
  #: adminpages/advancedsettings.php:227 adminpages/membershiplevels.php:563
@@ -643,7 +644,8 @@ msgstr ""
643
  #: classes/gateways/class.pmprogateway_stripe.php:221
644
  #: classes/gateways/class.pmprogateway_stripe.php:223
645
  #: classes/gateways/class.pmprogateway_stripe.php:250
646
- #: classes/gateways/class.pmprogateway_stripe.php:282 includes/profile.php:102
 
647
  #: includes/profile.php:106 includes/profile.php:111 includes/profile.php:118
648
  #: includes/profile.php:122 includes/profile.php:124 includes/profile.php:126
649
  msgid "Yes"
@@ -679,16 +681,12 @@ msgstr ""
679
  msgid "Click here to signup for reCAPTCHA"
680
  msgstr ""
681
 
682
- #: adminpages/advancedsettings.php:248 adminpages/advancedsettings.php:209
683
- #: adminpages/advancedsettings.php:216 adminpages/advancedsettings.php:229
684
- #: adminpages/advancedsettings.php:232 adminpages/advancedsettings.php:248
685
- msgid "reCAPTCHA Public Key"
686
  msgstr ""
687
 
688
- #: adminpages/advancedsettings.php:251 adminpages/advancedsettings.php:212
689
- #: adminpages/advancedsettings.php:219 adminpages/advancedsettings.php:232
690
- #: adminpages/advancedsettings.php:235 adminpages/advancedsettings.php:251
691
- msgid "reCAPTCHA Private Key"
692
  msgstr ""
693
 
694
  #: adminpages/advancedsettings.php:257 adminpages/advancedsettings.php:218
@@ -883,7 +881,7 @@ msgstr ""
883
 
884
  #: adminpages/discountcodes.php:483
885
  #: classes/gateways/class.pmprogateway_braintree.php:459
886
- #: classes/gateways/class.pmprogateway_stripe.php:629 pages/billing.php:317
887
  #: pages/checkout.php:463 adminpages/discountcodes.php:367
888
  #: adminpages/discountcodes.php:370 adminpages/discountcodes.php:371
889
  #: adminpages/discountcodes.php:372 adminpages/discountcodes.php:377
@@ -909,7 +907,8 @@ msgstr ""
909
  #: classes/gateways/class.pmprogateway_stripe.php:532
910
  #: classes/gateways/class.pmprogateway_stripe.php:570
911
  #: classes/gateways/class.pmprogateway_stripe.php:597
912
- #: classes/gateways/class.pmprogateway_stripe.php:613 pages/billing.php:249
 
913
  #: pages/billing.php:253 pages/billing.php:262 pages/billing.php:265
914
  #: pages/billing.php:268 pages/billing.php:310 pages/billing.php:316
915
  #: pages/billing.php:317 pages/billing.php:319 pages/billing.php:342
@@ -1008,7 +1007,7 @@ msgstr ""
1008
 
1009
  #: adminpages/discountcodes.php:587 adminpages/discountcodes.php:641
1010
  #: adminpages/membershiplevels.php:410 adminpages/membershiplevels.php:511
1011
- #: classes/gateways/class.pmprogateway_stripe.php:687
1012
  #: adminpages/discountcodes.php:446 adminpages/discountcodes.php:466
1013
  #: adminpages/discountcodes.php:467 adminpages/discountcodes.php:468
1014
  #: adminpages/discountcodes.php:473 adminpages/discountcodes.php:492
@@ -1036,12 +1035,13 @@ msgstr ""
1036
  #: classes/gateways/class.pmprogateway_stripe.php:637
1037
  #: classes/gateways/class.pmprogateway_stripe.php:664
1038
  #: classes/gateways/class.pmprogateway_stripe.php:671
 
1039
  msgid "Day(s)"
1040
  msgstr ""
1041
 
1042
  #: adminpages/discountcodes.php:587 adminpages/discountcodes.php:641
1043
  #: adminpages/membershiplevels.php:410 adminpages/membershiplevels.php:511
1044
- #: classes/gateways/class.pmprogateway_stripe.php:687
1045
  #: adminpages/discountcodes.php:446 adminpages/discountcodes.php:466
1046
  #: adminpages/discountcodes.php:467 adminpages/discountcodes.php:468
1047
  #: adminpages/discountcodes.php:473 adminpages/discountcodes.php:492
@@ -1069,12 +1069,13 @@ msgstr ""
1069
  #: classes/gateways/class.pmprogateway_stripe.php:637
1070
  #: classes/gateways/class.pmprogateway_stripe.php:664
1071
  #: classes/gateways/class.pmprogateway_stripe.php:671
 
1072
  msgid "Month(s)"
1073
  msgstr ""
1074
 
1075
  #: adminpages/discountcodes.php:587 adminpages/discountcodes.php:641
1076
  #: adminpages/membershiplevels.php:410 adminpages/membershiplevels.php:511
1077
- #: classes/gateways/class.pmprogateway_stripe.php:687
1078
  #: adminpages/discountcodes.php:446 adminpages/discountcodes.php:466
1079
  #: adminpages/discountcodes.php:467 adminpages/discountcodes.php:468
1080
  #: adminpages/discountcodes.php:473 adminpages/discountcodes.php:492
@@ -1102,12 +1103,13 @@ msgstr ""
1102
  #: classes/gateways/class.pmprogateway_stripe.php:637
1103
  #: classes/gateways/class.pmprogateway_stripe.php:664
1104
  #: classes/gateways/class.pmprogateway_stripe.php:671
 
1105
  msgid "Week(s)"
1106
  msgstr ""
1107
 
1108
  #: adminpages/discountcodes.php:587 adminpages/discountcodes.php:641
1109
  #: adminpages/membershiplevels.php:410 adminpages/membershiplevels.php:511
1110
- #: classes/gateways/class.pmprogateway_stripe.php:687
1111
  #: adminpages/discountcodes.php:446 adminpages/discountcodes.php:466
1112
  #: adminpages/discountcodes.php:467 adminpages/discountcodes.php:468
1113
  #: adminpages/discountcodes.php:473 adminpages/discountcodes.php:492
@@ -1135,6 +1137,7 @@ msgstr ""
1135
  #: classes/gateways/class.pmprogateway_stripe.php:637
1136
  #: classes/gateways/class.pmprogateway_stripe.php:664
1137
  #: classes/gateways/class.pmprogateway_stripe.php:671
 
1138
  msgid "Year(s)"
1139
  msgstr ""
1140
 
@@ -1337,11 +1340,11 @@ msgstr ""
1337
  #: adminpages/discountcodes.php:668 adminpages/discountcodes.php:722
1338
  #: adminpages/memberslist.php:121 adminpages/memberslist.php:159
1339
  #: adminpages/memberslist.php:169 adminpages/memberslist.php:179
1340
- #: adminpages/reports/login.php:145 adminpages/reports/login.php:147
1341
- #: adminpages/reports/login.php:163 adminpages/reports/login.php:167
1342
- #: includes/profile.php:98 includes/profile.php:102 includes/profile.php:107
1343
- #: includes/profile.php:114 includes/profile.php:118 includes/profile.php:120
1344
- #: includes/profile.php:122
1345
  msgid "Expires"
1346
  msgstr ""
1347
 
@@ -1654,7 +1657,7 @@ msgid "Billing Details"
1654
  msgstr ""
1655
 
1656
  #: adminpages/membershiplevels.php:406
1657
- #: classes/gateways/class.pmprogateway_stripe.php:785
1658
  #: adminpages/membershiplevels.php:349 adminpages/membershiplevels.php:351
1659
  #: adminpages/membershiplevels.php:370 adminpages/membershiplevels.php:372
1660
  #: adminpages/membershiplevels.php:373 adminpages/membershiplevels.php:396
@@ -1672,6 +1675,7 @@ msgstr ""
1672
  #: classes/gateways/class.pmprogateway_stripe.php:735
1673
  #: classes/gateways/class.pmprogateway_stripe.php:762
1674
  #: classes/gateways/class.pmprogateway_stripe.php:769
 
1675
  msgid "per"
1676
  msgstr ""
1677
 
@@ -1997,7 +2001,7 @@ msgstr ""
1997
 
1998
  #: adminpages/memberslist.php:32 adminpages/reports/login.php:89
1999
  #: adminpages/reports/memberships.php:355 adminpages/reports/sales.php:226
2000
- #: classes/class.pmproemail.php:147 classes/class.pmproemail.php:192
2001
  #: adminpages/memberslist.php:32 adminpages/reports/login.php:67
2002
  #: adminpages/reports/login.php:69 adminpages/reports/login.php:85
2003
  #: adminpages/reports/login.php:89 adminpages/reports/memberships.php:281
@@ -2077,8 +2081,8 @@ msgstr ""
2077
  #: pages/checkout.php:311 pages/checkout.php:314 pages/checkout.php:317
2078
  #: pages/checkout.php:319 pages/checkout.php:321 pages/checkout.php:326
2079
  #: pages/checkout.php:329 pages/confirmation.php:59 pages/confirmation.php:61
2080
- #: pages/confirmation.php:67 pages/confirmation.php:69 pages/invoice.php:46
2081
- #: pages/invoice.php:48
2082
  msgid "Billing Address"
2083
  msgstr ""
2084
 
@@ -2113,29 +2117,29 @@ msgstr ""
2113
  msgid "Ended"
2114
  msgstr ""
2115
 
2116
- #: adminpages/memberslist.php:179
2117
  msgid "Cancelled"
2118
  msgstr ""
2119
 
2120
- #: adminpages/memberslist.php:181
2121
  msgid "Expired"
2122
  msgstr ""
2123
 
2124
  #: adminpages/memberslist.php:266 adminpages/reports/login.php:232
2125
  #: adminpages/memberslist.php:195 adminpages/memberslist.php:223
2126
  #: adminpages/memberslist.php:251 adminpages/memberslist.php:261
2127
- #: adminpages/memberslist.php:262 adminpages/reports/login.php:210
2128
- #: adminpages/reports/login.php:212 adminpages/reports/login.php:228
2129
- #: adminpages/reports/login.php:232
2130
  msgid "No members found."
2131
  msgstr ""
2132
 
2133
  #: adminpages/memberslist.php:266 adminpages/reports/login.php:232
2134
  #: adminpages/memberslist.php:195 adminpages/memberslist.php:223
2135
  #: adminpages/memberslist.php:251 adminpages/memberslist.php:261
2136
- #: adminpages/memberslist.php:262 adminpages/reports/login.php:210
2137
- #: adminpages/reports/login.php:212 adminpages/reports/login.php:228
2138
- #: adminpages/reports/login.php:232
2139
  msgid "Search all levels"
2140
  msgstr ""
2141
 
@@ -2180,7 +2184,7 @@ msgstr ""
2180
  msgid "Error saving order."
2181
  msgstr ""
2182
 
2183
- #: adminpages/orders.php:362 classes/class.memberorder.php:746
2184
  #: adminpages/orders.php:195 adminpages/orders.php:245
2185
  #: adminpages/orders.php:317 adminpages/orders.php:321
2186
  #: adminpages/orders.php:346 adminpages/orders.php:352
@@ -2278,8 +2282,8 @@ msgstr ""
2278
  #: adminpages/orders.php:426 adminpages/orders.php:455
2279
  #: adminpages/orders.php:481 adminpages/orders.php:512
2280
  #: adminpages/orders.php:523 adminpages/templates/orders-email.php:60
2281
- #: adminpages/templates/orders-print.php:89 pages/invoice.php:78
2282
- #: pages/invoice.php:80
2283
  msgid "Tax"
2284
  msgstr ""
2285
 
@@ -2301,8 +2305,8 @@ msgstr ""
2301
  #: adminpages/orders.php:942 adminpages/orders.php:971
2302
  #: adminpages/orders.php:1108 adminpages/orders.php:1139
2303
  #: adminpages/orders.php:1145 adminpages/templates/orders-email.php:64
2304
- #: adminpages/templates/orders-print.php:93 pages/invoice.php:82
2305
- #: pages/invoice.php:84
2306
  msgid "Total"
2307
  msgstr ""
2308
 
@@ -2329,7 +2333,7 @@ msgstr ""
2329
 
2330
  #: adminpages/orders.php:574
2331
  #: classes/gateways/class.pmprogateway_braintree.php:446
2332
- #: classes/gateways/class.pmprogateway_stripe.php:589 pages/billing.php:275
2333
  #: pages/checkout.php:423 adminpages/orders.php:339 adminpages/orders.php:389
2334
  #: adminpages/orders.php:461 adminpages/orders.php:490
2335
  #: adminpages/orders.php:532 adminpages/orders.php:563
@@ -2356,7 +2360,8 @@ msgstr ""
2356
  #: classes/gateways/class.pmprogateway_stripe.php:484
2357
  #: classes/gateways/class.pmprogateway_stripe.php:522
2358
  #: classes/gateways/class.pmprogateway_stripe.php:549
2359
- #: classes/gateways/class.pmprogateway_stripe.php:573 pages/billing.php:234
 
2360
  #: pages/billing.php:238 pages/billing.php:247 pages/billing.php:250
2361
  #: pages/billing.php:253 pages/billing.php:262 pages/billing.php:268
2362
  #: pages/billing.php:271 pages/billing.php:274 pages/billing.php:275
@@ -2421,7 +2426,7 @@ msgid "Status"
2421
  msgstr ""
2422
 
2423
  #: adminpages/orders.php:654 adminpages/orders.php:1147
2424
- #: classes/class.memberorder.php:747 adminpages/orders.php:394
2425
  #: adminpages/orders.php:444 adminpages/orders.php:516
2426
  #: adminpages/orders.php:545 adminpages/orders.php:604
2427
  #: adminpages/orders.php:612 adminpages/orders.php:643
@@ -2482,7 +2487,7 @@ msgstr ""
2482
  msgid "Generated by the gateway. Useful to cross reference orders."
2483
  msgstr ""
2484
 
2485
- #: adminpages/orders.php:706 classes/class.memberorder.php:748
2486
  #: adminpages/orders.php:432 adminpages/orders.php:482
2487
  #: adminpages/orders.php:483 adminpages/orders.php:555
2488
  #: adminpages/orders.php:584 adminpages/orders.php:664
@@ -2509,7 +2514,7 @@ msgstr ""
2509
  #: adminpages/orders.php:947 adminpages/orders.php:976
2510
  #: adminpages/orders.php:1113 adminpages/orders.php:1144
2511
  #: adminpages/orders.php:1150 pages/account.php:91 pages/invoice.php:87
2512
- #: pages/invoice.php:105 pages/invoice.php:107
2513
  #: shortcodes/pmpro_account.php:122 shortcodes/pmpro_account.php:124
2514
  #: shortcodes/pmpro_account.php:125 shortcodes/pmpro_account.php:127
2515
  msgid "Date"
@@ -2686,9 +2691,9 @@ msgstr ""
2686
  #: pages/confirmation.php:62 pages/confirmation.php:64
2687
  #: pages/confirmation.php:70 pages/confirmation.php:91
2688
  #: pages/confirmation.php:103 pages/confirmation.php:105
2689
- #: pages/confirmation.php:113 pages/confirmation.php:116 pages/invoice.php:27
2690
- #: pages/invoice.php:28 pages/invoice.php:49 pages/invoice.php:51
2691
- #: pages/invoice.php:70
2692
  msgid "Membership Level"
2693
  msgstr ""
2694
 
@@ -3291,10 +3296,8 @@ msgstr ""
3291
  msgid "Total Logins"
3292
  msgstr ""
3293
 
3294
- #: adminpages/reports/memberships.php:18
3295
- #: adminpages/reports/memberships.php:324
3296
- #: adminpages/reports/memberships.php:18
3297
- #: adminpages/reports/memberships.php:252
3298
  #: adminpages/reports/memberships.php:259
3299
  #: adminpages/reports/memberships.php:272
3300
  #: adminpages/reports/memberships.php:288
@@ -3486,8 +3489,8 @@ msgstr ""
3486
  #: adminpages/templates/orders-email.php:56
3487
  #: adminpages/templates/orders-print.php:85 pages/confirmation.php:91
3488
  #: pages/invoice.php:73 adminpages/templates/orders-email.php:56
3489
- #: adminpages/templates/orders-print.php:85 pages/invoice.php:77
3490
- #: pages/invoice.php:79
3491
  msgid "Subtotal"
3492
  msgstr ""
3493
 
@@ -3515,7 +3518,7 @@ msgid ""
3515
  "site's plugin page."
3516
  msgstr ""
3517
 
3518
- #: classes/class.memberorder.php:743 classes/class.memberorder.php:553
3519
  #: classes/class.memberorder.php:561 classes/class.memberorder.php:564
3520
  #: classes/class.memberorder.php:573 classes/class.memberorder.php:644
3521
  #: classes/class.memberorder.php:697 classes/class.memberorder.php:699
@@ -3530,11 +3533,11 @@ msgid ""
3530
  "active."
3531
  msgstr ""
3532
 
3533
- #: classes/class.memberorder.php:744 classes/class.memberorder.php:744
3534
  msgid "User Email"
3535
  msgstr ""
3536
 
3537
- #: classes/class.memberorder.php:745 classes/class.memberorder.php:745
3538
  msgid "User Display Name"
3539
  msgstr ""
3540
 
@@ -3543,14 +3546,14 @@ msgstr ""
3543
  msgid "An Email From %s"
3544
  msgstr ""
3545
 
3546
- #: classes/class.pmproemail.php:136 classes/class.pmproemail.php:120
3547
  #: classes/class.pmproemail.php:122 classes/class.pmproemail.php:125
3548
  #: classes/class.pmproemail.php:134 classes/class.pmproemail.php:136
3549
  #, php-format
3550
  msgid "Your membership at %s has been CANCELLED"
3551
  msgstr ""
3552
 
3553
- #: classes/class.pmproemail.php:169 classes/class.pmproemail.php:142
3554
  #: classes/class.pmproemail.php:144 classes/class.pmproemail.php:147
3555
  #: classes/class.pmproemail.php:156 classes/class.pmproemail.php:166
3556
  #: classes/class.pmproemail.php:169
@@ -3558,7 +3561,7 @@ msgstr ""
3558
  msgid "Membership for %s at %s has been CANCELLED"
3559
  msgstr ""
3560
 
3561
- #: classes/class.pmproemail.php:212 classes/class.pmproemail.php:172
3562
  #: classes/class.pmproemail.php:173 classes/class.pmproemail.php:175
3563
  #: classes/class.pmproemail.php:178 classes/class.pmproemail.php:187
3564
  #: classes/class.pmproemail.php:207 classes/class.pmproemail.php:212
@@ -3566,12 +3569,12 @@ msgstr ""
3566
  msgid "Your membership confirmation for %s"
3567
  msgstr ""
3568
 
3569
- #: classes/class.pmproemail.php:269 classes/class.pmproemail.php:278
3570
- #: classes/class.pmproemail.php:287 classes/class.pmproemail.php:369
3571
- #: classes/class.pmproemail.php:378 classes/class.pmproemail.php:696
3572
- #: classes/class.pmproemail.php:698
3573
  #: classes/gateways/class.pmprogateway_braintree.php:489
3574
- #: classes/gateways/class.pmprogateway_stripe.php:660 pages/checkout.php:70
3575
  #: pages/checkout.php:76 pages/checkout.php:498 pages/confirmation.php:58
3576
  #: pages/invoice.php:33 classes/class.pmproemail.php:216
3577
  #: classes/class.pmproemail.php:218 classes/class.pmproemail.php:225
@@ -3615,7 +3618,8 @@ msgstr ""
3615
  #: classes/gateways/class.pmprogateway_stripe.php:573
3616
  #: classes/gateways/class.pmprogateway_stripe.php:611
3617
  #: classes/gateways/class.pmprogateway_stripe.php:638
3618
- #: classes/gateways/class.pmprogateway_stripe.php:644 pages/checkout.php:66
 
3619
  #: pages/checkout.php:67 pages/checkout.php:68 pages/checkout.php:70
3620
  #: pages/checkout.php:75 pages/checkout.php:76 pages/checkout.php:77
3621
  #: pages/checkout.php:78 pages/checkout.php:83 pages/checkout.php:85
@@ -3629,8 +3633,8 @@ msgstr ""
3629
  msgid "Discount Code"
3630
  msgstr ""
3631
 
3632
- #: classes/class.pmproemail.php:294 classes/class.pmproemail.php:390
3633
- #: classes/class.pmproemail.php:705 classes/class.pmproemail.php:241
3634
  #: classes/class.pmproemail.php:243 classes/class.pmproemail.php:253
3635
  #: classes/class.pmproemail.php:256 classes/class.pmproemail.php:265
3636
  #: classes/class.pmproemail.php:285 classes/class.pmproemail.php:294
@@ -3646,7 +3650,7 @@ msgstr ""
3646
  msgid "This membership will expire on %s."
3647
  msgstr ""
3648
 
3649
- #: classes/class.pmproemail.php:316 classes/class.pmproemail.php:263
3650
  #: classes/class.pmproemail.php:265 classes/class.pmproemail.php:275
3651
  #: classes/class.pmproemail.php:278 classes/class.pmproemail.php:287
3652
  #: classes/class.pmproemail.php:307 classes/class.pmproemail.php:316
@@ -3654,19 +3658,19 @@ msgstr ""
3654
  msgid "Member Checkout for %s at %s"
3655
  msgstr ""
3656
 
3657
- #: classes/class.pmproemail.php:407 classes/class.pmproemail.php:375
3658
  #: classes/class.pmproemail.php:395 classes/class.pmproemail.php:407
3659
  #, php-format
3660
  msgid "Your billing information has been updated at %s"
3661
  msgstr ""
3662
 
3663
- #: classes/class.pmproemail.php:461 classes/class.pmproemail.php:428
3664
  #: classes/class.pmproemail.php:448 classes/class.pmproemail.php:461
3665
  #, php-format
3666
  msgid "Billing information has been updated for %s at %s"
3667
  msgstr ""
3668
 
3669
- #: classes/class.pmproemail.php:510 classes/class.pmproemail.php:425
3670
  #: classes/class.pmproemail.php:430 classes/class.pmproemail.php:464
3671
  #: classes/class.pmproemail.php:467 classes/class.pmproemail.php:476
3672
  #: classes/class.pmproemail.php:496 classes/class.pmproemail.php:510
@@ -3674,7 +3678,7 @@ msgstr ""
3674
  msgid "Membership Payment Failed at %s"
3675
  msgstr ""
3676
 
3677
- #: classes/class.pmproemail.php:557 classes/class.pmproemail.php:462
3678
  #: classes/class.pmproemail.php:468 classes/class.pmproemail.php:510
3679
  #: classes/class.pmproemail.php:513 classes/class.pmproemail.php:522
3680
  #: classes/class.pmproemail.php:542 classes/class.pmproemail.php:557
@@ -3682,7 +3686,7 @@ msgstr ""
3682
  msgid "Membership Payment Failed For %s at %s"
3683
  msgstr ""
3684
 
3685
- #: classes/class.pmproemail.php:605 classes/class.pmproemail.php:508
3686
  #: classes/class.pmproemail.php:557 classes/class.pmproemail.php:560
3687
  #: classes/class.pmproemail.php:569 classes/class.pmproemail.php:589
3688
  #: classes/class.pmproemail.php:605
@@ -3690,7 +3694,7 @@ msgstr ""
3690
  msgid "Credit Card on File Expiring Soon at %s"
3691
  msgstr ""
3692
 
3693
- #: classes/class.pmproemail.php:656 classes/class.pmproemail.php:501
3694
  #: classes/class.pmproemail.php:548 classes/class.pmproemail.php:605
3695
  #: classes/class.pmproemail.php:608 classes/class.pmproemail.php:617
3696
  #: classes/class.pmproemail.php:619 classes/class.pmproemail.php:639
@@ -3699,7 +3703,7 @@ msgstr ""
3699
  msgid "INVOICE for %s membership"
3700
  msgstr ""
3701
 
3702
- #: classes/class.pmproemail.php:733 classes/class.pmproemail.php:563
3703
  #: classes/class.pmproemail.php:611 classes/class.pmproemail.php:676
3704
  #: classes/class.pmproemail.php:679 classes/class.pmproemail.php:688
3705
  #: classes/class.pmproemail.php:690 classes/class.pmproemail.php:710
@@ -3708,7 +3712,7 @@ msgstr ""
3708
  msgid "Your trial at %s is ending soon"
3709
  msgstr ""
3710
 
3711
- #: classes/class.pmproemail.php:769 classes/class.pmproemail.php:596
3712
  #: classes/class.pmproemail.php:645 classes/class.pmproemail.php:710
3713
  #: classes/class.pmproemail.php:713 classes/class.pmproemail.php:722
3714
  #: classes/class.pmproemail.php:724 classes/class.pmproemail.php:744
@@ -3717,7 +3721,7 @@ msgstr ""
3717
  msgid "Your membership at %s has ended"
3718
  msgstr ""
3719
 
3720
- #: classes/class.pmproemail.php:796 classes/class.pmproemail.php:621
3721
  #: classes/class.pmproemail.php:670 classes/class.pmproemail.php:735
3722
  #: classes/class.pmproemail.php:738 classes/class.pmproemail.php:747
3723
  #: classes/class.pmproemail.php:749 classes/class.pmproemail.php:769
@@ -3726,7 +3730,7 @@ msgstr ""
3726
  msgid "Your membership at %s will end soon"
3727
  msgstr ""
3728
 
3729
- #: classes/class.pmproemail.php:818 classes/class.pmproemail.php:641
3730
  #: classes/class.pmproemail.php:690 classes/class.pmproemail.php:755
3731
  #: classes/class.pmproemail.php:758 classes/class.pmproemail.php:767
3732
  #: classes/class.pmproemail.php:769 classes/class.pmproemail.php:789
@@ -3735,7 +3739,7 @@ msgstr ""
3735
  msgid "Your membership at %s has been changed"
3736
  msgstr ""
3737
 
3738
- #: classes/class.pmproemail.php:823 classes/class.pmproemail.php:863
3739
  #: classes/class.pmproemail.php:759 classes/class.pmproemail.php:762
3740
  #: classes/class.pmproemail.php:771 classes/class.pmproemail.php:773
3741
  #: classes/class.pmproemail.php:793 classes/class.pmproemail.php:800
@@ -3746,7 +3750,7 @@ msgstr ""
3746
  msgid "The new level is %s"
3747
  msgstr ""
3748
 
3749
- #: classes/class.pmproemail.php:825 classes/class.pmproemail.php:647
3750
  #: classes/class.pmproemail.php:696 classes/class.pmproemail.php:761
3751
  #: classes/class.pmproemail.php:764 classes/class.pmproemail.php:773
3752
  #: classes/class.pmproemail.php:775 classes/class.pmproemail.php:795
@@ -3754,7 +3758,7 @@ msgstr ""
3754
  msgid "Your membership has been cancelled"
3755
  msgstr ""
3756
 
3757
- #: classes/class.pmproemail.php:829 classes/class.pmproemail.php:869
3758
  #: classes/class.pmproemail.php:651 classes/class.pmproemail.php:689
3759
  #: classes/class.pmproemail.php:700 classes/class.pmproemail.php:738
3760
  #: classes/class.pmproemail.php:765 classes/class.pmproemail.php:768
@@ -3768,7 +3772,7 @@ msgstr ""
3768
  msgid "This membership will expire on %s"
3769
  msgstr ""
3770
 
3771
- #: classes/class.pmproemail.php:833 classes/class.pmproemail.php:873
3772
  #: classes/class.pmproemail.php:655 classes/class.pmproemail.php:693
3773
  #: classes/class.pmproemail.php:704 classes/class.pmproemail.php:742
3774
  #: classes/class.pmproemail.php:769 classes/class.pmproemail.php:772
@@ -3781,7 +3785,7 @@ msgstr ""
3781
  msgid "This membership does not expire"
3782
  msgstr ""
3783
 
3784
- #: classes/class.pmproemail.php:859 classes/class.pmproemail.php:679
3785
  #: classes/class.pmproemail.php:728 classes/class.pmproemail.php:793
3786
  #: classes/class.pmproemail.php:796 classes/class.pmproemail.php:805
3787
  #: classes/class.pmproemail.php:806 classes/class.pmproemail.php:807
@@ -3790,20 +3794,20 @@ msgstr ""
3790
  msgid "Membership for %s at %s has been changed"
3791
  msgstr ""
3792
 
3793
- #: classes/class.pmproemail.php:865 classes/class.pmproemail.php:799
3794
  #: classes/class.pmproemail.php:802 classes/class.pmproemail.php:811
3795
  #: classes/class.pmproemail.php:812 classes/class.pmproemail.php:813
3796
  #: classes/class.pmproemail.php:832 classes/class.pmproemail.php:865
3797
  msgid "Membership has been cancelled"
3798
  msgstr ""
3799
 
3800
- #: classes/class.pmproemail.php:904 classes/class.pmproemail.php:848
3801
  #: classes/class.pmproemail.php:849 classes/class.pmproemail.php:850
3802
  #: classes/class.pmproemail.php:869 classes/class.pmproemail.php:904
3803
  msgid "Invoice for Order #: "
3804
  msgstr ""
3805
 
3806
- #: classes/class.pmproemail.php:948 classes/class.pmproemail.php:948
3807
  msgid ""
3808
  "<p>An administrator at !!sitename!! has changed your membership level.</p>\n"
3809
  "\n"
@@ -4082,7 +4086,7 @@ msgid "Client-Side Encryption Key"
4082
  msgstr ""
4083
 
4084
  #: classes/gateways/class.pmprogateway_braintree.php:313
4085
- #: classes/gateways/class.pmprogateway_stripe.php:305
4086
  #: adminpages/paymentsettings.php:462 adminpages/paymentsettings.php:470
4087
  #: adminpages/paymentsettings.php:503 adminpages/paymentsettings.php:509
4088
  #: adminpages/paymentsettings.php:511 adminpages/paymentsettings.php:517
@@ -4104,6 +4108,7 @@ msgstr ""
4104
  #: classes/gateways/class.pmprogateway_stripe.php:230
4105
  #: classes/gateways/class.pmprogateway_stripe.php:257
4106
  #: classes/gateways/class.pmprogateway_stripe.php:289
 
4107
  msgid "Web Hook URL"
4108
  msgstr ""
4109
 
@@ -4121,7 +4126,7 @@ msgid "To fully integrate with Braintree, be sure to set your Web Hook URL to"
4121
  msgstr ""
4122
 
4123
  #: classes/gateways/class.pmprogateway_braintree.php:434
4124
- #: classes/gateways/class.pmprogateway_stripe.php:577 pages/checkout.php:411
4125
  #: classes/gateways/class.pmprogateway_braintree.php:270
4126
  #: classes/gateways/class.pmprogateway_braintree.php:283
4127
  #: classes/gateways/class.pmprogateway_braintree.php:285
@@ -4144,7 +4149,8 @@ msgstr ""
4144
  #: classes/gateways/class.pmprogateway_stripe.php:461
4145
  #: classes/gateways/class.pmprogateway_stripe.php:499
4146
  #: classes/gateways/class.pmprogateway_stripe.php:526
4147
- #: classes/gateways/class.pmprogateway_stripe.php:561 pages/checkout.php:411
 
4148
  #: pages/checkout.php:476 pages/checkout.php:478 pages/checkout.php:485
4149
  #: pages/checkout.php:493 pages/checkout.php:494 pages/checkout.php:500
4150
  #: pages/checkout.php:501 pages/checkout.php:503 pages/checkout.php:510
@@ -4153,7 +4159,7 @@ msgid "Payment Information"
4153
  msgstr ""
4154
 
4155
  #: classes/gateways/class.pmprogateway_braintree.php:435
4156
- #: classes/gateways/class.pmprogateway_stripe.php:578 pages/checkout.php:412
4157
  #: classes/gateways/class.pmprogateway_braintree.php:270
4158
  #: classes/gateways/class.pmprogateway_braintree.php:283
4159
  #: classes/gateways/class.pmprogateway_braintree.php:285
@@ -4176,7 +4182,8 @@ msgstr ""
4176
  #: classes/gateways/class.pmprogateway_stripe.php:462
4177
  #: classes/gateways/class.pmprogateway_stripe.php:500
4178
  #: classes/gateways/class.pmprogateway_stripe.php:527
4179
- #: classes/gateways/class.pmprogateway_stripe.php:562 pages/checkout.php:412
 
4180
  #: pages/checkout.php:476 pages/checkout.php:478 pages/checkout.php:485
4181
  #: pages/checkout.php:493 pages/checkout.php:494 pages/checkout.php:500
4182
  #: pages/checkout.php:502 pages/checkout.php:504 pages/checkout.php:511
@@ -4186,9 +4193,8 @@ msgid "We Accept %s"
4186
  msgstr ""
4187
 
4188
  #: classes/gateways/class.pmprogateway_braintree.php:455
4189
- #: classes/gateways/class.pmprogateway_stripe.php:625 pages/billing.php:313
4190
- #: pages/checkout.php:459
4191
- #: classes/gateways/class.pmprogateway_braintree.php:303
4192
  #: classes/gateways/class.pmprogateway_braintree.php:316
4193
  #: classes/gateways/class.pmprogateway_braintree.php:318
4194
  #: classes/gateways/class.pmprogateway_braintree.php:321
@@ -4209,7 +4215,8 @@ msgstr ""
4209
  #: classes/gateways/class.pmprogateway_stripe.php:527
4210
  #: classes/gateways/class.pmprogateway_stripe.php:565
4211
  #: classes/gateways/class.pmprogateway_stripe.php:592
4212
- #: classes/gateways/class.pmprogateway_stripe.php:609 pages/billing.php:244
 
4213
  #: pages/billing.php:248 pages/billing.php:257 pages/billing.php:260
4214
  #: pages/billing.php:263 pages/billing.php:305 pages/billing.php:311
4215
  #: pages/billing.php:312 pages/billing.php:313 pages/billing.php:314
@@ -4254,9 +4261,8 @@ msgid "CVV"
4254
  msgstr ""
4255
 
4256
  #: classes/gateways/class.pmprogateway_braintree.php:484
4257
- #: classes/gateways/class.pmprogateway_stripe.php:655 pages/billing.php:353
4258
- #: pages/checkout.php:493
4259
- #: classes/gateways/class.pmprogateway_braintree.php:341
4260
  #: classes/gateways/class.pmprogateway_braintree.php:354
4261
  #: classes/gateways/class.pmprogateway_braintree.php:356
4262
  #: classes/gateways/class.pmprogateway_braintree.php:359
@@ -4277,7 +4283,8 @@ msgstr ""
4277
  #: classes/gateways/class.pmprogateway_stripe.php:565
4278
  #: classes/gateways/class.pmprogateway_stripe.php:603
4279
  #: classes/gateways/class.pmprogateway_stripe.php:630
4280
- #: classes/gateways/class.pmprogateway_stripe.php:639 pages/billing.php:282
 
4281
  #: pages/billing.php:286 pages/billing.php:295 pages/billing.php:298
4282
  #: pages/billing.php:302 pages/billing.php:344 pages/billing.php:352
4283
  #: pages/billing.php:353 pages/billing.php:355 pages/billing.php:358
@@ -4290,9 +4297,8 @@ msgid "what's this?"
4290
  msgstr ""
4291
 
4292
  #: classes/gateways/class.pmprogateway_braintree.php:491
4293
- #: classes/gateways/class.pmprogateway_stripe.php:662 pages/checkout.php:78
4294
- #: pages/checkout.php:500
4295
- #: classes/gateways/class.pmprogateway_braintree.php:351
4296
  #: classes/gateways/class.pmprogateway_braintree.php:364
4297
  #: classes/gateways/class.pmprogateway_braintree.php:366
4298
  #: classes/gateways/class.pmprogateway_braintree.php:369
@@ -4314,7 +4320,8 @@ msgstr ""
4314
  #: classes/gateways/class.pmprogateway_stripe.php:575
4315
  #: classes/gateways/class.pmprogateway_stripe.php:613
4316
  #: classes/gateways/class.pmprogateway_stripe.php:640
4317
- #: classes/gateways/class.pmprogateway_stripe.php:646 pages/checkout.php:78
 
4318
  #: pages/checkout.php:79 pages/checkout.php:80 pages/checkout.php:87
4319
  #: pages/checkout.php:88 pages/checkout.php:95 pages/checkout.php:98
4320
  #: pages/checkout.php:500 pages/checkout.php:551 pages/checkout.php:567
@@ -4352,7 +4359,7 @@ msgid "Payment error: Please contact the webmaster (braintree-load-error)"
4352
  msgstr ""
4353
 
4354
  #: classes/gateways/class.pmprogateway_braintree.php:554
4355
- #: classes/gateways/class.pmprogateway_stripe.php:1139
4356
  #: classes/gateways/class.pmprogateway_braintree.php:61
4357
  #: classes/gateways/class.pmprogateway_braintree.php:406
4358
  #: classes/gateways/class.pmprogateway_braintree.php:419
@@ -4377,6 +4384,7 @@ msgstr ""
4377
  #: classes/gateways/class.pmprogateway_stripe.php:1094
4378
  #: classes/gateways/class.pmprogateway_stripe.php:1105
4379
  #: classes/gateways/class.pmprogateway_stripe.php:1123
 
4380
  #: classes/gateways/class.pmprogateway_stripe.php:1143
4381
  #: classes/gateways/class.pmprogateway_stripe.php:1176
4382
  msgid "Unknown error: Initial payment failed."
@@ -5020,10 +5028,12 @@ msgstr ""
5020
  #: classes/gateways/class.pmprogateway_stripe.php:208
5021
  #: classes/gateways/class.pmprogateway_stripe.php:210
5022
  #: classes/gateways/class.pmprogateway_stripe.php:237
 
5023
  #: classes/gateways/class.pmprogateway_stripe.php:269
5024
  msgid "Publishable Key"
5025
  msgstr ""
5026
 
 
5027
  #: classes/gateways/class.pmprogateway_stripe.php:269
5028
  msgid "Your Publishable Key appears incorrect."
5029
  msgstr ""
@@ -5041,14 +5051,16 @@ msgstr ""
5041
  #: classes/gateways/class.pmprogateway_stripe.php:202
5042
  #: classes/gateways/class.pmprogateway_stripe.php:229
5043
  #: classes/gateways/class.pmprogateway_stripe.php:261
 
5044
  msgid "Secret Key"
5045
  msgstr ""
5046
 
 
5047
  #: classes/gateways/class.pmprogateway_stripe.php:285
5048
  msgid "Your Secret Key appears incorrect."
5049
  msgstr ""
5050
 
5051
- #: classes/gateways/class.pmprogateway_stripe.php:293
5052
  #: adminpages/paymentsettings.php:425 adminpages/paymentsettings.php:430
5053
  #: adminpages/paymentsettings.php:432
5054
  #: classes/gateways/class.pmprogateway_stripe.php:169
@@ -5061,10 +5073,11 @@ msgstr ""
5061
  #: classes/gateways/class.pmprogateway_stripe.php:218
5062
  #: classes/gateways/class.pmprogateway_stripe.php:245
5063
  #: classes/gateways/class.pmprogateway_stripe.php:277
 
5064
  msgid "Show Billing Address Fields"
5065
  msgstr ""
5066
 
5067
- #: classes/gateways/class.pmprogateway_stripe.php:300
5068
  #: adminpages/paymentsettings.php:437 adminpages/paymentsettings.php:439
5069
  #: classes/gateways/class.pmprogateway_stripe.php:176
5070
  #: classes/gateways/class.pmprogateway_stripe.php:177
@@ -5076,13 +5089,14 @@ msgstr ""
5076
  #: classes/gateways/class.pmprogateway_stripe.php:225
5077
  #: classes/gateways/class.pmprogateway_stripe.php:252
5078
  #: classes/gateways/class.pmprogateway_stripe.php:284
 
5079
  msgid ""
5080
  "Stripe doesn't require billing address fields. Choose 'No' to hide them on "
5081
  "the checkout page.<br /><strong>If No, make sure you disable address "
5082
  "verification in the Stripe dashboard settings.</strong>"
5083
  msgstr ""
5084
 
5085
- #: classes/gateways/class.pmprogateway_stripe.php:308
5086
  #: adminpages/paymentsettings.php:465 adminpages/paymentsettings.php:506
5087
  #: adminpages/paymentsettings.php:512 adminpages/paymentsettings.php:514
5088
  #: classes/gateways/class.pmprogateway_stripe.php:184
@@ -5095,24 +5109,27 @@ msgstr ""
5095
  #: classes/gateways/class.pmprogateway_stripe.php:233
5096
  #: classes/gateways/class.pmprogateway_stripe.php:260
5097
  #: classes/gateways/class.pmprogateway_stripe.php:292
 
5098
  msgid "To fully integrate with Stripe, be sure to set your Web Hook URL to"
5099
  msgstr ""
5100
 
 
 
5101
  #: classes/gateways/class.pmprogateway_stripe.php:654 pages/checkout.php:492
5102
- #: classes/gateways/class.pmprogateway_stripe.php:638 pages/checkout.php:492
5103
  msgid "Security Code (CVC)"
5104
  msgstr ""
5105
 
5106
- #: classes/gateways/class.pmprogateway_stripe.php:726
5107
  #: classes/gateways/class.pmprogateway_stripe.php:703
5108
  #: classes/gateways/class.pmprogateway_stripe.php:710
 
5109
  #, php-format
5110
  msgid ""
5111
  "%1$sNote:%2$s Subscription %3$s%4$s%5$s could not be found at Stripe. It may "
5112
  "have been deleted."
5113
  msgstr ""
5114
 
5115
- #: classes/gateways/class.pmprogateway_stripe.php:733
5116
  #: classes/gateways/class.pmprogateway_stripe.php:567
5117
  #: classes/gateways/class.pmprogateway_stripe.php:568
5118
  #: classes/gateways/class.pmprogateway_stripe.php:578
@@ -5126,10 +5143,11 @@ msgstr ""
5126
  #: classes/gateways/class.pmprogateway_stripe.php:683
5127
  #: classes/gateways/class.pmprogateway_stripe.php:710
5128
  #: classes/gateways/class.pmprogateway_stripe.php:717
 
5129
  msgid "Subscription Updates"
5130
  msgstr ""
5131
 
5132
- #: classes/gateways/class.pmprogateway_stripe.php:737
5133
  #: classes/gateways/class.pmprogateway_stripe.php:571
5134
  #: classes/gateways/class.pmprogateway_stripe.php:572
5135
  #: classes/gateways/class.pmprogateway_stripe.php:582
@@ -5143,12 +5161,13 @@ msgstr ""
5143
  #: classes/gateways/class.pmprogateway_stripe.php:687
5144
  #: classes/gateways/class.pmprogateway_stripe.php:714
5145
  #: classes/gateways/class.pmprogateway_stripe.php:721
 
5146
  msgid ""
5147
  "Subscription updates, allow you to change the member's subscription values "
5148
  "at predefined times. Be sure to click Update Profile after making changes."
5149
  msgstr ""
5150
 
5151
- #: classes/gateways/class.pmprogateway_stripe.php:739
5152
  #: classes/gateways/class.pmprogateway_stripe.php:573
5153
  #: classes/gateways/class.pmprogateway_stripe.php:574
5154
  #: classes/gateways/class.pmprogateway_stripe.php:584
@@ -5162,12 +5181,13 @@ msgstr ""
5162
  #: classes/gateways/class.pmprogateway_stripe.php:689
5163
  #: classes/gateways/class.pmprogateway_stripe.php:716
5164
  #: classes/gateways/class.pmprogateway_stripe.php:723
 
5165
  msgid ""
5166
  "Subscription updates, allow you to change the member's subscription values "
5167
  "at predefined times. Be sure to click Update User after making changes."
5168
  msgstr ""
5169
 
5170
- #: classes/gateways/class.pmprogateway_stripe.php:744 pages/billing.php:364
5171
  #: classes/gateways/class.pmprogateway_stripe.php:578
5172
  #: classes/gateways/class.pmprogateway_stripe.php:579
5173
  #: classes/gateways/class.pmprogateway_stripe.php:589
@@ -5180,7 +5200,8 @@ msgstr ""
5180
  #: classes/gateways/class.pmprogateway_stripe.php:656
5181
  #: classes/gateways/class.pmprogateway_stripe.php:694
5182
  #: classes/gateways/class.pmprogateway_stripe.php:721
5183
- #: classes/gateways/class.pmprogateway_stripe.php:728 pages/billing.php:294
 
5184
  #: pages/billing.php:298 pages/billing.php:329 pages/billing.php:338
5185
  #: pages/billing.php:341 pages/billing.php:343 pages/billing.php:347
5186
  #: pages/billing.php:363 pages/billing.php:364 pages/billing.php:370
@@ -5189,13 +5210,14 @@ msgstr ""
5189
  msgid "Update"
5190
  msgstr ""
5191
 
5192
- #: classes/gateways/class.pmprogateway_stripe.php:1135
5193
  #: classes/gateways/class.pmprogateway_stripe.php:1119
 
5194
  #: classes/gateways/class.pmprogateway_stripe.php:1172
5195
  msgid "Payment error: Please contact the webmaster (stripe-load-error)"
5196
  msgstr ""
5197
 
5198
- #: classes/gateways/class.pmprogateway_stripe.php:1373
5199
  #: classes/gateways/class.pmprogateway_stripe.php:190
5200
  #: classes/gateways/class.pmprogateway_stripe.php:192
5201
  #: classes/gateways/class.pmprogateway_stripe.php:199
@@ -5216,12 +5238,13 @@ msgstr ""
5216
  #: classes/gateways/class.pmprogateway_stripe.php:1326
5217
  #: classes/gateways/class.pmprogateway_stripe.php:1336
5218
  #: classes/gateways/class.pmprogateway_stripe.php:1357
 
5219
  #: classes/gateways/class.pmprogateway_stripe.php:1374
5220
  #: classes/gateways/class.pmprogateway_stripe.php:1410
5221
  msgid "Error creating customer record with Stripe:"
5222
  msgstr ""
5223
 
5224
- #: classes/gateways/class.pmprogateway_stripe.php:1432
5225
  #: classes/gateways/class.pmprogateway_stripe.php:1275
5226
  #: classes/gateways/class.pmprogateway_stripe.php:1303
5227
  #: classes/gateways/class.pmprogateway_stripe.php:1313
@@ -5232,12 +5255,13 @@ msgstr ""
5232
  #: classes/gateways/class.pmprogateway_stripe.php:1385
5233
  #: classes/gateways/class.pmprogateway_stripe.php:1395
5234
  #: classes/gateways/class.pmprogateway_stripe.php:1416
 
5235
  #: classes/gateways/class.pmprogateway_stripe.php:1433
5236
  #: classes/gateways/class.pmprogateway_stripe.php:1469
5237
  msgid "Error getting subscription with Stripe:"
5238
  msgstr ""
5239
 
5240
- #: classes/gateways/class.pmprogateway_stripe.php:1588
5241
  #: classes/gateways/class.pmprogateway_stripe.php:278
5242
  #: classes/gateways/class.pmprogateway_stripe.php:279
5243
  #: classes/gateways/class.pmprogateway_stripe.php:286
@@ -5266,12 +5290,13 @@ msgstr ""
5266
  #: classes/gateways/class.pmprogateway_stripe.php:1541
5267
  #: classes/gateways/class.pmprogateway_stripe.php:1551
5268
  #: classes/gateways/class.pmprogateway_stripe.php:1572
 
5269
  #: classes/gateways/class.pmprogateway_stripe.php:1589
5270
  #: classes/gateways/class.pmprogateway_stripe.php:1625
5271
  msgid "Error creating plan with Stripe:"
5272
  msgstr ""
5273
 
5274
- #: classes/gateways/class.pmprogateway_stripe.php:1619
5275
  #: classes/gateways/class.pmprogateway_stripe.php:294
5276
  #: classes/gateways/class.pmprogateway_stripe.php:295
5277
  #: classes/gateways/class.pmprogateway_stripe.php:302
@@ -5295,12 +5320,13 @@ msgstr ""
5295
  #: classes/gateways/class.pmprogateway_stripe.php:1572
5296
  #: classes/gateways/class.pmprogateway_stripe.php:1582
5297
  #: classes/gateways/class.pmprogateway_stripe.php:1603
 
5298
  #: classes/gateways/class.pmprogateway_stripe.php:1620
5299
  #: classes/gateways/class.pmprogateway_stripe.php:1656
5300
  msgid "Error subscribing customer to plan with Stripe:"
5301
  msgstr ""
5302
 
5303
- #: classes/gateways/class.pmprogateway_stripe.php:1714
5304
  #: classes/gateways/class.pmprogateway_stripe.php:769
5305
  #: classes/gateways/class.pmprogateway_stripe.php:770
5306
  #: classes/gateways/class.pmprogateway_stripe.php:780
@@ -5314,10 +5340,11 @@ msgstr ""
5314
  #: classes/gateways/class.pmprogateway_stripe.php:887
5315
  #: classes/gateways/class.pmprogateway_stripe.php:914
5316
  #: classes/gateways/class.pmprogateway_stripe.php:1698
 
5317
  msgid "Could not cancel the old subscription. Updates have not been processed."
5318
  msgstr ""
5319
 
5320
- #: classes/gateways/class.pmprogateway_stripe.php:1817
5321
  #: classes/gateways/class.pmprogateway_stripe.php:383
5322
  #: classes/gateways/class.pmprogateway_stripe.php:389
5323
  #: classes/gateways/class.pmprogateway_stripe.php:410
@@ -5340,10 +5367,11 @@ msgstr ""
5340
  #: classes/gateways/class.pmprogateway_stripe.php:1716
5341
  #: classes/gateways/class.pmprogateway_stripe.php:1752
5342
  #: classes/gateways/class.pmprogateway_stripe.php:1801
 
5343
  msgid "Could not cancel old subscription."
5344
  msgstr ""
5345
 
5346
- #: classes/gateways/class.pmprogateway_stripe.php:1834
5347
  #: classes/gateways/class.pmprogateway_stripe.php:1533
5348
  #: classes/gateways/class.pmprogateway_stripe.php:1534
5349
  #: classes/gateways/class.pmprogateway_stripe.php:1535
@@ -5363,26 +5391,29 @@ msgstr ""
5363
  #: classes/gateways/class.pmprogateway_stripe.php:1733
5364
  #: classes/gateways/class.pmprogateway_stripe.php:1769
5365
  #: classes/gateways/class.pmprogateway_stripe.php:1818
 
5366
  msgid "Could not find the customer."
5367
  msgstr ""
5368
 
5369
- #: classes/gateways/class.pmprogateway_stripe.php:1994
5370
  #: classes/gateways/class.pmprogateway_stripe.php:1836
5371
  #: classes/gateways/class.pmprogateway_stripe.php:1837
5372
  #: classes/gateways/class.pmprogateway_stripe.php:1847
5373
  #: classes/gateways/class.pmprogateway_stripe.php:1885
5374
  #: classes/gateways/class.pmprogateway_stripe.php:1921
5375
  #: classes/gateways/class.pmprogateway_stripe.php:1978
 
5376
  msgid "Error: "
5377
  msgstr ""
5378
 
5379
- #: classes/gateways/class.pmprogateway_stripe.php:2007
5380
  #: classes/gateways/class.pmprogateway_stripe.php:1849
5381
  #: classes/gateways/class.pmprogateway_stripe.php:1850
5382
  #: classes/gateways/class.pmprogateway_stripe.php:1860
5383
  #: classes/gateways/class.pmprogateway_stripe.php:1898
5384
  #: classes/gateways/class.pmprogateway_stripe.php:1934
5385
  #: classes/gateways/class.pmprogateway_stripe.php:1991
 
5386
  #, php-format
5387
  msgid "Error: Unkown error while refunding charge #%s"
5388
  msgstr ""
@@ -6796,7 +6827,7 @@ msgstr ""
6796
  msgid "Vietnamese Dong"
6797
  msgstr ""
6798
 
6799
- #: includes/filters.php:217 includes/filters.php:217
6800
  msgid ""
6801
  "There was a potential issue while setting the 'Profile Start Date' for a "
6802
  "user's subscription at checkout. PayPal does not allow one to set a Profile "
@@ -6813,20 +6844,20 @@ msgid ""
6813
  "situations."
6814
  msgstr ""
6815
 
6816
- #: includes/filters.php:218 includes/filters.php:218
6817
  #, php-format
6818
  msgid ""
6819
- "User: %s<br />Email: %s<br />Membership Level: %s<br />Order #: %s<br /"
6820
- ">Original Profile Start Date: %s<br />Adjusted Profile Start Date: %s<br /"
6821
- ">Trial Period: %s<br />Trial Frequency: %s<br />"
6822
  msgstr ""
6823
 
6824
- #: includes/filters.php:220 includes/filters.php:220
6825
  #, php-format
6826
  msgid "Profile Start Date Issue Detected and Fixed at %s"
6827
  msgstr ""
6828
 
6829
- #: includes/functions.php:329 includes/functions.php:464
6830
  #: includes/functions.php:160 includes/functions.php:196
6831
  #: includes/functions.php:200 includes/functions.php:202
6832
  #: includes/functions.php:203 includes/functions.php:204
@@ -6838,7 +6869,7 @@ msgstr ""
6838
  msgid "The price for membership is <strong>%s</strong> now"
6839
  msgstr ""
6840
 
6841
- #: includes/functions.php:331 includes/functions.php:466
6842
  #: includes/functions.php:202 includes/functions.php:204
6843
  #: includes/functions.php:205 includes/functions.php:206
6844
  #: includes/functions.php:209 includes/functions.php:245
@@ -6849,98 +6880,52 @@ msgstr ""
6849
  msgid "<strong>%s</strong> now"
6850
  msgstr ""
6851
 
6852
- #: includes/functions.php:340 includes/functions.php:169
6853
- #: includes/functions.php:205 includes/functions.php:211
6854
- #: includes/functions.php:213 includes/functions.php:214
6855
- #: includes/functions.php:215 includes/functions.php:218
6856
- #: includes/functions.php:254 includes/functions.php:320
6857
- #: includes/functions.php:326 includes/functions.php:331
6858
- #: includes/functions.php:340
6859
  #, php-format
6860
- msgid " and then <strong>%s per %s for %d more %s</strong>."
6861
  msgstr ""
6862
 
6863
- #: includes/functions.php:344 includes/functions.php:258
6864
- #: includes/functions.php:324 includes/functions.php:330
6865
- #: includes/functions.php:335 includes/functions.php:344
6866
  #, php-format
6867
- msgid " and then <strong>%s every %d %s for %d more payments</strong>."
6868
  msgstr ""
6869
 
6870
- #: includes/functions.php:349 includes/functions.php:178
6871
- #: includes/functions.php:214 includes/functions.php:220
6872
- #: includes/functions.php:222 includes/functions.php:223
6873
- #: includes/functions.php:224 includes/functions.php:227
6874
- #: includes/functions.php:263 includes/functions.php:329
6875
- #: includes/functions.php:335 includes/functions.php:340
6876
- #: includes/functions.php:349
6877
  #, php-format
6878
- msgid " and then <strong>%s after %d %s</strong>."
6879
  msgstr ""
6880
 
6881
- #: includes/functions.php:357 includes/functions.php:228
6882
- #: includes/functions.php:229 includes/functions.php:230
6883
- #: includes/functions.php:231 includes/functions.php:235
6884
- #: includes/functions.php:271 includes/functions.php:337
6885
- #: includes/functions.php:343 includes/functions.php:348
6886
- #: includes/functions.php:357
6887
  #, php-format
6888
- msgid "The price for membership is <strong>%s per %s</strong>."
6889
  msgstr ""
6890
 
6891
- #: includes/functions.php:359 includes/functions.php:230
6892
- #: includes/functions.php:233 includes/functions.php:237
6893
- #: includes/functions.php:273 includes/functions.php:339
6894
- #: includes/functions.php:345 includes/functions.php:350
6895
- #: includes/functions.php:359
6896
  #, php-format
6897
- msgid "<strong>%s per %s</strong>."
6898
  msgstr ""
6899
 
6900
- #: includes/functions.php:364 includes/functions.php:233
6901
- #: includes/functions.php:234 includes/functions.php:235
6902
- #: includes/functions.php:238 includes/functions.php:242
6903
- #: includes/functions.php:278 includes/functions.php:344
6904
- #: includes/functions.php:350 includes/functions.php:355
6905
- #: includes/functions.php:364
6906
  #, php-format
6907
- msgid "The price for membership is <strong>%s every %d %s</strong>."
6908
  msgstr ""
6909
 
6910
- #: includes/functions.php:366 includes/functions.php:237
6911
- #: includes/functions.php:240 includes/functions.php:244
6912
- #: includes/functions.php:280 includes/functions.php:346
6913
- #: includes/functions.php:352 includes/functions.php:357
6914
- #: includes/functions.php:366
6915
  #, php-format
6916
- msgid "<strong>%s every %d %s</strong>."
6917
  msgstr ""
6918
 
6919
- #: includes/functions.php:371 includes/functions.php:184
6920
- #: includes/functions.php:220 includes/functions.php:228
6921
- #: includes/functions.php:238 includes/functions.php:239
6922
- #: includes/functions.php:240 includes/functions.php:242
6923
- #: includes/functions.php:245 includes/functions.php:249
6924
- #: includes/functions.php:285 includes/functions.php:351
6925
- #: includes/functions.php:357 includes/functions.php:362
6926
- #: includes/functions.php:371
6927
  #, php-format
6928
- msgid " and then <strong>%s per %s</strong>."
6929
  msgstr ""
6930
 
6931
- #: includes/functions.php:375 includes/functions.php:188
6932
- #: includes/functions.php:224 includes/functions.php:232
6933
- #: includes/functions.php:242 includes/functions.php:243
6934
- #: includes/functions.php:244 includes/functions.php:246
6935
- #: includes/functions.php:249 includes/functions.php:253
6936
- #: includes/functions.php:289 includes/functions.php:355
6937
- #: includes/functions.php:361 includes/functions.php:366
6938
- #: includes/functions.php:375
6939
  #, php-format
6940
- msgid " and then <strong>%s every %d %s</strong>."
6941
  msgstr ""
6942
 
6943
- #: includes/functions.php:393 includes/functions.php:202
6944
  #: includes/functions.php:238 includes/functions.php:249
6945
  #: includes/functions.php:260 includes/functions.php:261
6946
  #: includes/functions.php:262 includes/functions.php:264
@@ -6951,7 +6936,7 @@ msgstr ""
6951
  msgid "After your initial payment, your first payment is Free."
6952
  msgstr ""
6953
 
6954
- #: includes/functions.php:397 includes/functions.php:206
6955
  #: includes/functions.php:242 includes/functions.php:253
6956
  #: includes/functions.php:264 includes/functions.php:265
6957
  #: includes/functions.php:266 includes/functions.php:268
@@ -6963,7 +6948,7 @@ msgstr ""
6963
  msgid "After your initial payment, your first %d payments are Free."
6964
  msgstr ""
6965
 
6966
- #: includes/functions.php:404 includes/functions.php:213
6967
  #: includes/functions.php:249 includes/functions.php:260
6968
  #: includes/functions.php:271 includes/functions.php:272
6969
  #: includes/functions.php:273 includes/functions.php:275
@@ -6975,91 +6960,63 @@ msgstr ""
6975
  msgid "After your initial payment, your first payment will cost %s."
6976
  msgstr ""
6977
 
6978
- #: includes/functions.php:408 includes/functions.php:217
6979
- #: includes/functions.php:253 includes/functions.php:264
6980
- #: includes/functions.php:275 includes/functions.php:276
6981
- #: includes/functions.php:277 includes/functions.php:279
6982
- #: includes/functions.php:282 includes/functions.php:286
6983
- #: includes/functions.php:322 includes/functions.php:388
6984
- #: includes/functions.php:394 includes/functions.php:399
6985
- #: includes/functions.php:408 pages/levels.php:97
6986
  #, php-format
6987
- msgid "After your initial payment, your first %d payments will cost %s."
6988
  msgstr ""
6989
 
6990
- #: includes/functions.php:419 includes/functions.php:532
6991
- #: includes/functions.php:228 includes/functions.php:264
6992
- #: includes/functions.php:275 includes/functions.php:286
6993
- #: includes/functions.php:287 includes/functions.php:288
6994
- #: includes/functions.php:290 includes/functions.php:293
6995
- #: includes/functions.php:297 includes/functions.php:333
6996
- #: includes/functions.php:399 includes/functions.php:405
6997
- #: includes/functions.php:410 includes/functions.php:419
6998
- #: includes/functions.php:523 includes/functions.php:532
6999
  #, php-format
7000
- msgid "Customers in %s will be charged %s%% tax."
7001
  msgstr ""
7002
 
7003
- #: includes/functions.php:478 includes/functions.php:469
7004
- #: includes/functions.php:478
7005
  #, php-format
7006
- msgid "<strong>%s per %s for %d more %s</strong>"
7007
  msgstr ""
7008
 
7009
- #: includes/functions.php:482 includes/functions.php:473
7010
- #: includes/functions.php:482
7011
  #, php-format
7012
- msgid "<strong>%s every %d %s for %d more payments</strong>"
7013
  msgstr ""
7014
 
7015
- #: includes/functions.php:487 includes/functions.php:478
7016
- #: includes/functions.php:487
7017
  #, php-format
7018
- msgid "<strong>%s after %d %s</strong>"
7019
  msgstr ""
7020
 
7021
- #: includes/functions.php:493 includes/functions.php:484
7022
- #: includes/functions.php:493
7023
  #, php-format
7024
- msgid "<strong>%s every %s</strong>"
7025
  msgstr ""
7026
 
7027
- #: includes/functions.php:497 includes/functions.php:488
7028
- #: includes/functions.php:497
7029
  #, php-format
7030
- msgid "<strong>%s every %d %s</strong>"
7031
  msgstr ""
7032
 
7033
- #: includes/functions.php:520 includes/functions.php:511
7034
  #: includes/functions.php:520
7035
  msgid "Trial pricing has been applied to the first payment."
7036
  msgstr ""
7037
 
7038
- #: includes/functions.php:522 includes/functions.php:513
7039
  #: includes/functions.php:522
7040
  #, php-format
7041
  msgid "Trial pricing has been applied to the first %d payments."
7042
  msgstr ""
7043
 
7044
- #: includes/functions.php:549 includes/functions.php:242
7045
- #: includes/functions.php:278 includes/functions.php:289
7046
- #: includes/functions.php:300 includes/functions.php:301
7047
- #: includes/functions.php:302 includes/functions.php:304
7048
- #: includes/functions.php:307 includes/functions.php:311
7049
- #: includes/functions.php:347 includes/functions.php:413
7050
- #: includes/functions.php:419 includes/functions.php:540
7051
- #: includes/functions.php:549
7052
  #, php-format
7053
- msgid "Membership expires after %d %s."
7054
  msgstr ""
7055
 
7056
- #: includes/functions.php:566 includes/functions.php:556
7057
- #: includes/functions.php:557 includes/functions.php:566
7058
  #, php-format
7059
- msgid "%s membership expires after %d %s"
7060
  msgstr ""
7061
 
7062
- #: includes/functions.php:956 includes/functions.php:491
7063
  #: includes/functions.php:514 includes/functions.php:525
7064
  #: includes/functions.php:536 includes/functions.php:537
7065
  #: includes/functions.php:538 includes/functions.php:545
@@ -7072,20 +7029,25 @@ msgstr ""
7072
  msgid "User ID not found."
7073
  msgstr ""
7074
 
7075
- #: includes/functions.php:976 includes/functions.php:508
7076
- #: includes/functions.php:531 includes/functions.php:542
7077
- #: includes/functions.php:553 includes/functions.php:554
7078
- #: includes/functions.php:555 includes/functions.php:562
7079
- #: includes/functions.php:586 includes/functions.php:587
7080
- #: includes/functions.php:589 includes/functions.php:596
7081
- #: includes/functions.php:612 includes/functions.php:635
7082
- #: includes/functions.php:714 includes/functions.php:780
7083
- #: includes/functions.php:786 includes/functions.php:965
7084
- #: includes/functions.php:967 includes/functions.php:976
 
 
 
 
 
7085
  msgid "Invalid level."
7086
  msgstr ""
7087
 
7088
- #: includes/functions.php:987 includes/functions.php:520
7089
  #: includes/functions.php:542 includes/functions.php:553
7090
  #: includes/functions.php:564 includes/functions.php:565
7091
  #: includes/functions.php:566 includes/functions.php:573
@@ -7098,7 +7060,7 @@ msgstr ""
7098
  msgid "not changing?"
7099
  msgstr ""
7100
 
7101
- #: includes/functions.php:1046 includes/functions.php:537
7102
  #: includes/functions.php:559 includes/functions.php:570
7103
  #: includes/functions.php:581 includes/functions.php:582
7104
  #: includes/functions.php:583 includes/functions.php:590
@@ -7126,14 +7088,14 @@ msgstr ""
7126
  msgid "Error interacting with database"
7127
  msgstr ""
7128
 
7129
- #: includes/functions.php:1138 includes/functions.php:907
7130
  #: includes/functions.php:1123 includes/functions.php:1127
7131
  #: includes/functions.php:1129 includes/functions.php:1138
7132
  #, php-format
7133
  msgid "Error interacting with database: %s"
7134
  msgstr ""
7135
 
7136
- #: includes/functions.php:1213 includes/functions.php:1252
7137
  #: includes/functions.php:629 includes/functions.php:651
7138
  #: includes/functions.php:667 includes/functions.php:668
7139
  #: includes/functions.php:678 includes/functions.php:681
@@ -7159,7 +7121,7 @@ msgstr ""
7159
  msgid "Membership level not found."
7160
  msgstr ""
7161
 
7162
- #: includes/functions.php:1620 includes/functions.php:1100
7163
  #: includes/functions.php:1101 includes/functions.php:1118
7164
  #: includes/functions.php:1142 includes/functions.php:1143
7165
  #: includes/functions.php:1150 includes/functions.php:1157
@@ -7171,7 +7133,7 @@ msgstr ""
7171
  msgid "No code was given to check."
7172
  msgstr ""
7173
 
7174
- #: includes/functions.php:1629 includes/functions.php:1050
7175
  #: includes/functions.php:1072 includes/functions.php:1088
7176
  #: includes/functions.php:1099 includes/functions.php:1102
7177
  #: includes/functions.php:1109 includes/functions.php:1110
@@ -7187,7 +7149,7 @@ msgstr ""
7187
  msgid "The discount code could not be found."
7188
  msgstr ""
7189
 
7190
- #: includes/functions.php:1644 includes/functions.php:1066
7191
  #: includes/functions.php:1088 includes/functions.php:1104
7192
  #: includes/functions.php:1115 includes/functions.php:1118
7193
  #: includes/functions.php:1124 includes/functions.php:1125
@@ -7204,7 +7166,7 @@ msgstr ""
7204
  msgid "This discount code goes into effect on %s."
7205
  msgstr ""
7206
 
7207
- #: includes/functions.php:1651 includes/functions.php:1075
7208
  #: includes/functions.php:1097 includes/functions.php:1113
7209
  #: includes/functions.php:1124 includes/functions.php:1127
7210
  #: includes/functions.php:1131 includes/functions.php:1132
@@ -7221,7 +7183,7 @@ msgstr ""
7221
  msgid "This discount code expired on %s."
7222
  msgstr ""
7223
 
7224
- #: includes/functions.php:1661 includes/functions.php:1087
7225
  #: includes/functions.php:1109 includes/functions.php:1125
7226
  #: includes/functions.php:1136 includes/functions.php:1139
7227
  #: includes/functions.php:1141 includes/functions.php:1142
@@ -7237,7 +7199,7 @@ msgstr ""
7237
  msgid "This discount code is no longer valid."
7238
  msgstr ""
7239
 
7240
- #: includes/functions.php:1681 includes/functions.php:1102
7241
  #: includes/functions.php:1124 includes/functions.php:1140
7242
  #: includes/functions.php:1151 includes/functions.php:1154
7243
  #: includes/functions.php:1155 includes/functions.php:1164
@@ -7252,7 +7214,7 @@ msgstr ""
7252
  msgid "This discount code does not apply to this membership level."
7253
  msgstr ""
7254
 
7255
- #: includes/functions.php:1718 includes/functions.php:1110
7256
  #: includes/functions.php:1132 includes/functions.php:1148
7257
  #: includes/functions.php:1159 includes/functions.php:1162
7258
  #: includes/functions.php:1172 includes/functions.php:1180
@@ -7268,7 +7230,7 @@ msgstr ""
7268
  msgid "This discount code is okay."
7269
  msgstr ""
7270
 
7271
- #: includes/functions.php:1745 includes/functions.php:1134
7272
  #: includes/functions.php:1156 includes/functions.php:1172
7273
  #: includes/functions.php:1183 includes/functions.php:1186
7274
  #: includes/functions.php:1196 includes/functions.php:1205
@@ -7284,7 +7246,7 @@ msgstr ""
7284
  msgid "and"
7285
  msgstr ""
7286
 
7287
- #: includes/functions.php:2033 includes/functions.php:1319
7288
  #: includes/functions.php:1341 includes/functions.php:1361
7289
  #: includes/functions.php:1372 includes/functions.php:1375
7290
  #: includes/functions.php:1385 includes/functions.php:1394
@@ -7297,11 +7259,11 @@ msgstr ""
7297
  #: includes/functions.php:1697 includes/functions.php:1703
7298
  #: includes/functions.php:2015 includes/functions.php:2019
7299
  #: includes/functions.php:2022 includes/functions.php:2024
7300
- #: includes/functions.php:2034
7301
  msgid "Sign Up for !!name!! Now"
7302
  msgstr ""
7303
 
7304
- #: includes/functions.php:2039 includes/functions.php:1325
7305
  #: includes/functions.php:1347 includes/functions.php:1367
7306
  #: includes/functions.php:1378 includes/functions.php:1381
7307
  #: includes/functions.php:1391 includes/functions.php:1400
@@ -7314,11 +7276,12 @@ msgstr ""
7314
  #: includes/functions.php:1703 includes/functions.php:1709
7315
  #: includes/functions.php:2021 includes/functions.php:2025
7316
  #: includes/functions.php:2028 includes/functions.php:2030
7317
- #: includes/functions.php:2040
7318
  msgid "Please specify a level id."
7319
  msgstr ""
7320
 
7321
- #: includes/functions.php:2046 includes/functions.php:2047
 
7322
  #, php-format
7323
  msgid "Level #%s not found."
7324
  msgstr ""
@@ -7573,10 +7536,11 @@ msgstr ""
7573
  #: pages/billing.php:27 pages/billing.php:28 pages/billing.php:30
7574
  #: pages/billing.php:44 pages/billing.php:45 pages/cancel.php:52
7575
  #: pages/cancel.php:60 pages/cancel.php:61 pages/invoice.php:89
7576
- #: pages/invoice.php:109 pages/levels.php:13 pages/levels.php:35
7577
- #: shortcodes/pmpro_account.php:43 shortcodes/pmpro_account.php:44
7578
- #: shortcodes/pmpro_account.php:123 shortcodes/pmpro_account.php:125
7579
- #: shortcodes/pmpro_account.php:126 shortcodes/pmpro_account.php:128
 
7580
  msgid "Level"
7581
  msgstr ""
7582
 
@@ -7767,7 +7731,7 @@ msgstr ""
7767
  msgid "We accept %s"
7768
  msgstr ""
7769
 
7770
- #: pages/billing.php:381 pages/billing.php:309 pages/billing.php:313
7771
  #: pages/billing.php:344 pages/billing.php:353 pages/billing.php:356
7772
  #: pages/billing.php:360 pages/billing.php:364 pages/billing.php:380
7773
  #: pages/billing.php:381 pages/billing.php:387 pages/billing.php:408
@@ -7993,7 +7957,8 @@ msgstr ""
7993
  #: pages/confirmation.php:45 pages/confirmation.php:46
7994
  #: pages/confirmation.php:52 pages/confirmation.php:102
7995
  #: pages/confirmation.php:104 pages/confirmation.php:112
7996
- #: pages/confirmation.php:115 pages/invoice.php:26 pages/invoice.php:27
 
7997
  msgid "Account"
7998
  msgstr ""
7999
 
@@ -8005,8 +7970,9 @@ msgstr ""
8005
 
8006
  #: pages/confirmation.php:79 pages/invoice.php:61 pages/account.php:105
8007
  #: pages/account.php:109 pages/confirmation.php:61 pages/confirmation.php:63
8008
- #: pages/confirmation.php:69 pages/confirmation.php:82 pages/invoice.php:48
8009
- #: pages/invoice.php:50 pages/invoice.php:61
 
8010
  msgid "Payment Method"
8011
  msgstr ""
8012
 
@@ -8019,19 +7985,21 @@ msgstr ""
8019
 
8020
  #: pages/confirmation.php:88 pages/invoice.php:70 pages/invoice.php:103
8021
  #: pages/confirmation.php:61 pages/confirmation.php:63
8022
- #: pages/confirmation.php:65 pages/confirmation.php:71 pages/invoice.php:50
8023
- #: pages/invoice.php:52 pages/invoice.php:90 pages/invoice.php:107
8024
- #: pages/invoice.php:109 pages/invoice.php:110
 
8025
  msgid "Total Billed"
8026
  msgstr ""
8027
 
8028
- #: pages/confirmation.php:94 pages/invoice.php:76 pages/invoice.php:80
8029
- #: pages/invoice.php:82
8030
  msgid "Coupon"
8031
  msgstr ""
8032
 
8033
  #: pages/confirmation.php:111 pages/confirmation.php:97
8034
  #: pages/confirmation.php:100 pages/confirmation.php:103
 
8035
  #, php-format
8036
  msgid ""
8037
  "Below are details about your membership account. A welcome email has been "
@@ -8040,37 +8008,37 @@ msgstr ""
8040
 
8041
  #: pages/confirmation.php:124 pages/confirmation.php:103
8042
  #: pages/confirmation.php:105 pages/confirmation.php:113
8043
- #: pages/confirmation.php:116
8044
  msgid "Pending"
8045
  msgstr ""
8046
 
8047
  #: pages/confirmation.php:132 pages/invoice.php:134 pages/confirmation.php:111
8048
  #: pages/confirmation.php:113 pages/confirmation.php:121
8049
- #: pages/confirmation.php:124 pages/invoice.php:121 pages/invoice.php:139
8050
- #: pages/invoice.php:141
8051
  msgid "View Your Membership Account &rarr;"
8052
  msgstr ""
8053
 
8054
  #: pages/confirmation.php:134 pages/confirmation.php:113
8055
  #: pages/confirmation.php:115 pages/confirmation.php:123
8056
- #: pages/confirmation.php:126
8057
  msgid ""
8058
  "If your account is not activated within a few minutes, please contact the "
8059
  "site owner."
8060
  msgstr ""
8061
 
8062
- #: pages/invoice.php:101 pages/invoice.php:88 pages/invoice.php:106
8063
- #: pages/invoice.php:108
8064
  msgid "Invoice #"
8065
  msgstr ""
8066
 
8067
- #: pages/invoice.php:127 pages/invoice.php:114 pages/invoice.php:132
8068
- #: pages/invoice.php:134
8069
  msgid "No invoices found."
8070
  msgstr ""
8071
 
8072
- #: pages/invoice.php:138 pages/invoice.php:125 pages/invoice.php:143
8073
- #: pages/invoice.php:145
8074
  msgid "&larr; View All Invoices"
8075
  msgstr ""
8076
 
@@ -8144,73 +8112,74 @@ msgstr ""
8144
  msgid "Your membership status has been updated - Thank you!"
8145
  msgstr ""
8146
 
8147
- #: preheaders/account.php:12 preheaders/levels.php:24
8148
- #: preheaders/account.php:11 preheaders/account.php:12
8149
- #: preheaders/levels.php:23 preheaders/levels.php:24
8150
  msgid ""
8151
  "Sorry, your request could not be completed - please try again in a few "
8152
  "moments."
8153
  msgstr ""
8154
 
8155
  #: preheaders/billing.php:147 preheaders/checkout.php:322
8156
- #: preheaders/billing.php:145 preheaders/billing.php:258
8157
- #: preheaders/billing.php:265 preheaders/billing.php:266
8158
- #: preheaders/billing.php:270 preheaders/billing.php:273
8159
- #: preheaders/billing.php:279 preheaders/checkout.php:322
8160
- #: preheaders/checkout.php:332 preheaders/checkout.php:336
8161
- #: preheaders/checkout.php:364 preheaders/checkout.php:458
8162
- #: preheaders/checkout.php:464 preheaders/checkout.php:465
8163
- #: preheaders/checkout.php:470 preheaders/checkout.php:481
8164
- #: preheaders/checkout.php:482
8165
  msgid "Please complete all required fields."
8166
  msgstr ""
8167
 
8168
  #: preheaders/billing.php:150 preheaders/checkout.php:330
8169
- #: preheaders/billing.php:148 preheaders/billing.php:263
8170
- #: preheaders/billing.php:268 preheaders/billing.php:269
8171
- #: preheaders/billing.php:273 preheaders/billing.php:276
8172
- #: preheaders/billing.php:284 preheaders/checkout.php:330
8173
- #: preheaders/checkout.php:340 preheaders/checkout.php:344
8174
- #: preheaders/checkout.php:372 preheaders/checkout.php:466
8175
- #: preheaders/checkout.php:473 preheaders/checkout.php:474
8176
- #: preheaders/checkout.php:478 preheaders/checkout.php:491
8177
- #: preheaders/checkout.php:492
8178
  msgid "Your email addresses do not match. Please try again."
8179
  msgstr ""
8180
 
8181
  #: preheaders/billing.php:153 preheaders/checkout.php:335
8182
- #: preheaders/billing.php:151 preheaders/billing.php:268
8183
- #: preheaders/billing.php:271 preheaders/billing.php:272
8184
- #: preheaders/billing.php:276 preheaders/billing.php:279
8185
- #: preheaders/billing.php:289 preheaders/checkout.php:335
8186
- #: preheaders/checkout.php:345 preheaders/checkout.php:349
8187
- #: preheaders/checkout.php:377 preheaders/checkout.php:471
8188
- #: preheaders/checkout.php:478 preheaders/checkout.php:480
8189
- #: preheaders/checkout.php:483 preheaders/checkout.php:497
8190
- #: preheaders/checkout.php:498
8191
  msgid "The email address entered is in an invalid format. Please try again."
8192
  msgstr ""
8193
 
8194
  #: preheaders/billing.php:157 preheaders/billing.php:155
8195
- #: preheaders/billing.php:274 preheaders/billing.php:275
8196
- #: preheaders/billing.php:276 preheaders/billing.php:280
8197
- #: preheaders/billing.php:283 preheaders/billing.php:295
 
8198
  msgid "All good!"
8199
  msgstr ""
8200
 
8201
  #: preheaders/billing.php:224 preheaders/billing.php:222
8202
- #: preheaders/billing.php:340 preheaders/billing.php:345
8203
- #: preheaders/billing.php:346 preheaders/billing.php:350
8204
- #: preheaders/billing.php:353 preheaders/billing.php:370
 
8205
  #, php-format
8206
  msgid "Information updated. <a href=\"%s\">&laquo; back to my account</a>"
8207
  msgstr ""
8208
 
8209
  #: preheaders/billing.php:230 preheaders/billing.php:228
8210
- #: preheaders/billing.php:347 preheaders/billing.php:351
8211
- #: preheaders/billing.php:352 preheaders/billing.php:356
8212
- #: preheaders/billing.php:359 preheaders/billing.php:378
8213
- #: preheaders/billing.php:380
8214
  msgid "Error updating billing information."
8215
  msgstr ""
8216
 
@@ -8500,17 +8469,17 @@ msgstr ""
8500
  msgid "Amount"
8501
  msgstr ""
8502
 
8503
- #: shortcodes/pmpro_account.php:157 pages/account.php:121
8504
- #: pages/account.php:140 pages/account.php:144
8505
- #: shortcodes/pmpro_account.php:152 shortcodes/pmpro_account.php:154
8506
- #: shortcodes/pmpro_account.php:155 shortcodes/pmpro_account.php:157
8507
  msgid "View All Invoices"
8508
  msgstr ""
8509
 
8510
- #: shortcodes/pmpro_account.php:164 pages/account.php:128
8511
- #: pages/account.php:146 pages/account.php:150
8512
- #: shortcodes/pmpro_account.php:159 shortcodes/pmpro_account.php:161
8513
- #: shortcodes/pmpro_account.php:162 shortcodes/pmpro_account.php:164
8514
  msgid "Member Links"
8515
  msgstr ""
8516
 
@@ -8532,6 +8501,18 @@ msgstr ""
8532
  msgid "User Forum"
8533
  msgstr ""
8534
 
 
 
 
 
 
 
 
 
 
 
 
 
8535
  #: adminpages/advancedsettings.php:272 adminpages/advancedsettings.php:285
8536
  msgid "selected"
8537
  msgstr ""
@@ -8761,6 +8742,24 @@ msgstr ""
8761
  msgid "South African Rand"
8762
  msgstr ""
8763
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8764
  #: includes/functions.php:173 includes/functions.php:209
8765
  #: includes/functions.php:215 includes/functions.php:217
8766
  #: includes/functions.php:218 includes/functions.php:219
@@ -8769,6 +8768,144 @@ msgstr ""
8769
  msgid " and then <strong>%s every %d %s for %d more %s</strong>."
8770
  msgstr ""
8771
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8772
  #: includes/license.php:89 includes/license.php:92
8773
  msgid ""
8774
  "Enter your support license key.</strong> Your license key can be found in "
6
  msgstr ""
7
  "Project-Id-Version: paid-memberships-pro\n"
8
  "Report-Msgid-Bugs-To: jason@strangerstudios.com\n"
9
+ "POT-Creation-Date: 2018-03-14 19:33-0400\n"
10
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
11
  "Last-Translator: \n"
12
  "Language-Team: Stranger Studios <jason@strangerstudios.com>\n"
539
  #: adminpages/advancedsettings.php:167 adminpages/advancedsettings.php:226
540
  #: adminpages/advancedsettings.php:238 adminpages/membershiplevels.php:694
541
  #: adminpages/paymentsettings.php:236
542
+ #: classes/gateways/class.pmprogateway_stripe.php:298 includes/profile.php:125
543
  #: adminpages/advancedsettings.php:128 adminpages/advancedsettings.php:135
544
  #: adminpages/advancedsettings.php:148 adminpages/advancedsettings.php:151
545
  #: adminpages/advancedsettings.php:167 adminpages/advancedsettings.php:187
568
  #: classes/gateways/class.pmprogateway_stripe.php:220
569
  #: classes/gateways/class.pmprogateway_stripe.php:222
570
  #: classes/gateways/class.pmprogateway_stripe.php:249
571
+ #: classes/gateways/class.pmprogateway_stripe.php:281
572
+ #: classes/gateways/class.pmprogateway_stripe.php:297 includes/profile.php:101
573
  #: includes/profile.php:105 includes/profile.php:110 includes/profile.php:117
574
  #: includes/profile.php:121 includes/profile.php:123 includes/profile.php:125
575
  msgid "No"
619
 
620
  #: adminpages/advancedsettings.php:227 adminpages/membershiplevels.php:694
621
  #: adminpages/paymentsettings.php:237
622
+ #: classes/gateways/class.pmprogateway_stripe.php:299 includes/profile.php:126
623
  #: adminpages/advancedsettings.php:188 adminpages/advancedsettings.php:195
624
  #: adminpages/advancedsettings.php:208 adminpages/advancedsettings.php:211
625
  #: adminpages/advancedsettings.php:227 adminpages/membershiplevels.php:563
644
  #: classes/gateways/class.pmprogateway_stripe.php:221
645
  #: classes/gateways/class.pmprogateway_stripe.php:223
646
  #: classes/gateways/class.pmprogateway_stripe.php:250
647
+ #: classes/gateways/class.pmprogateway_stripe.php:282
648
+ #: classes/gateways/class.pmprogateway_stripe.php:298 includes/profile.php:102
649
  #: includes/profile.php:106 includes/profile.php:111 includes/profile.php:118
650
  #: includes/profile.php:122 includes/profile.php:124 includes/profile.php:126
651
  msgid "Yes"
681
  msgid "Click here to signup for reCAPTCHA"
682
  msgstr ""
683
 
684
+ #: adminpages/advancedsettings.php:248
685
+ msgid "reCAPTCHA Site Key"
 
 
686
  msgstr ""
687
 
688
+ #: adminpages/advancedsettings.php:251
689
+ msgid "reCAPTCHA Secret Key"
 
 
690
  msgstr ""
691
 
692
  #: adminpages/advancedsettings.php:257 adminpages/advancedsettings.php:218
881
 
882
  #: adminpages/discountcodes.php:483
883
  #: classes/gateways/class.pmprogateway_braintree.php:459
884
+ #: classes/gateways/class.pmprogateway_stripe.php:630 pages/billing.php:317
885
  #: pages/checkout.php:463 adminpages/discountcodes.php:367
886
  #: adminpages/discountcodes.php:370 adminpages/discountcodes.php:371
887
  #: adminpages/discountcodes.php:372 adminpages/discountcodes.php:377
907
  #: classes/gateways/class.pmprogateway_stripe.php:532
908
  #: classes/gateways/class.pmprogateway_stripe.php:570
909
  #: classes/gateways/class.pmprogateway_stripe.php:597
910
+ #: classes/gateways/class.pmprogateway_stripe.php:613
911
+ #: classes/gateways/class.pmprogateway_stripe.php:629 pages/billing.php:249
912
  #: pages/billing.php:253 pages/billing.php:262 pages/billing.php:265
913
  #: pages/billing.php:268 pages/billing.php:310 pages/billing.php:316
914
  #: pages/billing.php:317 pages/billing.php:319 pages/billing.php:342
1007
 
1008
  #: adminpages/discountcodes.php:587 adminpages/discountcodes.php:641
1009
  #: adminpages/membershiplevels.php:410 adminpages/membershiplevels.php:511
1010
+ #: classes/gateways/class.pmprogateway_stripe.php:688
1011
  #: adminpages/discountcodes.php:446 adminpages/discountcodes.php:466
1012
  #: adminpages/discountcodes.php:467 adminpages/discountcodes.php:468
1013
  #: adminpages/discountcodes.php:473 adminpages/discountcodes.php:492
1035
  #: classes/gateways/class.pmprogateway_stripe.php:637
1036
  #: classes/gateways/class.pmprogateway_stripe.php:664
1037
  #: classes/gateways/class.pmprogateway_stripe.php:671
1038
+ #: classes/gateways/class.pmprogateway_stripe.php:687
1039
  msgid "Day(s)"
1040
  msgstr ""
1041
 
1042
  #: adminpages/discountcodes.php:587 adminpages/discountcodes.php:641
1043
  #: adminpages/membershiplevels.php:410 adminpages/membershiplevels.php:511
1044
+ #: classes/gateways/class.pmprogateway_stripe.php:688
1045
  #: adminpages/discountcodes.php:446 adminpages/discountcodes.php:466
1046
  #: adminpages/discountcodes.php:467 adminpages/discountcodes.php:468
1047
  #: adminpages/discountcodes.php:473 adminpages/discountcodes.php:492
1069
  #: classes/gateways/class.pmprogateway_stripe.php:637
1070
  #: classes/gateways/class.pmprogateway_stripe.php:664
1071
  #: classes/gateways/class.pmprogateway_stripe.php:671
1072
+ #: classes/gateways/class.pmprogateway_stripe.php:687
1073
  msgid "Month(s)"
1074
  msgstr ""
1075
 
1076
  #: adminpages/discountcodes.php:587 adminpages/discountcodes.php:641
1077
  #: adminpages/membershiplevels.php:410 adminpages/membershiplevels.php:511
1078
+ #: classes/gateways/class.pmprogateway_stripe.php:688
1079
  #: adminpages/discountcodes.php:446 adminpages/discountcodes.php:466
1080
  #: adminpages/discountcodes.php:467 adminpages/discountcodes.php:468
1081
  #: adminpages/discountcodes.php:473 adminpages/discountcodes.php:492
1103
  #: classes/gateways/class.pmprogateway_stripe.php:637
1104
  #: classes/gateways/class.pmprogateway_stripe.php:664
1105
  #: classes/gateways/class.pmprogateway_stripe.php:671
1106
+ #: classes/gateways/class.pmprogateway_stripe.php:687
1107
  msgid "Week(s)"
1108
  msgstr ""
1109
 
1110
  #: adminpages/discountcodes.php:587 adminpages/discountcodes.php:641
1111
  #: adminpages/membershiplevels.php:410 adminpages/membershiplevels.php:511
1112
+ #: classes/gateways/class.pmprogateway_stripe.php:688
1113
  #: adminpages/discountcodes.php:446 adminpages/discountcodes.php:466
1114
  #: adminpages/discountcodes.php:467 adminpages/discountcodes.php:468
1115
  #: adminpages/discountcodes.php:473 adminpages/discountcodes.php:492
1137
  #: classes/gateways/class.pmprogateway_stripe.php:637
1138
  #: classes/gateways/class.pmprogateway_stripe.php:664
1139
  #: classes/gateways/class.pmprogateway_stripe.php:671
1140
+ #: classes/gateways/class.pmprogateway_stripe.php:687
1141
  msgid "Year(s)"
1142
  msgstr ""
1143
 
1340
  #: adminpages/discountcodes.php:668 adminpages/discountcodes.php:722
1341
  #: adminpages/memberslist.php:121 adminpages/memberslist.php:159
1342
  #: adminpages/memberslist.php:169 adminpages/memberslist.php:179
1343
+ #: adminpages/memberslist.php:183 adminpages/reports/login.php:145
1344
+ #: adminpages/reports/login.php:147 adminpages/reports/login.php:163
1345
+ #: adminpages/reports/login.php:167 includes/profile.php:98
1346
+ #: includes/profile.php:102 includes/profile.php:107 includes/profile.php:114
1347
+ #: includes/profile.php:118 includes/profile.php:120 includes/profile.php:122
1348
  msgid "Expires"
1349
  msgstr ""
1350
 
1657
  msgstr ""
1658
 
1659
  #: adminpages/membershiplevels.php:406
1660
+ #: classes/gateways/class.pmprogateway_stripe.php:786
1661
  #: adminpages/membershiplevels.php:349 adminpages/membershiplevels.php:351
1662
  #: adminpages/membershiplevels.php:370 adminpages/membershiplevels.php:372
1663
  #: adminpages/membershiplevels.php:373 adminpages/membershiplevels.php:396
1675
  #: classes/gateways/class.pmprogateway_stripe.php:735
1676
  #: classes/gateways/class.pmprogateway_stripe.php:762
1677
  #: classes/gateways/class.pmprogateway_stripe.php:769
1678
+ #: classes/gateways/class.pmprogateway_stripe.php:785
1679
  msgid "per"
1680
  msgstr ""
1681
 
2001
 
2002
  #: adminpages/memberslist.php:32 adminpages/reports/login.php:89
2003
  #: adminpages/reports/memberships.php:355 adminpages/reports/sales.php:226
2004
+ #: classes/class.pmproemail.php:154 classes/class.pmproemail.php:199
2005
  #: adminpages/memberslist.php:32 adminpages/reports/login.php:67
2006
  #: adminpages/reports/login.php:69 adminpages/reports/login.php:85
2007
  #: adminpages/reports/login.php:89 adminpages/reports/memberships.php:281
2081
  #: pages/checkout.php:311 pages/checkout.php:314 pages/checkout.php:317
2082
  #: pages/checkout.php:319 pages/checkout.php:321 pages/checkout.php:326
2083
  #: pages/checkout.php:329 pages/confirmation.php:59 pages/confirmation.php:61
2084
+ #: pages/confirmation.php:66 pages/confirmation.php:67
2085
+ #: pages/confirmation.php:69 pages/invoice.php:46 pages/invoice.php:48
2086
  msgid "Billing Address"
2087
  msgstr ""
2088
 
2117
  msgid "Ended"
2118
  msgstr ""
2119
 
2120
+ #: adminpages/memberslist.php:179 adminpages/memberslist.php:179
2121
  msgid "Cancelled"
2122
  msgstr ""
2123
 
2124
+ #: adminpages/memberslist.php:181 adminpages/memberslist.php:181
2125
  msgid "Expired"
2126
  msgstr ""
2127
 
2128
  #: adminpages/memberslist.php:266 adminpages/reports/login.php:232
2129
  #: adminpages/memberslist.php:195 adminpages/memberslist.php:223
2130
  #: adminpages/memberslist.php:251 adminpages/memberslist.php:261
2131
+ #: adminpages/memberslist.php:262 adminpages/memberslist.php:266
2132
+ #: adminpages/reports/login.php:210 adminpages/reports/login.php:212
2133
+ #: adminpages/reports/login.php:228 adminpages/reports/login.php:232
2134
  msgid "No members found."
2135
  msgstr ""
2136
 
2137
  #: adminpages/memberslist.php:266 adminpages/reports/login.php:232
2138
  #: adminpages/memberslist.php:195 adminpages/memberslist.php:223
2139
  #: adminpages/memberslist.php:251 adminpages/memberslist.php:261
2140
+ #: adminpages/memberslist.php:262 adminpages/memberslist.php:266
2141
+ #: adminpages/reports/login.php:210 adminpages/reports/login.php:212
2142
+ #: adminpages/reports/login.php:228 adminpages/reports/login.php:232
2143
  msgid "Search all levels"
2144
  msgstr ""
2145
 
2184
  msgid "Error saving order."
2185
  msgstr ""
2186
 
2187
+ #: adminpages/orders.php:362 classes/class.memberorder.php:743
2188
  #: adminpages/orders.php:195 adminpages/orders.php:245
2189
  #: adminpages/orders.php:317 adminpages/orders.php:321
2190
  #: adminpages/orders.php:346 adminpages/orders.php:352
2282
  #: adminpages/orders.php:426 adminpages/orders.php:455
2283
  #: adminpages/orders.php:481 adminpages/orders.php:512
2284
  #: adminpages/orders.php:523 adminpages/templates/orders-email.php:60
2285
+ #: adminpages/templates/orders-print.php:89 pages/confirmation.php:92
2286
+ #: pages/invoice.php:74 pages/invoice.php:78 pages/invoice.php:80
2287
  msgid "Tax"
2288
  msgstr ""
2289
 
2305
  #: adminpages/orders.php:942 adminpages/orders.php:971
2306
  #: adminpages/orders.php:1108 adminpages/orders.php:1139
2307
  #: adminpages/orders.php:1145 adminpages/templates/orders-email.php:64
2308
+ #: adminpages/templates/orders-print.php:93 pages/confirmation.php:96
2309
+ #: pages/invoice.php:78 pages/invoice.php:82 pages/invoice.php:84
2310
  msgid "Total"
2311
  msgstr ""
2312
 
2333
 
2334
  #: adminpages/orders.php:574
2335
  #: classes/gateways/class.pmprogateway_braintree.php:446
2336
+ #: classes/gateways/class.pmprogateway_stripe.php:590 pages/billing.php:275
2337
  #: pages/checkout.php:423 adminpages/orders.php:339 adminpages/orders.php:389
2338
  #: adminpages/orders.php:461 adminpages/orders.php:490
2339
  #: adminpages/orders.php:532 adminpages/orders.php:563
2360
  #: classes/gateways/class.pmprogateway_stripe.php:484
2361
  #: classes/gateways/class.pmprogateway_stripe.php:522
2362
  #: classes/gateways/class.pmprogateway_stripe.php:549
2363
+ #: classes/gateways/class.pmprogateway_stripe.php:573
2364
+ #: classes/gateways/class.pmprogateway_stripe.php:589 pages/billing.php:234
2365
  #: pages/billing.php:238 pages/billing.php:247 pages/billing.php:250
2366
  #: pages/billing.php:253 pages/billing.php:262 pages/billing.php:268
2367
  #: pages/billing.php:271 pages/billing.php:274 pages/billing.php:275
2426
  msgstr ""
2427
 
2428
  #: adminpages/orders.php:654 adminpages/orders.php:1147
2429
+ #: classes/class.memberorder.php:744 adminpages/orders.php:394
2430
  #: adminpages/orders.php:444 adminpages/orders.php:516
2431
  #: adminpages/orders.php:545 adminpages/orders.php:604
2432
  #: adminpages/orders.php:612 adminpages/orders.php:643
2487
  msgid "Generated by the gateway. Useful to cross reference orders."
2488
  msgstr ""
2489
 
2490
+ #: adminpages/orders.php:706 classes/class.memberorder.php:745
2491
  #: adminpages/orders.php:432 adminpages/orders.php:482
2492
  #: adminpages/orders.php:483 adminpages/orders.php:555
2493
  #: adminpages/orders.php:584 adminpages/orders.php:664
2514
  #: adminpages/orders.php:947 adminpages/orders.php:976
2515
  #: adminpages/orders.php:1113 adminpages/orders.php:1144
2516
  #: adminpages/orders.php:1150 pages/account.php:91 pages/invoice.php:87
2517
+ #: pages/invoice.php:100 pages/invoice.php:105 pages/invoice.php:107
2518
  #: shortcodes/pmpro_account.php:122 shortcodes/pmpro_account.php:124
2519
  #: shortcodes/pmpro_account.php:125 shortcodes/pmpro_account.php:127
2520
  msgid "Date"
2691
  #: pages/confirmation.php:62 pages/confirmation.php:64
2692
  #: pages/confirmation.php:70 pages/confirmation.php:91
2693
  #: pages/confirmation.php:103 pages/confirmation.php:105
2694
+ #: pages/confirmation.php:113 pages/confirmation.php:116
2695
+ #: pages/confirmation.php:124 pages/invoice.php:27 pages/invoice.php:28
2696
+ #: pages/invoice.php:49 pages/invoice.php:51 pages/invoice.php:70
2697
  msgid "Membership Level"
2698
  msgstr ""
2699
 
3296
  msgid "Total Logins"
3297
  msgstr ""
3298
 
3299
+ #: adminpages/reports/memberships.php:18 adminpages/reports/memberships.php:324
3300
+ #: adminpages/reports/memberships.php:18 adminpages/reports/memberships.php:252
 
 
3301
  #: adminpages/reports/memberships.php:259
3302
  #: adminpages/reports/memberships.php:272
3303
  #: adminpages/reports/memberships.php:288
3489
  #: adminpages/templates/orders-email.php:56
3490
  #: adminpages/templates/orders-print.php:85 pages/confirmation.php:91
3491
  #: pages/invoice.php:73 adminpages/templates/orders-email.php:56
3492
+ #: adminpages/templates/orders-print.php:85 pages/confirmation.php:91
3493
+ #: pages/invoice.php:73 pages/invoice.php:77 pages/invoice.php:79
3494
  msgid "Subtotal"
3495
  msgstr ""
3496
 
3518
  "site's plugin page."
3519
  msgstr ""
3520
 
3521
+ #: classes/class.memberorder.php:740 classes/class.memberorder.php:553
3522
  #: classes/class.memberorder.php:561 classes/class.memberorder.php:564
3523
  #: classes/class.memberorder.php:573 classes/class.memberorder.php:644
3524
  #: classes/class.memberorder.php:697 classes/class.memberorder.php:699
3533
  "active."
3534
  msgstr ""
3535
 
3536
+ #: classes/class.memberorder.php:741 classes/class.memberorder.php:744
3537
  msgid "User Email"
3538
  msgstr ""
3539
 
3540
+ #: classes/class.memberorder.php:742 classes/class.memberorder.php:745
3541
  msgid "User Display Name"
3542
  msgstr ""
3543
 
3546
  msgid "An Email From %s"
3547
  msgstr ""
3548
 
3549
+ #: classes/class.pmproemail.php:143 classes/class.pmproemail.php:120
3550
  #: classes/class.pmproemail.php:122 classes/class.pmproemail.php:125
3551
  #: classes/class.pmproemail.php:134 classes/class.pmproemail.php:136
3552
  #, php-format
3553
  msgid "Your membership at %s has been CANCELLED"
3554
  msgstr ""
3555
 
3556
+ #: classes/class.pmproemail.php:176 classes/class.pmproemail.php:142
3557
  #: classes/class.pmproemail.php:144 classes/class.pmproemail.php:147
3558
  #: classes/class.pmproemail.php:156 classes/class.pmproemail.php:166
3559
  #: classes/class.pmproemail.php:169
3561
  msgid "Membership for %s at %s has been CANCELLED"
3562
  msgstr ""
3563
 
3564
+ #: classes/class.pmproemail.php:219 classes/class.pmproemail.php:172
3565
  #: classes/class.pmproemail.php:173 classes/class.pmproemail.php:175
3566
  #: classes/class.pmproemail.php:178 classes/class.pmproemail.php:187
3567
  #: classes/class.pmproemail.php:207 classes/class.pmproemail.php:212
3569
  msgid "Your membership confirmation for %s"
3570
  msgstr ""
3571
 
3572
+ #: classes/class.pmproemail.php:276 classes/class.pmproemail.php:285
3573
+ #: classes/class.pmproemail.php:294 classes/class.pmproemail.php:376
3574
+ #: classes/class.pmproemail.php:385 classes/class.pmproemail.php:703
3575
+ #: classes/class.pmproemail.php:705
3576
  #: classes/gateways/class.pmprogateway_braintree.php:489
3577
+ #: classes/gateways/class.pmprogateway_stripe.php:661 pages/checkout.php:70
3578
  #: pages/checkout.php:76 pages/checkout.php:498 pages/confirmation.php:58
3579
  #: pages/invoice.php:33 classes/class.pmproemail.php:216
3580
  #: classes/class.pmproemail.php:218 classes/class.pmproemail.php:225
3618
  #: classes/gateways/class.pmprogateway_stripe.php:573
3619
  #: classes/gateways/class.pmprogateway_stripe.php:611
3620
  #: classes/gateways/class.pmprogateway_stripe.php:638
3621
+ #: classes/gateways/class.pmprogateway_stripe.php:644
3622
+ #: classes/gateways/class.pmprogateway_stripe.php:660 pages/checkout.php:66
3623
  #: pages/checkout.php:67 pages/checkout.php:68 pages/checkout.php:70
3624
  #: pages/checkout.php:75 pages/checkout.php:76 pages/checkout.php:77
3625
  #: pages/checkout.php:78 pages/checkout.php:83 pages/checkout.php:85
3633
  msgid "Discount Code"
3634
  msgstr ""
3635
 
3636
+ #: classes/class.pmproemail.php:301 classes/class.pmproemail.php:397
3637
+ #: classes/class.pmproemail.php:712 classes/class.pmproemail.php:241
3638
  #: classes/class.pmproemail.php:243 classes/class.pmproemail.php:253
3639
  #: classes/class.pmproemail.php:256 classes/class.pmproemail.php:265
3640
  #: classes/class.pmproemail.php:285 classes/class.pmproemail.php:294
3650
  msgid "This membership will expire on %s."
3651
  msgstr ""
3652
 
3653
+ #: classes/class.pmproemail.php:323 classes/class.pmproemail.php:263
3654
  #: classes/class.pmproemail.php:265 classes/class.pmproemail.php:275
3655
  #: classes/class.pmproemail.php:278 classes/class.pmproemail.php:287
3656
  #: classes/class.pmproemail.php:307 classes/class.pmproemail.php:316
3658
  msgid "Member Checkout for %s at %s"
3659
  msgstr ""
3660
 
3661
+ #: classes/class.pmproemail.php:414 classes/class.pmproemail.php:375
3662
  #: classes/class.pmproemail.php:395 classes/class.pmproemail.php:407
3663
  #, php-format
3664
  msgid "Your billing information has been updated at %s"
3665
  msgstr ""
3666
 
3667
+ #: classes/class.pmproemail.php:468 classes/class.pmproemail.php:428
3668
  #: classes/class.pmproemail.php:448 classes/class.pmproemail.php:461
3669
  #, php-format
3670
  msgid "Billing information has been updated for %s at %s"
3671
  msgstr ""
3672
 
3673
+ #: classes/class.pmproemail.php:517 classes/class.pmproemail.php:425
3674
  #: classes/class.pmproemail.php:430 classes/class.pmproemail.php:464
3675
  #: classes/class.pmproemail.php:467 classes/class.pmproemail.php:476
3676
  #: classes/class.pmproemail.php:496 classes/class.pmproemail.php:510
3678
  msgid "Membership Payment Failed at %s"
3679
  msgstr ""
3680
 
3681
+ #: classes/class.pmproemail.php:564 classes/class.pmproemail.php:462
3682
  #: classes/class.pmproemail.php:468 classes/class.pmproemail.php:510
3683
  #: classes/class.pmproemail.php:513 classes/class.pmproemail.php:522
3684
  #: classes/class.pmproemail.php:542 classes/class.pmproemail.php:557
3686
  msgid "Membership Payment Failed For %s at %s"
3687
  msgstr ""
3688
 
3689
+ #: classes/class.pmproemail.php:612 classes/class.pmproemail.php:508
3690
  #: classes/class.pmproemail.php:557 classes/class.pmproemail.php:560
3691
  #: classes/class.pmproemail.php:569 classes/class.pmproemail.php:589
3692
  #: classes/class.pmproemail.php:605
3694
  msgid "Credit Card on File Expiring Soon at %s"
3695
  msgstr ""
3696
 
3697
+ #: classes/class.pmproemail.php:663 classes/class.pmproemail.php:501
3698
  #: classes/class.pmproemail.php:548 classes/class.pmproemail.php:605
3699
  #: classes/class.pmproemail.php:608 classes/class.pmproemail.php:617
3700
  #: classes/class.pmproemail.php:619 classes/class.pmproemail.php:639
3703
  msgid "INVOICE for %s membership"
3704
  msgstr ""
3705
 
3706
+ #: classes/class.pmproemail.php:740 classes/class.pmproemail.php:563
3707
  #: classes/class.pmproemail.php:611 classes/class.pmproemail.php:676
3708
  #: classes/class.pmproemail.php:679 classes/class.pmproemail.php:688
3709
  #: classes/class.pmproemail.php:690 classes/class.pmproemail.php:710
3712
  msgid "Your trial at %s is ending soon"
3713
  msgstr ""
3714
 
3715
+ #: classes/class.pmproemail.php:776 classes/class.pmproemail.php:596
3716
  #: classes/class.pmproemail.php:645 classes/class.pmproemail.php:710
3717
  #: classes/class.pmproemail.php:713 classes/class.pmproemail.php:722
3718
  #: classes/class.pmproemail.php:724 classes/class.pmproemail.php:744
3721
  msgid "Your membership at %s has ended"
3722
  msgstr ""
3723
 
3724
+ #: classes/class.pmproemail.php:803 classes/class.pmproemail.php:621
3725
  #: classes/class.pmproemail.php:670 classes/class.pmproemail.php:735
3726
  #: classes/class.pmproemail.php:738 classes/class.pmproemail.php:747
3727
  #: classes/class.pmproemail.php:749 classes/class.pmproemail.php:769
3730
  msgid "Your membership at %s will end soon"
3731
  msgstr ""
3732
 
3733
+ #: classes/class.pmproemail.php:825 classes/class.pmproemail.php:641
3734
  #: classes/class.pmproemail.php:690 classes/class.pmproemail.php:755
3735
  #: classes/class.pmproemail.php:758 classes/class.pmproemail.php:767
3736
  #: classes/class.pmproemail.php:769 classes/class.pmproemail.php:789
3739
  msgid "Your membership at %s has been changed"
3740
  msgstr ""
3741
 
3742
+ #: classes/class.pmproemail.php:830 classes/class.pmproemail.php:870
3743
  #: classes/class.pmproemail.php:759 classes/class.pmproemail.php:762
3744
  #: classes/class.pmproemail.php:771 classes/class.pmproemail.php:773
3745
  #: classes/class.pmproemail.php:793 classes/class.pmproemail.php:800
3750
  msgid "The new level is %s"
3751
  msgstr ""
3752
 
3753
+ #: classes/class.pmproemail.php:832 classes/class.pmproemail.php:647
3754
  #: classes/class.pmproemail.php:696 classes/class.pmproemail.php:761
3755
  #: classes/class.pmproemail.php:764 classes/class.pmproemail.php:773
3756
  #: classes/class.pmproemail.php:775 classes/class.pmproemail.php:795
3758
  msgid "Your membership has been cancelled"
3759
  msgstr ""
3760
 
3761
+ #: classes/class.pmproemail.php:836 classes/class.pmproemail.php:876
3762
  #: classes/class.pmproemail.php:651 classes/class.pmproemail.php:689
3763
  #: classes/class.pmproemail.php:700 classes/class.pmproemail.php:738
3764
  #: classes/class.pmproemail.php:765 classes/class.pmproemail.php:768
3772
  msgid "This membership will expire on %s"
3773
  msgstr ""
3774
 
3775
+ #: classes/class.pmproemail.php:840 classes/class.pmproemail.php:880
3776
  #: classes/class.pmproemail.php:655 classes/class.pmproemail.php:693
3777
  #: classes/class.pmproemail.php:704 classes/class.pmproemail.php:742
3778
  #: classes/class.pmproemail.php:769 classes/class.pmproemail.php:772
3785
  msgid "This membership does not expire"
3786
  msgstr ""
3787
 
3788
+ #: classes/class.pmproemail.php:866 classes/class.pmproemail.php:679
3789
  #: classes/class.pmproemail.php:728 classes/class.pmproemail.php:793
3790
  #: classes/class.pmproemail.php:796 classes/class.pmproemail.php:805
3791
  #: classes/class.pmproemail.php:806 classes/class.pmproemail.php:807
3794
  msgid "Membership for %s at %s has been changed"
3795
  msgstr ""
3796
 
3797
+ #: classes/class.pmproemail.php:872 classes/class.pmproemail.php:799
3798
  #: classes/class.pmproemail.php:802 classes/class.pmproemail.php:811
3799
  #: classes/class.pmproemail.php:812 classes/class.pmproemail.php:813
3800
  #: classes/class.pmproemail.php:832 classes/class.pmproemail.php:865
3801
  msgid "Membership has been cancelled"
3802
  msgstr ""
3803
 
3804
+ #: classes/class.pmproemail.php:911 classes/class.pmproemail.php:848
3805
  #: classes/class.pmproemail.php:849 classes/class.pmproemail.php:850
3806
  #: classes/class.pmproemail.php:869 classes/class.pmproemail.php:904
3807
  msgid "Invoice for Order #: "
3808
  msgstr ""
3809
 
3810
+ #: classes/class.pmproemail.php:955 classes/class.pmproemail.php:948
3811
  msgid ""
3812
  "<p>An administrator at !!sitename!! has changed your membership level.</p>\n"
3813
  "\n"
4086
  msgstr ""
4087
 
4088
  #: classes/gateways/class.pmprogateway_braintree.php:313
4089
+ #: classes/gateways/class.pmprogateway_stripe.php:306
4090
  #: adminpages/paymentsettings.php:462 adminpages/paymentsettings.php:470
4091
  #: adminpages/paymentsettings.php:503 adminpages/paymentsettings.php:509
4092
  #: adminpages/paymentsettings.php:511 adminpages/paymentsettings.php:517
4108
  #: classes/gateways/class.pmprogateway_stripe.php:230
4109
  #: classes/gateways/class.pmprogateway_stripe.php:257
4110
  #: classes/gateways/class.pmprogateway_stripe.php:289
4111
+ #: classes/gateways/class.pmprogateway_stripe.php:305
4112
  msgid "Web Hook URL"
4113
  msgstr ""
4114
 
4126
  msgstr ""
4127
 
4128
  #: classes/gateways/class.pmprogateway_braintree.php:434
4129
+ #: classes/gateways/class.pmprogateway_stripe.php:578 pages/checkout.php:411
4130
  #: classes/gateways/class.pmprogateway_braintree.php:270
4131
  #: classes/gateways/class.pmprogateway_braintree.php:283
4132
  #: classes/gateways/class.pmprogateway_braintree.php:285
4149
  #: classes/gateways/class.pmprogateway_stripe.php:461
4150
  #: classes/gateways/class.pmprogateway_stripe.php:499
4151
  #: classes/gateways/class.pmprogateway_stripe.php:526
4152
+ #: classes/gateways/class.pmprogateway_stripe.php:561
4153
+ #: classes/gateways/class.pmprogateway_stripe.php:577 pages/checkout.php:411
4154
  #: pages/checkout.php:476 pages/checkout.php:478 pages/checkout.php:485
4155
  #: pages/checkout.php:493 pages/checkout.php:494 pages/checkout.php:500
4156
  #: pages/checkout.php:501 pages/checkout.php:503 pages/checkout.php:510
4159
  msgstr ""
4160
 
4161
  #: classes/gateways/class.pmprogateway_braintree.php:435
4162
+ #: classes/gateways/class.pmprogateway_stripe.php:579 pages/checkout.php:412
4163
  #: classes/gateways/class.pmprogateway_braintree.php:270
4164
  #: classes/gateways/class.pmprogateway_braintree.php:283
4165
  #: classes/gateways/class.pmprogateway_braintree.php:285
4182
  #: classes/gateways/class.pmprogateway_stripe.php:462
4183
  #: classes/gateways/class.pmprogateway_stripe.php:500
4184
  #: classes/gateways/class.pmprogateway_stripe.php:527
4185
+ #: classes/gateways/class.pmprogateway_stripe.php:562
4186
+ #: classes/gateways/class.pmprogateway_stripe.php:578 pages/checkout.php:412
4187
  #: pages/checkout.php:476 pages/checkout.php:478 pages/checkout.php:485
4188
  #: pages/checkout.php:493 pages/checkout.php:494 pages/checkout.php:500
4189
  #: pages/checkout.php:502 pages/checkout.php:504 pages/checkout.php:511
4193
  msgstr ""
4194
 
4195
  #: classes/gateways/class.pmprogateway_braintree.php:455
4196
+ #: classes/gateways/class.pmprogateway_stripe.php:626 pages/billing.php:313
4197
+ #: pages/checkout.php:459 classes/gateways/class.pmprogateway_braintree.php:303
 
4198
  #: classes/gateways/class.pmprogateway_braintree.php:316
4199
  #: classes/gateways/class.pmprogateway_braintree.php:318
4200
  #: classes/gateways/class.pmprogateway_braintree.php:321
4215
  #: classes/gateways/class.pmprogateway_stripe.php:527
4216
  #: classes/gateways/class.pmprogateway_stripe.php:565
4217
  #: classes/gateways/class.pmprogateway_stripe.php:592
4218
+ #: classes/gateways/class.pmprogateway_stripe.php:609
4219
+ #: classes/gateways/class.pmprogateway_stripe.php:625 pages/billing.php:244
4220
  #: pages/billing.php:248 pages/billing.php:257 pages/billing.php:260
4221
  #: pages/billing.php:263 pages/billing.php:305 pages/billing.php:311
4222
  #: pages/billing.php:312 pages/billing.php:313 pages/billing.php:314
4261
  msgstr ""
4262
 
4263
  #: classes/gateways/class.pmprogateway_braintree.php:484
4264
+ #: classes/gateways/class.pmprogateway_stripe.php:656 pages/billing.php:353
4265
+ #: pages/checkout.php:493 classes/gateways/class.pmprogateway_braintree.php:341
 
4266
  #: classes/gateways/class.pmprogateway_braintree.php:354
4267
  #: classes/gateways/class.pmprogateway_braintree.php:356
4268
  #: classes/gateways/class.pmprogateway_braintree.php:359
4283
  #: classes/gateways/class.pmprogateway_stripe.php:565
4284
  #: classes/gateways/class.pmprogateway_stripe.php:603
4285
  #: classes/gateways/class.pmprogateway_stripe.php:630
4286
+ #: classes/gateways/class.pmprogateway_stripe.php:639
4287
+ #: classes/gateways/class.pmprogateway_stripe.php:655 pages/billing.php:282
4288
  #: pages/billing.php:286 pages/billing.php:295 pages/billing.php:298
4289
  #: pages/billing.php:302 pages/billing.php:344 pages/billing.php:352
4290
  #: pages/billing.php:353 pages/billing.php:355 pages/billing.php:358
4297
  msgstr ""
4298
 
4299
  #: classes/gateways/class.pmprogateway_braintree.php:491
4300
+ #: classes/gateways/class.pmprogateway_stripe.php:663 pages/checkout.php:78
4301
+ #: pages/checkout.php:500 classes/gateways/class.pmprogateway_braintree.php:351
 
4302
  #: classes/gateways/class.pmprogateway_braintree.php:364
4303
  #: classes/gateways/class.pmprogateway_braintree.php:366
4304
  #: classes/gateways/class.pmprogateway_braintree.php:369
4320
  #: classes/gateways/class.pmprogateway_stripe.php:575
4321
  #: classes/gateways/class.pmprogateway_stripe.php:613
4322
  #: classes/gateways/class.pmprogateway_stripe.php:640
4323
+ #: classes/gateways/class.pmprogateway_stripe.php:646
4324
+ #: classes/gateways/class.pmprogateway_stripe.php:662 pages/checkout.php:78
4325
  #: pages/checkout.php:79 pages/checkout.php:80 pages/checkout.php:87
4326
  #: pages/checkout.php:88 pages/checkout.php:95 pages/checkout.php:98
4327
  #: pages/checkout.php:500 pages/checkout.php:551 pages/checkout.php:567
4359
  msgstr ""
4360
 
4361
  #: classes/gateways/class.pmprogateway_braintree.php:554
4362
+ #: classes/gateways/class.pmprogateway_stripe.php:1140
4363
  #: classes/gateways/class.pmprogateway_braintree.php:61
4364
  #: classes/gateways/class.pmprogateway_braintree.php:406
4365
  #: classes/gateways/class.pmprogateway_braintree.php:419
4384
  #: classes/gateways/class.pmprogateway_stripe.php:1094
4385
  #: classes/gateways/class.pmprogateway_stripe.php:1105
4386
  #: classes/gateways/class.pmprogateway_stripe.php:1123
4387
+ #: classes/gateways/class.pmprogateway_stripe.php:1139
4388
  #: classes/gateways/class.pmprogateway_stripe.php:1143
4389
  #: classes/gateways/class.pmprogateway_stripe.php:1176
4390
  msgid "Unknown error: Initial payment failed."
5028
  #: classes/gateways/class.pmprogateway_stripe.php:208
5029
  #: classes/gateways/class.pmprogateway_stripe.php:210
5030
  #: classes/gateways/class.pmprogateway_stripe.php:237
5031
+ #: classes/gateways/class.pmprogateway_stripe.php:261
5032
  #: classes/gateways/class.pmprogateway_stripe.php:269
5033
  msgid "Publishable Key"
5034
  msgstr ""
5035
 
5036
+ #: classes/gateways/class.pmprogateway_stripe.php:269
5037
  #: classes/gateways/class.pmprogateway_stripe.php:269
5038
  msgid "Your Publishable Key appears incorrect."
5039
  msgstr ""
5051
  #: classes/gateways/class.pmprogateway_stripe.php:202
5052
  #: classes/gateways/class.pmprogateway_stripe.php:229
5053
  #: classes/gateways/class.pmprogateway_stripe.php:261
5054
+ #: classes/gateways/class.pmprogateway_stripe.php:277
5055
  msgid "Secret Key"
5056
  msgstr ""
5057
 
5058
+ #: classes/gateways/class.pmprogateway_stripe.php:286
5059
  #: classes/gateways/class.pmprogateway_stripe.php:285
5060
  msgid "Your Secret Key appears incorrect."
5061
  msgstr ""
5062
 
5063
+ #: classes/gateways/class.pmprogateway_stripe.php:294
5064
  #: adminpages/paymentsettings.php:425 adminpages/paymentsettings.php:430
5065
  #: adminpages/paymentsettings.php:432
5066
  #: classes/gateways/class.pmprogateway_stripe.php:169
5073
  #: classes/gateways/class.pmprogateway_stripe.php:218
5074
  #: classes/gateways/class.pmprogateway_stripe.php:245
5075
  #: classes/gateways/class.pmprogateway_stripe.php:277
5076
+ #: classes/gateways/class.pmprogateway_stripe.php:293
5077
  msgid "Show Billing Address Fields"
5078
  msgstr ""
5079
 
5080
+ #: classes/gateways/class.pmprogateway_stripe.php:301
5081
  #: adminpages/paymentsettings.php:437 adminpages/paymentsettings.php:439
5082
  #: classes/gateways/class.pmprogateway_stripe.php:176
5083
  #: classes/gateways/class.pmprogateway_stripe.php:177
5089
  #: classes/gateways/class.pmprogateway_stripe.php:225
5090
  #: classes/gateways/class.pmprogateway_stripe.php:252
5091
  #: classes/gateways/class.pmprogateway_stripe.php:284
5092
+ #: classes/gateways/class.pmprogateway_stripe.php:300
5093
  msgid ""
5094
  "Stripe doesn't require billing address fields. Choose 'No' to hide them on "
5095
  "the checkout page.<br /><strong>If No, make sure you disable address "
5096
  "verification in the Stripe dashboard settings.</strong>"
5097
  msgstr ""
5098
 
5099
+ #: classes/gateways/class.pmprogateway_stripe.php:309
5100
  #: adminpages/paymentsettings.php:465 adminpages/paymentsettings.php:506
5101
  #: adminpages/paymentsettings.php:512 adminpages/paymentsettings.php:514
5102
  #: classes/gateways/class.pmprogateway_stripe.php:184
5109
  #: classes/gateways/class.pmprogateway_stripe.php:233
5110
  #: classes/gateways/class.pmprogateway_stripe.php:260
5111
  #: classes/gateways/class.pmprogateway_stripe.php:292
5112
+ #: classes/gateways/class.pmprogateway_stripe.php:308
5113
  msgid "To fully integrate with Stripe, be sure to set your Web Hook URL to"
5114
  msgstr ""
5115
 
5116
+ #: classes/gateways/class.pmprogateway_stripe.php:655 pages/checkout.php:492
5117
+ #: classes/gateways/class.pmprogateway_stripe.php:638
5118
  #: classes/gateways/class.pmprogateway_stripe.php:654 pages/checkout.php:492
 
5119
  msgid "Security Code (CVC)"
5120
  msgstr ""
5121
 
5122
+ #: classes/gateways/class.pmprogateway_stripe.php:727
5123
  #: classes/gateways/class.pmprogateway_stripe.php:703
5124
  #: classes/gateways/class.pmprogateway_stripe.php:710
5125
+ #: classes/gateways/class.pmprogateway_stripe.php:726
5126
  #, php-format
5127
  msgid ""
5128
  "%1$sNote:%2$s Subscription %3$s%4$s%5$s could not be found at Stripe. It may "
5129
  "have been deleted."
5130
  msgstr ""
5131
 
5132
+ #: classes/gateways/class.pmprogateway_stripe.php:734
5133
  #: classes/gateways/class.pmprogateway_stripe.php:567
5134
  #: classes/gateways/class.pmprogateway_stripe.php:568
5135
  #: classes/gateways/class.pmprogateway_stripe.php:578
5143
  #: classes/gateways/class.pmprogateway_stripe.php:683
5144
  #: classes/gateways/class.pmprogateway_stripe.php:710
5145
  #: classes/gateways/class.pmprogateway_stripe.php:717
5146
+ #: classes/gateways/class.pmprogateway_stripe.php:733
5147
  msgid "Subscription Updates"
5148
  msgstr ""
5149
 
5150
+ #: classes/gateways/class.pmprogateway_stripe.php:738
5151
  #: classes/gateways/class.pmprogateway_stripe.php:571
5152
  #: classes/gateways/class.pmprogateway_stripe.php:572
5153
  #: classes/gateways/class.pmprogateway_stripe.php:582
5161
  #: classes/gateways/class.pmprogateway_stripe.php:687
5162
  #: classes/gateways/class.pmprogateway_stripe.php:714
5163
  #: classes/gateways/class.pmprogateway_stripe.php:721
5164
+ #: classes/gateways/class.pmprogateway_stripe.php:737
5165
  msgid ""
5166
  "Subscription updates, allow you to change the member's subscription values "
5167
  "at predefined times. Be sure to click Update Profile after making changes."
5168
  msgstr ""
5169
 
5170
+ #: classes/gateways/class.pmprogateway_stripe.php:740
5171
  #: classes/gateways/class.pmprogateway_stripe.php:573
5172
  #: classes/gateways/class.pmprogateway_stripe.php:574
5173
  #: classes/gateways/class.pmprogateway_stripe.php:584
5181
  #: classes/gateways/class.pmprogateway_stripe.php:689
5182
  #: classes/gateways/class.pmprogateway_stripe.php:716
5183
  #: classes/gateways/class.pmprogateway_stripe.php:723
5184
+ #: classes/gateways/class.pmprogateway_stripe.php:739
5185
  msgid ""
5186
  "Subscription updates, allow you to change the member's subscription values "
5187
  "at predefined times. Be sure to click Update User after making changes."
5188
  msgstr ""
5189
 
5190
+ #: classes/gateways/class.pmprogateway_stripe.php:745 pages/billing.php:364
5191
  #: classes/gateways/class.pmprogateway_stripe.php:578
5192
  #: classes/gateways/class.pmprogateway_stripe.php:579
5193
  #: classes/gateways/class.pmprogateway_stripe.php:589
5200
  #: classes/gateways/class.pmprogateway_stripe.php:656
5201
  #: classes/gateways/class.pmprogateway_stripe.php:694
5202
  #: classes/gateways/class.pmprogateway_stripe.php:721
5203
+ #: classes/gateways/class.pmprogateway_stripe.php:728
5204
+ #: classes/gateways/class.pmprogateway_stripe.php:744 pages/billing.php:294
5205
  #: pages/billing.php:298 pages/billing.php:329 pages/billing.php:338
5206
  #: pages/billing.php:341 pages/billing.php:343 pages/billing.php:347
5207
  #: pages/billing.php:363 pages/billing.php:364 pages/billing.php:370
5210
  msgid "Update"
5211
  msgstr ""
5212
 
5213
+ #: classes/gateways/class.pmprogateway_stripe.php:1136
5214
  #: classes/gateways/class.pmprogateway_stripe.php:1119
5215
+ #: classes/gateways/class.pmprogateway_stripe.php:1135
5216
  #: classes/gateways/class.pmprogateway_stripe.php:1172
5217
  msgid "Payment error: Please contact the webmaster (stripe-load-error)"
5218
  msgstr ""
5219
 
5220
+ #: classes/gateways/class.pmprogateway_stripe.php:1374
5221
  #: classes/gateways/class.pmprogateway_stripe.php:190
5222
  #: classes/gateways/class.pmprogateway_stripe.php:192
5223
  #: classes/gateways/class.pmprogateway_stripe.php:199
5238
  #: classes/gateways/class.pmprogateway_stripe.php:1326
5239
  #: classes/gateways/class.pmprogateway_stripe.php:1336
5240
  #: classes/gateways/class.pmprogateway_stripe.php:1357
5241
+ #: classes/gateways/class.pmprogateway_stripe.php:1373
5242
  #: classes/gateways/class.pmprogateway_stripe.php:1374
5243
  #: classes/gateways/class.pmprogateway_stripe.php:1410
5244
  msgid "Error creating customer record with Stripe:"
5245
  msgstr ""
5246
 
5247
+ #: classes/gateways/class.pmprogateway_stripe.php:1433
5248
  #: classes/gateways/class.pmprogateway_stripe.php:1275
5249
  #: classes/gateways/class.pmprogateway_stripe.php:1303
5250
  #: classes/gateways/class.pmprogateway_stripe.php:1313
5255
  #: classes/gateways/class.pmprogateway_stripe.php:1385
5256
  #: classes/gateways/class.pmprogateway_stripe.php:1395
5257
  #: classes/gateways/class.pmprogateway_stripe.php:1416
5258
+ #: classes/gateways/class.pmprogateway_stripe.php:1432
5259
  #: classes/gateways/class.pmprogateway_stripe.php:1433
5260
  #: classes/gateways/class.pmprogateway_stripe.php:1469
5261
  msgid "Error getting subscription with Stripe:"
5262
  msgstr ""
5263
 
5264
+ #: classes/gateways/class.pmprogateway_stripe.php:1589
5265
  #: classes/gateways/class.pmprogateway_stripe.php:278
5266
  #: classes/gateways/class.pmprogateway_stripe.php:279
5267
  #: classes/gateways/class.pmprogateway_stripe.php:286
5290
  #: classes/gateways/class.pmprogateway_stripe.php:1541
5291
  #: classes/gateways/class.pmprogateway_stripe.php:1551
5292
  #: classes/gateways/class.pmprogateway_stripe.php:1572
5293
+ #: classes/gateways/class.pmprogateway_stripe.php:1588
5294
  #: classes/gateways/class.pmprogateway_stripe.php:1589
5295
  #: classes/gateways/class.pmprogateway_stripe.php:1625
5296
  msgid "Error creating plan with Stripe:"
5297
  msgstr ""
5298
 
5299
+ #: classes/gateways/class.pmprogateway_stripe.php:1620
5300
  #: classes/gateways/class.pmprogateway_stripe.php:294
5301
  #: classes/gateways/class.pmprogateway_stripe.php:295
5302
  #: classes/gateways/class.pmprogateway_stripe.php:302
5320
  #: classes/gateways/class.pmprogateway_stripe.php:1572
5321
  #: classes/gateways/class.pmprogateway_stripe.php:1582
5322
  #: classes/gateways/class.pmprogateway_stripe.php:1603
5323
+ #: classes/gateways/class.pmprogateway_stripe.php:1619
5324
  #: classes/gateways/class.pmprogateway_stripe.php:1620
5325
  #: classes/gateways/class.pmprogateway_stripe.php:1656
5326
  msgid "Error subscribing customer to plan with Stripe:"
5327
  msgstr ""
5328
 
5329
+ #: classes/gateways/class.pmprogateway_stripe.php:1715
5330
  #: classes/gateways/class.pmprogateway_stripe.php:769
5331
  #: classes/gateways/class.pmprogateway_stripe.php:770
5332
  #: classes/gateways/class.pmprogateway_stripe.php:780
5340
  #: classes/gateways/class.pmprogateway_stripe.php:887
5341
  #: classes/gateways/class.pmprogateway_stripe.php:914
5342
  #: classes/gateways/class.pmprogateway_stripe.php:1698
5343
+ #: classes/gateways/class.pmprogateway_stripe.php:1714
5344
  msgid "Could not cancel the old subscription. Updates have not been processed."
5345
  msgstr ""
5346
 
5347
+ #: classes/gateways/class.pmprogateway_stripe.php:1818
5348
  #: classes/gateways/class.pmprogateway_stripe.php:383
5349
  #: classes/gateways/class.pmprogateway_stripe.php:389
5350
  #: classes/gateways/class.pmprogateway_stripe.php:410
5367
  #: classes/gateways/class.pmprogateway_stripe.php:1716
5368
  #: classes/gateways/class.pmprogateway_stripe.php:1752
5369
  #: classes/gateways/class.pmprogateway_stripe.php:1801
5370
+ #: classes/gateways/class.pmprogateway_stripe.php:1817
5371
  msgid "Could not cancel old subscription."
5372
  msgstr ""
5373
 
5374
+ #: classes/gateways/class.pmprogateway_stripe.php:1835
5375
  #: classes/gateways/class.pmprogateway_stripe.php:1533
5376
  #: classes/gateways/class.pmprogateway_stripe.php:1534
5377
  #: classes/gateways/class.pmprogateway_stripe.php:1535
5391
  #: classes/gateways/class.pmprogateway_stripe.php:1733
5392
  #: classes/gateways/class.pmprogateway_stripe.php:1769
5393
  #: classes/gateways/class.pmprogateway_stripe.php:1818
5394
+ #: classes/gateways/class.pmprogateway_stripe.php:1834
5395
  msgid "Could not find the customer."
5396
  msgstr ""
5397
 
5398
+ #: classes/gateways/class.pmprogateway_stripe.php:1995
5399
  #: classes/gateways/class.pmprogateway_stripe.php:1836
5400
  #: classes/gateways/class.pmprogateway_stripe.php:1837
5401
  #: classes/gateways/class.pmprogateway_stripe.php:1847
5402
  #: classes/gateways/class.pmprogateway_stripe.php:1885
5403
  #: classes/gateways/class.pmprogateway_stripe.php:1921
5404
  #: classes/gateways/class.pmprogateway_stripe.php:1978
5405
+ #: classes/gateways/class.pmprogateway_stripe.php:1994
5406
  msgid "Error: "
5407
  msgstr ""
5408
 
5409
+ #: classes/gateways/class.pmprogateway_stripe.php:2008
5410
  #: classes/gateways/class.pmprogateway_stripe.php:1849
5411
  #: classes/gateways/class.pmprogateway_stripe.php:1850
5412
  #: classes/gateways/class.pmprogateway_stripe.php:1860
5413
  #: classes/gateways/class.pmprogateway_stripe.php:1898
5414
  #: classes/gateways/class.pmprogateway_stripe.php:1934
5415
  #: classes/gateways/class.pmprogateway_stripe.php:1991
5416
+ #: classes/gateways/class.pmprogateway_stripe.php:2007
5417
  #, php-format
5418
  msgid "Error: Unkown error while refunding charge #%s"
5419
  msgstr ""
6827
  msgid "Vietnamese Dong"
6828
  msgstr ""
6829
 
6830
+ #: includes/filters.php:224 includes/filters.php:217
6831
  msgid ""
6832
  "There was a potential issue while setting the 'Profile Start Date' for a "
6833
  "user's subscription at checkout. PayPal does not allow one to set a Profile "
6844
  "situations."
6845
  msgstr ""
6846
 
6847
+ #: includes/filters.php:225
6848
  #, php-format
6849
  msgid ""
6850
+ "User: %1$s<br />Email: %2$s<br />Membership Level: %3$s<br />Order #: "
6851
+ "%4$s<br />Original Profile Start Date: %5$s<br />Adjusted Profile Start "
6852
+ "Date: %6$s<br />Trial Period: %7$s<br />Trial Frequency: %8$s<br />"
6853
  msgstr ""
6854
 
6855
+ #: includes/filters.php:227 includes/filters.php:220
6856
  #, php-format
6857
  msgid "Profile Start Date Issue Detected and Fixed at %s"
6858
  msgstr ""
6859
 
6860
+ #: includes/functions.php:321 includes/functions.php:433
6861
  #: includes/functions.php:160 includes/functions.php:196
6862
  #: includes/functions.php:200 includes/functions.php:202
6863
  #: includes/functions.php:203 includes/functions.php:204
6869
  msgid "The price for membership is <strong>%s</strong> now"
6870
  msgstr ""
6871
 
6872
+ #: includes/functions.php:323 includes/functions.php:435
6873
  #: includes/functions.php:202 includes/functions.php:204
6874
  #: includes/functions.php:205 includes/functions.php:206
6875
  #: includes/functions.php:209 includes/functions.php:245
6880
  msgid "<strong>%s</strong> now"
6881
  msgstr ""
6882
 
6883
+ #: includes/functions.php:330
 
 
 
 
 
 
6884
  #, php-format
6885
+ msgid " and then <strong>%1$s per %2$s for %3$d more %4$s</strong>."
6886
  msgstr ""
6887
 
6888
+ #: includes/functions.php:332
 
 
6889
  #, php-format
6890
+ msgid " and then <strong>%1$s every %2$d %3$s for %4$d more payments</strong>."
6891
  msgstr ""
6892
 
6893
+ #: includes/functions.php:335
 
 
 
 
 
 
6894
  #, php-format
6895
+ msgid " and then <strong>%1$s after %2$d %3$s</strong>."
6896
  msgstr ""
6897
 
6898
+ #: includes/functions.php:340
 
 
 
 
 
6899
  #, php-format
6900
+ msgid "The price for membership is <strong>%1$s per %2$s</strong>."
6901
  msgstr ""
6902
 
6903
+ #: includes/functions.php:342
 
 
 
 
6904
  #, php-format
6905
+ msgid "<strong>%1$s per %2$s</strong>."
6906
  msgstr ""
6907
 
6908
+ #: includes/functions.php:346
 
 
 
 
 
6909
  #, php-format
6910
+ msgid "The price for membership is <strong>%1$s every %2$d %3$s</strong>."
6911
  msgstr ""
6912
 
6913
+ #: includes/functions.php:348
 
 
 
 
6914
  #, php-format
6915
+ msgid "<strong>%1$s every %2$d %3$s</strong>."
6916
  msgstr ""
6917
 
6918
+ #: includes/functions.php:353
 
 
 
 
 
 
 
6919
  #, php-format
6920
+ msgid " and then <strong>%1$s per %2$s</strong>."
6921
  msgstr ""
6922
 
6923
+ #: includes/functions.php:355
 
 
 
 
 
 
 
6924
  #, php-format
6925
+ msgid " and then <strong>%1$s every %2$d %3$s</strong>."
6926
  msgstr ""
6927
 
6928
+ #: includes/functions.php:370 includes/functions.php:202
6929
  #: includes/functions.php:238 includes/functions.php:249
6930
  #: includes/functions.php:260 includes/functions.php:261
6931
  #: includes/functions.php:262 includes/functions.php:264
6936
  msgid "After your initial payment, your first payment is Free."
6937
  msgstr ""
6938
 
6939
+ #: includes/functions.php:372 includes/functions.php:206
6940
  #: includes/functions.php:242 includes/functions.php:253
6941
  #: includes/functions.php:264 includes/functions.php:265
6942
  #: includes/functions.php:266 includes/functions.php:268
6948
  msgid "After your initial payment, your first %d payments are Free."
6949
  msgstr ""
6950
 
6951
+ #: includes/functions.php:376 includes/functions.php:213
6952
  #: includes/functions.php:249 includes/functions.php:260
6953
  #: includes/functions.php:271 includes/functions.php:272
6954
  #: includes/functions.php:273 includes/functions.php:275
6960
  msgid "After your initial payment, your first payment will cost %s."
6961
  msgstr ""
6962
 
6963
+ #: includes/functions.php:378
 
 
 
 
 
 
 
6964
  #, php-format
6965
+ msgid "After your initial payment, your first %1$d payments will cost %2$s."
6966
  msgstr ""
6967
 
6968
+ #: includes/functions.php:388 includes/functions.php:489
 
 
 
 
 
 
 
 
6969
  #, php-format
6970
+ msgid "Customers in %1$s will be charged %2$s%% tax."
6971
  msgstr ""
6972
 
6973
+ #: includes/functions.php:446
 
6974
  #, php-format
6975
+ msgid "<strong>%1$s per %2$s for %3$d more %4$s</strong>"
6976
  msgstr ""
6977
 
6978
+ #: includes/functions.php:448
 
6979
  #, php-format
6980
+ msgid "<strong>%1$s every %2$d %3$s for %4$d more payments</strong>"
6981
  msgstr ""
6982
 
6983
+ #: includes/functions.php:451
 
6984
  #, php-format
6985
+ msgid "<strong>%1$s after %2$d %3$s</strong>"
6986
  msgstr ""
6987
 
6988
+ #: includes/functions.php:454
 
6989
  #, php-format
6990
+ msgid "<strong>%1$s every %2$s</strong>"
6991
  msgstr ""
6992
 
6993
+ #: includes/functions.php:456
 
6994
  #, php-format
6995
+ msgid "<strong>%1$s every %2$d %3$s</strong>"
6996
  msgstr ""
6997
 
6998
+ #: includes/functions.php:478 includes/functions.php:511
6999
  #: includes/functions.php:520
7000
  msgid "Trial pricing has been applied to the first payment."
7001
  msgstr ""
7002
 
7003
+ #: includes/functions.php:480 includes/functions.php:513
7004
  #: includes/functions.php:522
7005
  #, php-format
7006
  msgid "Trial pricing has been applied to the first %d payments."
7007
  msgstr ""
7008
 
7009
+ #: includes/functions.php:505
 
 
 
 
 
 
 
7010
  #, php-format
7011
+ msgid "Membership expires after %1$d %2$s."
7012
  msgstr ""
7013
 
7014
+ #: includes/functions.php:524
 
7015
  #, php-format
7016
+ msgid "%1$s membership expires after %2$d %3$s"
7017
  msgstr ""
7018
 
7019
+ #: includes/functions.php:877 includes/functions.php:491
7020
  #: includes/functions.php:514 includes/functions.php:525
7021
  #: includes/functions.php:536 includes/functions.php:537
7022
  #: includes/functions.php:538 includes/functions.php:545
7029
  msgid "User ID not found."
7030
  msgstr ""
7031
 
7032
+ #: includes/functions.php:889
7033
+ msgid "No membership_id specified in pmpro_changeMembershipLevel."
7034
+ msgstr ""
7035
+
7036
+ #: includes/functions.php:895 includes/functions.php:903
7037
+ #: includes/functions.php:508 includes/functions.php:531
7038
+ #: includes/functions.php:542 includes/functions.php:553
7039
+ #: includes/functions.php:554 includes/functions.php:555
7040
+ #: includes/functions.php:562 includes/functions.php:586
7041
+ #: includes/functions.php:587 includes/functions.php:589
7042
+ #: includes/functions.php:596 includes/functions.php:612
7043
+ #: includes/functions.php:635 includes/functions.php:714
7044
+ #: includes/functions.php:780 includes/functions.php:786
7045
+ #: includes/functions.php:965 includes/functions.php:967
7046
+ #: includes/functions.php:976
7047
  msgid "Invalid level."
7048
  msgstr ""
7049
 
7050
+ #: includes/functions.php:914 includes/functions.php:520
7051
  #: includes/functions.php:542 includes/functions.php:553
7052
  #: includes/functions.php:564 includes/functions.php:565
7053
  #: includes/functions.php:566 includes/functions.php:573
7060
  msgid "not changing?"
7061
  msgstr ""
7062
 
7063
+ #: includes/functions.php:970 includes/functions.php:537
7064
  #: includes/functions.php:559 includes/functions.php:570
7065
  #: includes/functions.php:581 includes/functions.php:582
7066
  #: includes/functions.php:583 includes/functions.php:590
7088
  msgid "Error interacting with database"
7089
  msgstr ""
7090
 
7091
+ #: includes/functions.php:1067 includes/functions.php:907
7092
  #: includes/functions.php:1123 includes/functions.php:1127
7093
  #: includes/functions.php:1129 includes/functions.php:1138
7094
  #, php-format
7095
  msgid "Error interacting with database: %s"
7096
  msgstr ""
7097
 
7098
+ #: includes/functions.php:1141 includes/functions.php:1179
7099
  #: includes/functions.php:629 includes/functions.php:651
7100
  #: includes/functions.php:667 includes/functions.php:668
7101
  #: includes/functions.php:678 includes/functions.php:681
7121
  msgid "Membership level not found."
7122
  msgstr ""
7123
 
7124
+ #: includes/functions.php:1533 includes/functions.php:1100
7125
  #: includes/functions.php:1101 includes/functions.php:1118
7126
  #: includes/functions.php:1142 includes/functions.php:1143
7127
  #: includes/functions.php:1150 includes/functions.php:1157
7133
  msgid "No code was given to check."
7134
  msgstr ""
7135
 
7136
+ #: includes/functions.php:1542 includes/functions.php:1050
7137
  #: includes/functions.php:1072 includes/functions.php:1088
7138
  #: includes/functions.php:1099 includes/functions.php:1102
7139
  #: includes/functions.php:1109 includes/functions.php:1110
7149
  msgid "The discount code could not be found."
7150
  msgstr ""
7151
 
7152
+ #: includes/functions.php:1557 includes/functions.php:1066
7153
  #: includes/functions.php:1088 includes/functions.php:1104
7154
  #: includes/functions.php:1115 includes/functions.php:1118
7155
  #: includes/functions.php:1124 includes/functions.php:1125
7166
  msgid "This discount code goes into effect on %s."
7167
  msgstr ""
7168
 
7169
+ #: includes/functions.php:1564 includes/functions.php:1075
7170
  #: includes/functions.php:1097 includes/functions.php:1113
7171
  #: includes/functions.php:1124 includes/functions.php:1127
7172
  #: includes/functions.php:1131 includes/functions.php:1132
7183
  msgid "This discount code expired on %s."
7184
  msgstr ""
7185
 
7186
+ #: includes/functions.php:1573 includes/functions.php:1087
7187
  #: includes/functions.php:1109 includes/functions.php:1125
7188
  #: includes/functions.php:1136 includes/functions.php:1139
7189
  #: includes/functions.php:1141 includes/functions.php:1142
7199
  msgid "This discount code is no longer valid."
7200
  msgstr ""
7201
 
7202
+ #: includes/functions.php:1592 includes/functions.php:1102
7203
  #: includes/functions.php:1124 includes/functions.php:1140
7204
  #: includes/functions.php:1151 includes/functions.php:1154
7205
  #: includes/functions.php:1155 includes/functions.php:1164
7214
  msgid "This discount code does not apply to this membership level."
7215
  msgstr ""
7216
 
7217
+ #: includes/functions.php:1630 includes/functions.php:1110
7218
  #: includes/functions.php:1132 includes/functions.php:1148
7219
  #: includes/functions.php:1159 includes/functions.php:1162
7220
  #: includes/functions.php:1172 includes/functions.php:1180
7230
  msgid "This discount code is okay."
7231
  msgstr ""
7232
 
7233
+ #: includes/functions.php:1658 includes/functions.php:1134
7234
  #: includes/functions.php:1156 includes/functions.php:1172
7235
  #: includes/functions.php:1183 includes/functions.php:1186
7236
  #: includes/functions.php:1196 includes/functions.php:1205
7246
  msgid "and"
7247
  msgstr ""
7248
 
7249
+ #: includes/functions.php:1977 includes/functions.php:1319
7250
  #: includes/functions.php:1341 includes/functions.php:1361
7251
  #: includes/functions.php:1372 includes/functions.php:1375
7252
  #: includes/functions.php:1385 includes/functions.php:1394
7259
  #: includes/functions.php:1697 includes/functions.php:1703
7260
  #: includes/functions.php:2015 includes/functions.php:2019
7261
  #: includes/functions.php:2022 includes/functions.php:2024
7262
+ #: includes/functions.php:2033 includes/functions.php:2034
7263
  msgid "Sign Up for !!name!! Now"
7264
  msgstr ""
7265
 
7266
+ #: includes/functions.php:1985 includes/functions.php:1325
7267
  #: includes/functions.php:1347 includes/functions.php:1367
7268
  #: includes/functions.php:1378 includes/functions.php:1381
7269
  #: includes/functions.php:1391 includes/functions.php:1400
7276
  #: includes/functions.php:1703 includes/functions.php:1709
7277
  #: includes/functions.php:2021 includes/functions.php:2025
7278
  #: includes/functions.php:2028 includes/functions.php:2030
7279
+ #: includes/functions.php:2039 includes/functions.php:2040
7280
  msgid "Please specify a level id."
7281
  msgstr ""
7282
 
7283
+ #: includes/functions.php:1991 includes/functions.php:2046
7284
+ #: includes/functions.php:2047
7285
  #, php-format
7286
  msgid "Level #%s not found."
7287
  msgstr ""
7536
  #: pages/billing.php:27 pages/billing.php:28 pages/billing.php:30
7537
  #: pages/billing.php:44 pages/billing.php:45 pages/cancel.php:52
7538
  #: pages/cancel.php:60 pages/cancel.php:61 pages/invoice.php:89
7539
+ #: pages/invoice.php:102 pages/invoice.php:109 pages/levels.php:13
7540
+ #: pages/levels.php:35 shortcodes/pmpro_account.php:43
7541
+ #: shortcodes/pmpro_account.php:44 shortcodes/pmpro_account.php:123
7542
+ #: shortcodes/pmpro_account.php:125 shortcodes/pmpro_account.php:126
7543
+ #: shortcodes/pmpro_account.php:128
7544
  msgid "Level"
7545
  msgstr ""
7546
 
7731
  msgid "We accept %s"
7732
  msgstr ""
7733
 
7734
+ #: pages/billing.php:385 pages/billing.php:309 pages/billing.php:313
7735
  #: pages/billing.php:344 pages/billing.php:353 pages/billing.php:356
7736
  #: pages/billing.php:360 pages/billing.php:364 pages/billing.php:380
7737
  #: pages/billing.php:381 pages/billing.php:387 pages/billing.php:408
7957
  #: pages/confirmation.php:45 pages/confirmation.php:46
7958
  #: pages/confirmation.php:52 pages/confirmation.php:102
7959
  #: pages/confirmation.php:104 pages/confirmation.php:112
7960
+ #: pages/confirmation.php:115 pages/confirmation.php:123 pages/invoice.php:26
7961
+ #: pages/invoice.php:27
7962
  msgid "Account"
7963
  msgstr ""
7964
 
7970
 
7971
  #: pages/confirmation.php:79 pages/invoice.php:61 pages/account.php:105
7972
  #: pages/account.php:109 pages/confirmation.php:61 pages/confirmation.php:63
7973
+ #: pages/confirmation.php:69 pages/confirmation.php:79
7974
+ #: pages/confirmation.php:82 pages/invoice.php:48 pages/invoice.php:50
7975
+ #: pages/invoice.php:61
7976
  msgid "Payment Method"
7977
  msgstr ""
7978
 
7985
 
7986
  #: pages/confirmation.php:88 pages/invoice.php:70 pages/invoice.php:103
7987
  #: pages/confirmation.php:61 pages/confirmation.php:63
7988
+ #: pages/confirmation.php:65 pages/confirmation.php:71
7989
+ #: pages/confirmation.php:88 pages/invoice.php:50 pages/invoice.php:52
7990
+ #: pages/invoice.php:70 pages/invoice.php:90 pages/invoice.php:103
7991
+ #: pages/invoice.php:107 pages/invoice.php:109 pages/invoice.php:110
7992
  msgid "Total Billed"
7993
  msgstr ""
7994
 
7995
+ #: pages/confirmation.php:94 pages/invoice.php:76 pages/confirmation.php:94
7996
+ #: pages/invoice.php:76 pages/invoice.php:80 pages/invoice.php:82
7997
  msgid "Coupon"
7998
  msgstr ""
7999
 
8000
  #: pages/confirmation.php:111 pages/confirmation.php:97
8001
  #: pages/confirmation.php:100 pages/confirmation.php:103
8002
+ #: pages/confirmation.php:111
8003
  #, php-format
8004
  msgid ""
8005
  "Below are details about your membership account. A welcome email has been "
8008
 
8009
  #: pages/confirmation.php:124 pages/confirmation.php:103
8010
  #: pages/confirmation.php:105 pages/confirmation.php:113
8011
+ #: pages/confirmation.php:116 pages/confirmation.php:124
8012
  msgid "Pending"
8013
  msgstr ""
8014
 
8015
  #: pages/confirmation.php:132 pages/invoice.php:134 pages/confirmation.php:111
8016
  #: pages/confirmation.php:113 pages/confirmation.php:121
8017
+ #: pages/confirmation.php:124 pages/confirmation.php:132 pages/invoice.php:121
8018
+ #: pages/invoice.php:134 pages/invoice.php:139 pages/invoice.php:141
8019
  msgid "View Your Membership Account &rarr;"
8020
  msgstr ""
8021
 
8022
  #: pages/confirmation.php:134 pages/confirmation.php:113
8023
  #: pages/confirmation.php:115 pages/confirmation.php:123
8024
+ #: pages/confirmation.php:126 pages/confirmation.php:134
8025
  msgid ""
8026
  "If your account is not activated within a few minutes, please contact the "
8027
  "site owner."
8028
  msgstr ""
8029
 
8030
+ #: pages/invoice.php:101 pages/invoice.php:88 pages/invoice.php:101
8031
+ #: pages/invoice.php:106 pages/invoice.php:108
8032
  msgid "Invoice #"
8033
  msgstr ""
8034
 
8035
+ #: pages/invoice.php:127 pages/invoice.php:114 pages/invoice.php:127
8036
+ #: pages/invoice.php:132 pages/invoice.php:134
8037
  msgid "No invoices found."
8038
  msgstr ""
8039
 
8040
+ #: pages/invoice.php:138 pages/invoice.php:125 pages/invoice.php:138
8041
+ #: pages/invoice.php:143 pages/invoice.php:145
8042
  msgid "&larr; View All Invoices"
8043
  msgstr ""
8044
 
8112
  msgid "Your membership status has been updated - Thank you!"
8113
  msgstr ""
8114
 
8115
+ #: preheaders/account.php:12 preheaders/levels.php:24 preheaders/account.php:11
8116
+ #: preheaders/account.php:12 preheaders/levels.php:23 preheaders/levels.php:24
 
8117
  msgid ""
8118
  "Sorry, your request could not be completed - please try again in a few "
8119
  "moments."
8120
  msgstr ""
8121
 
8122
  #: preheaders/billing.php:147 preheaders/checkout.php:322
8123
+ #: preheaders/billing.php:145 preheaders/billing.php:147
8124
+ #: preheaders/billing.php:258 preheaders/billing.php:265
8125
+ #: preheaders/billing.php:266 preheaders/billing.php:270
8126
+ #: preheaders/billing.php:273 preheaders/billing.php:279
8127
+ #: preheaders/checkout.php:322 preheaders/checkout.php:332
8128
+ #: preheaders/checkout.php:336 preheaders/checkout.php:364
8129
+ #: preheaders/checkout.php:458 preheaders/checkout.php:464
8130
+ #: preheaders/checkout.php:465 preheaders/checkout.php:470
8131
+ #: preheaders/checkout.php:481 preheaders/checkout.php:482
8132
  msgid "Please complete all required fields."
8133
  msgstr ""
8134
 
8135
  #: preheaders/billing.php:150 preheaders/checkout.php:330
8136
+ #: preheaders/billing.php:148 preheaders/billing.php:150
8137
+ #: preheaders/billing.php:263 preheaders/billing.php:268
8138
+ #: preheaders/billing.php:269 preheaders/billing.php:273
8139
+ #: preheaders/billing.php:276 preheaders/billing.php:284
8140
+ #: preheaders/checkout.php:330 preheaders/checkout.php:340
8141
+ #: preheaders/checkout.php:344 preheaders/checkout.php:372
8142
+ #: preheaders/checkout.php:466 preheaders/checkout.php:473
8143
+ #: preheaders/checkout.php:474 preheaders/checkout.php:478
8144
+ #: preheaders/checkout.php:491 preheaders/checkout.php:492
8145
  msgid "Your email addresses do not match. Please try again."
8146
  msgstr ""
8147
 
8148
  #: preheaders/billing.php:153 preheaders/checkout.php:335
8149
+ #: preheaders/billing.php:151 preheaders/billing.php:153
8150
+ #: preheaders/billing.php:268 preheaders/billing.php:271
8151
+ #: preheaders/billing.php:272 preheaders/billing.php:276
8152
+ #: preheaders/billing.php:279 preheaders/billing.php:289
8153
+ #: preheaders/checkout.php:335 preheaders/checkout.php:345
8154
+ #: preheaders/checkout.php:349 preheaders/checkout.php:377
8155
+ #: preheaders/checkout.php:471 preheaders/checkout.php:478
8156
+ #: preheaders/checkout.php:480 preheaders/checkout.php:483
8157
+ #: preheaders/checkout.php:497 preheaders/checkout.php:498
8158
  msgid "The email address entered is in an invalid format. Please try again."
8159
  msgstr ""
8160
 
8161
  #: preheaders/billing.php:157 preheaders/billing.php:155
8162
+ #: preheaders/billing.php:157 preheaders/billing.php:274
8163
+ #: preheaders/billing.php:275 preheaders/billing.php:276
8164
+ #: preheaders/billing.php:280 preheaders/billing.php:283
8165
+ #: preheaders/billing.php:295
8166
  msgid "All good!"
8167
  msgstr ""
8168
 
8169
  #: preheaders/billing.php:224 preheaders/billing.php:222
8170
+ #: preheaders/billing.php:224 preheaders/billing.php:340
8171
+ #: preheaders/billing.php:345 preheaders/billing.php:346
8172
+ #: preheaders/billing.php:350 preheaders/billing.php:353
8173
+ #: preheaders/billing.php:370
8174
  #, php-format
8175
  msgid "Information updated. <a href=\"%s\">&laquo; back to my account</a>"
8176
  msgstr ""
8177
 
8178
  #: preheaders/billing.php:230 preheaders/billing.php:228
8179
+ #: preheaders/billing.php:230 preheaders/billing.php:347
8180
+ #: preheaders/billing.php:351 preheaders/billing.php:352
8181
+ #: preheaders/billing.php:356 preheaders/billing.php:359
8182
+ #: preheaders/billing.php:378 preheaders/billing.php:380
8183
  msgid "Error updating billing information."
8184
  msgstr ""
8185
 
8469
  msgid "Amount"
8470
  msgstr ""
8471
 
8472
+ #: shortcodes/pmpro_account.php:157 pages/account.php:121 pages/account.php:140
8473
+ #: pages/account.php:144 shortcodes/pmpro_account.php:152
8474
+ #: shortcodes/pmpro_account.php:154 shortcodes/pmpro_account.php:155
8475
+ #: shortcodes/pmpro_account.php:157
8476
  msgid "View All Invoices"
8477
  msgstr ""
8478
 
8479
+ #: shortcodes/pmpro_account.php:164 pages/account.php:128 pages/account.php:146
8480
+ #: pages/account.php:150 shortcodes/pmpro_account.php:159
8481
+ #: shortcodes/pmpro_account.php:161 shortcodes/pmpro_account.php:162
8482
+ #: shortcodes/pmpro_account.php:164
8483
  msgid "Member Links"
8484
  msgstr ""
8485
 
8501
  msgid "User Forum"
8502
  msgstr ""
8503
 
8504
+ #: adminpages/advancedsettings.php:209 adminpages/advancedsettings.php:216
8505
+ #: adminpages/advancedsettings.php:229 adminpages/advancedsettings.php:232
8506
+ #: adminpages/advancedsettings.php:248
8507
+ msgid "reCAPTCHA Public Key"
8508
+ msgstr ""
8509
+
8510
+ #: adminpages/advancedsettings.php:212 adminpages/advancedsettings.php:219
8511
+ #: adminpages/advancedsettings.php:232 adminpages/advancedsettings.php:235
8512
+ #: adminpages/advancedsettings.php:251
8513
+ msgid "reCAPTCHA Private Key"
8514
+ msgstr ""
8515
+
8516
  #: adminpages/advancedsettings.php:272 adminpages/advancedsettings.php:285
8517
  msgid "selected"
8518
  msgstr ""
8742
  msgid "South African Rand"
8743
  msgstr ""
8744
 
8745
+ #: includes/filters.php:218
8746
+ #, php-format
8747
+ msgid ""
8748
+ "User: %s<br />Email: %s<br />Membership Level: %s<br />Order #: %s<br /"
8749
+ ">Original Profile Start Date: %s<br />Adjusted Profile Start Date: %s<br /"
8750
+ ">Trial Period: %s<br />Trial Frequency: %s<br />"
8751
+ msgstr ""
8752
+
8753
+ #: includes/functions.php:169 includes/functions.php:205
8754
+ #: includes/functions.php:211 includes/functions.php:213
8755
+ #: includes/functions.php:214 includes/functions.php:215
8756
+ #: includes/functions.php:218 includes/functions.php:254
8757
+ #: includes/functions.php:320 includes/functions.php:326
8758
+ #: includes/functions.php:331 includes/functions.php:340
8759
+ #, php-format
8760
+ msgid " and then <strong>%s per %s for %d more %s</strong>."
8761
+ msgstr ""
8762
+
8763
  #: includes/functions.php:173 includes/functions.php:209
8764
  #: includes/functions.php:215 includes/functions.php:217
8765
  #: includes/functions.php:218 includes/functions.php:219
8768
  msgid " and then <strong>%s every %d %s for %d more %s</strong>."
8769
  msgstr ""
8770
 
8771
+ #: includes/functions.php:178 includes/functions.php:214
8772
+ #: includes/functions.php:220 includes/functions.php:222
8773
+ #: includes/functions.php:223 includes/functions.php:224
8774
+ #: includes/functions.php:227 includes/functions.php:263
8775
+ #: includes/functions.php:329 includes/functions.php:335
8776
+ #: includes/functions.php:340 includes/functions.php:349
8777
+ #, php-format
8778
+ msgid " and then <strong>%s after %d %s</strong>."
8779
+ msgstr ""
8780
+
8781
+ #: includes/functions.php:184 includes/functions.php:220
8782
+ #: includes/functions.php:228 includes/functions.php:238
8783
+ #: includes/functions.php:239 includes/functions.php:240
8784
+ #: includes/functions.php:242 includes/functions.php:245
8785
+ #: includes/functions.php:249 includes/functions.php:285
8786
+ #: includes/functions.php:351 includes/functions.php:357
8787
+ #: includes/functions.php:362 includes/functions.php:371
8788
+ #, php-format
8789
+ msgid " and then <strong>%s per %s</strong>."
8790
+ msgstr ""
8791
+
8792
+ #: includes/functions.php:188 includes/functions.php:224
8793
+ #: includes/functions.php:232 includes/functions.php:242
8794
+ #: includes/functions.php:243 includes/functions.php:244
8795
+ #: includes/functions.php:246 includes/functions.php:249
8796
+ #: includes/functions.php:253 includes/functions.php:289
8797
+ #: includes/functions.php:355 includes/functions.php:361
8798
+ #: includes/functions.php:366 includes/functions.php:375
8799
+ #, php-format
8800
+ msgid " and then <strong>%s every %d %s</strong>."
8801
+ msgstr ""
8802
+
8803
+ #: includes/functions.php:217 includes/functions.php:253
8804
+ #: includes/functions.php:264 includes/functions.php:275
8805
+ #: includes/functions.php:276 includes/functions.php:277
8806
+ #: includes/functions.php:279 includes/functions.php:282
8807
+ #: includes/functions.php:286 includes/functions.php:322
8808
+ #: includes/functions.php:388 includes/functions.php:394
8809
+ #: includes/functions.php:399 includes/functions.php:408 pages/levels.php:97
8810
+ #, php-format
8811
+ msgid "After your initial payment, your first %d payments will cost %s."
8812
+ msgstr ""
8813
+
8814
+ #: includes/functions.php:228 includes/functions.php:264
8815
+ #: includes/functions.php:275 includes/functions.php:286
8816
+ #: includes/functions.php:287 includes/functions.php:288
8817
+ #: includes/functions.php:290 includes/functions.php:293
8818
+ #: includes/functions.php:297 includes/functions.php:333
8819
+ #: includes/functions.php:399 includes/functions.php:405
8820
+ #: includes/functions.php:410 includes/functions.php:419
8821
+ #: includes/functions.php:523 includes/functions.php:532
8822
+ #, php-format
8823
+ msgid "Customers in %s will be charged %s%% tax."
8824
+ msgstr ""
8825
+
8826
+ #: includes/functions.php:228 includes/functions.php:229
8827
+ #: includes/functions.php:230 includes/functions.php:231
8828
+ #: includes/functions.php:235 includes/functions.php:271
8829
+ #: includes/functions.php:337 includes/functions.php:343
8830
+ #: includes/functions.php:348 includes/functions.php:357
8831
+ #, php-format
8832
+ msgid "The price for membership is <strong>%s per %s</strong>."
8833
+ msgstr ""
8834
+
8835
+ #: includes/functions.php:230 includes/functions.php:233
8836
+ #: includes/functions.php:237 includes/functions.php:273
8837
+ #: includes/functions.php:339 includes/functions.php:345
8838
+ #: includes/functions.php:350 includes/functions.php:359
8839
+ #, php-format
8840
+ msgid "<strong>%s per %s</strong>."
8841
+ msgstr ""
8842
+
8843
+ #: includes/functions.php:233 includes/functions.php:234
8844
+ #: includes/functions.php:235 includes/functions.php:238
8845
+ #: includes/functions.php:242 includes/functions.php:278
8846
+ #: includes/functions.php:344 includes/functions.php:350
8847
+ #: includes/functions.php:355 includes/functions.php:364
8848
+ #, php-format
8849
+ msgid "The price for membership is <strong>%s every %d %s</strong>."
8850
+ msgstr ""
8851
+
8852
+ #: includes/functions.php:237 includes/functions.php:240
8853
+ #: includes/functions.php:244 includes/functions.php:280
8854
+ #: includes/functions.php:346 includes/functions.php:352
8855
+ #: includes/functions.php:357 includes/functions.php:366
8856
+ #, php-format
8857
+ msgid "<strong>%s every %d %s</strong>."
8858
+ msgstr ""
8859
+
8860
+ #: includes/functions.php:242 includes/functions.php:278
8861
+ #: includes/functions.php:289 includes/functions.php:300
8862
+ #: includes/functions.php:301 includes/functions.php:302
8863
+ #: includes/functions.php:304 includes/functions.php:307
8864
+ #: includes/functions.php:311 includes/functions.php:347
8865
+ #: includes/functions.php:413 includes/functions.php:419
8866
+ #: includes/functions.php:540 includes/functions.php:549
8867
+ #, php-format
8868
+ msgid "Membership expires after %d %s."
8869
+ msgstr ""
8870
+
8871
+ #: includes/functions.php:258 includes/functions.php:324
8872
+ #: includes/functions.php:330 includes/functions.php:335
8873
+ #: includes/functions.php:344
8874
+ #, php-format
8875
+ msgid " and then <strong>%s every %d %s for %d more payments</strong>."
8876
+ msgstr ""
8877
+
8878
+ #: includes/functions.php:469 includes/functions.php:478
8879
+ #, php-format
8880
+ msgid "<strong>%s per %s for %d more %s</strong>"
8881
+ msgstr ""
8882
+
8883
+ #: includes/functions.php:473 includes/functions.php:482
8884
+ #, php-format
8885
+ msgid "<strong>%s every %d %s for %d more payments</strong>"
8886
+ msgstr ""
8887
+
8888
+ #: includes/functions.php:478 includes/functions.php:487
8889
+ #, php-format
8890
+ msgid "<strong>%s after %d %s</strong>"
8891
+ msgstr ""
8892
+
8893
+ #: includes/functions.php:484 includes/functions.php:493
8894
+ #, php-format
8895
+ msgid "<strong>%s every %s</strong>"
8896
+ msgstr ""
8897
+
8898
+ #: includes/functions.php:488 includes/functions.php:497
8899
+ #, php-format
8900
+ msgid "<strong>%s every %d %s</strong>"
8901
+ msgstr ""
8902
+
8903
+ #: includes/functions.php:556 includes/functions.php:557
8904
+ #: includes/functions.php:566
8905
+ #, php-format
8906
+ msgid "%s membership expires after %d %s"
8907
+ msgstr ""
8908
+
8909
  #: includes/license.php:89 includes/license.php:92
8910
  msgid ""
8911
  "Enter your support license key.</strong> Your license key can be found in "
pages/billing.php CHANGED
@@ -127,11 +127,11 @@
127
  {
128
  ?>
129
  <div class="pmpro_checkout-field pmpro_checkout-field-bcity">
130
- <label for="bcity"><?php _e('City', 'paid-memberships-pro' );?>City</label>
131
  <input id="bcity" name="bcity" type="text" class="input <?php echo pmpro_getClassForField("bcity");?>" size="30" value="<?php echo esc_attr($bcity)?>" />
132
  </div> <!-- end pmpro_checkout-field-bcity -->
133
  <div class="pmpro_checkout-field pmpro_checkout-field-bstate">
134
- <label for="bstate"><?php _e('State', 'paid-memberships-pro' );?>State</label>
135
  <input id="bstate" name="bstate" type="text" class="input <?php echo pmpro_getClassForField("bstate");?>" size="30" value="<?php echo esc_attr($bstate)?>" />
136
  </div> <!-- end pmpro_checkout-field-bstate -->
137
  <div class="pmpro_checkout-field pmpro_checkout-field-bzipcode">
@@ -257,114 +257,115 @@
257
  $pmpro_accepted_credit_cards = pmpro_getOption("accepted_credit_cards");
258
  $pmpro_accepted_credit_cards = explode(",", $pmpro_accepted_credit_cards);
259
  $pmpro_accepted_credit_cards_string = pmpro_implodeToEnglish($pmpro_accepted_credit_cards);
260
- ?>
261
- <div id="pmpro_payment_information_fields" class="pmpro_checkout">
262
- <h3>
263
- <span class="pmpro_checkout-h3-name"><?php _e('Credit Card Information', 'paid-memberships-pro' );?></span>
264
- <span class="pmpro_checkout-h3-msg"><?php printf(__('We accept %s', 'paid-memberships-pro' ), $pmpro_accepted_credit_cards_string);?></span>
265
- </h3>
266
- <?php $sslseal = pmpro_getOption("sslseal"); ?>
267
- <?php if(!empty($sslseal)) { ?>
268
- <div class="pmpro_checkout-fields-display-seal">
269
- <?php } ?>
270
- <div class="pmpro_checkout-fields">
271
- <?php
272
- $pmpro_include_cardtype_field = apply_filters('pmpro_include_cardtype_field', false);
273
- if($pmpro_include_cardtype_field) { ?>
274
- <div class="pmpro_checkout-field pmpro_payment-card-type">
275
- <label for="CardType"><?php _e('Card Type', 'paid-memberships-pro' );?></label>
276
- <select id="CardType" name="CardType" class="<?php echo pmpro_getClassForField("CardType");?>">
277
- <?php foreach($pmpro_accepted_credit_cards as $cc) { ?>
278
- <option value="<?php echo $cc?>" <?php if($CardType == $cc) { ?>selected="selected"<?php } ?>><?php echo $cc?></option>
279
- <?php } ?>
280
- </select>
281
- </div> <!-- end pmpro_payment-card-type -->
282
- <?php } else { ?>
283
- <input type="hidden" id="CardType" name="CardType" value="<?php echo esc_attr($CardType);?>" />
284
- <script>
285
- <!--
286
- jQuery(document).ready(function() {
287
- jQuery('#AccountNumber').validateCreditCard(function(result) {
288
- var cardtypenames = {
289
- "amex" : "American Express",
290
- "diners_club_carte_blanche" : "Diners Club Carte Blanche",
291
- "diners_club_international" : "Diners Club International",
292
- "discover" : "Discover",
293
- "jcb" : "JCB",
294
- "laser" : "Laser",
295
- "maestro" : "Maestro",
296
- "mastercard" : "Mastercard",
297
- "visa" : "Visa",
298
- "visa_electron" : "Visa Electron"
299
- };
300
 
301
- if(result.card_type)
302
- jQuery('#CardType').val(cardtypenames[result.card_type.name]);
303
- else
304
- jQuery('#CardType').val('Unknown Card Type');
305
- });
306
- });
307
- -->
308
- </script>
309
- <?php
310
- }
311
- ?>
312
- <div class="pmpro_checkout-field pmpro_payment-account-number">
313
- <label for="AccountNumber"><?php _e('Card Number', 'paid-memberships-pro' );?></label>
314
- <input id="AccountNumber" name="AccountNumber" class="input <?php echo pmpro_getClassForField("AccountNumber");?>" type="text" size="25" value="<?php echo esc_attr($AccountNumber)?>" autocomplete="off" />
315
- </div>
316
- <div class="pmpro_checkout-field pmpro_payment-expiration">
317
- <label for="ExpirationMonth"><?php _e('Expiration Date', 'paid-memberships-pro' );?></label>
318
- <select id="ExpirationMonth" name="ExpirationMonth">
319
- <option value="01" <?php if($ExpirationMonth == "01") { ?>selected="selected"<?php } ?>>01</option>
320
- <option value="02" <?php if($ExpirationMonth == "02") { ?>selected="selected"<?php } ?>>02</option>
321
- <option value="03" <?php if($ExpirationMonth == "03") { ?>selected="selected"<?php } ?>>03</option>
322
- <option value="04" <?php if($ExpirationMonth == "04") { ?>selected="selected"<?php } ?>>04</option>
323
- <option value="05" <?php if($ExpirationMonth == "05") { ?>selected="selected"<?php } ?>>05</option>
324
- <option value="06" <?php if($ExpirationMonth == "06") { ?>selected="selected"<?php } ?>>06</option>
325
- <option value="07" <?php if($ExpirationMonth == "07") { ?>selected="selected"<?php } ?>>07</option>
326
- <option value="08" <?php if($ExpirationMonth == "08") { ?>selected="selected"<?php } ?>>08</option>
327
- <option value="09" <?php if($ExpirationMonth == "09") { ?>selected="selected"<?php } ?>>09</option>
328
- <option value="10" <?php if($ExpirationMonth == "10") { ?>selected="selected"<?php } ?>>10</option>
329
- <option value="11" <?php if($ExpirationMonth == "11") { ?>selected="selected"<?php } ?>>11</option>
330
- <option value="12" <?php if($ExpirationMonth == "12") { ?>selected="selected"<?php } ?>>12</option>
331
- </select>/<select id="ExpirationYear" name="ExpirationYear">
332
- <?php
333
- for($i = date_i18n("Y"); $i < date_i18n("Y") + 10; $i++)
334
- {
335
- ?>
336
- <option value="<?php echo $i?>" <?php if($ExpirationYear == $i) { ?>selected="selected"<?php } ?>><?php echo $i?></option>
337
- <?php
338
  }
339
  ?>
340
- </select>
341
- </div>
342
- <?php
343
- $pmpro_show_cvv = apply_filters("pmpro_show_cvv", true);
344
- if($pmpro_show_cvv) {
345
- if ( true == ini_get('allow_url_include') ) {
346
- $cvv_template = pmpro_loadTemplate('popup-cvv', 'url', 'pages', 'html');
347
- } else {
348
- $cvv_template = plugins_url( 'paid-memberships-pro/pages/popup-cvv.html', PMPRO_DIR );
349
- }
350
- ?>
351
- <div class="pmpro_checkout-field pmpro_payment-cvv">
352
- <label for="CVV"><?php _e('CVV', 'paid-memberships-pro' );?></label>
353
- <input id="CVV" name="CVV" type="text" size="4" value="<?php if(!empty($_REQUEST['CVV'])) { echo esc_attr($_REQUEST['CVV']); }?>" class="input <?php echo pmpro_getClassForField("CVV");?>" /> <small>(<a href="javascript:void(0);" onclick="javascript:window.open('<?php echo pmpro_https_filter($cvv_template); ?>','cvv','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=600, height=475');"><?php _e("what's this?", 'paid-memberships-pro' );?></a>)</small>
354
  </div>
355
- <?php } ?>
356
- </div> <!-- end pmpro_checkout-fields -->
357
- </div> <!-- end pmpro_payment_information_fields -->
358
- <?php } // if($pmpro_include_payment_information_fields) ?>
359
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
360
  <?php do_action("pmpro_billing_before_submit_button"); ?>
361
-
362
  <div align="center">
363
  <input type="hidden" name="update-billing" value="1" />
364
  <input type="submit" class="pmpro_btn pmpro_btn-submit" value="<?php _e('Update', 'paid-memberships-pro' );?>" />
365
  <input type="button" name="cancel" class="pmpro_btn pmpro_btn-cancel" value="<?php _e('Cancel', 'paid-memberships-pro' );?>" onclick="location.href='<?php echo pmpro_url("account")?>';" />
366
  </div>
367
-
368
  </form>
369
  <script>
370
  <!--
127
  {
128
  ?>
129
  <div class="pmpro_checkout-field pmpro_checkout-field-bcity">
130
+ <label for="bcity"><?php _e('City', 'paid-memberships-pro' );?></label>
131
  <input id="bcity" name="bcity" type="text" class="input <?php echo pmpro_getClassForField("bcity");?>" size="30" value="<?php echo esc_attr($bcity)?>" />
132
  </div> <!-- end pmpro_checkout-field-bcity -->
133
  <div class="pmpro_checkout-field pmpro_checkout-field-bstate">
134
+ <label for="bstate"><?php _e('State', 'paid-memberships-pro' );?></label>
135
  <input id="bstate" name="bstate" type="text" class="input <?php echo pmpro_getClassForField("bstate");?>" size="30" value="<?php echo esc_attr($bstate)?>" />
136
  </div> <!-- end pmpro_checkout-field-bstate -->
137
  <div class="pmpro_checkout-field pmpro_checkout-field-bzipcode">
257
  $pmpro_accepted_credit_cards = pmpro_getOption("accepted_credit_cards");
258
  $pmpro_accepted_credit_cards = explode(",", $pmpro_accepted_credit_cards);
259
  $pmpro_accepted_credit_cards_string = pmpro_implodeToEnglish($pmpro_accepted_credit_cards);
260
+ ?>
261
+ <div id="pmpro_payment_information_fields" class="pmpro_checkout">
262
+ <h3>
263
+ <span class="pmpro_checkout-h3-name"><?php _e('Credit Card Information', 'paid-memberships-pro' );?></span>
264
+ <span class="pmpro_checkout-h3-msg"><?php printf(__('We accept %s', 'paid-memberships-pro' ), $pmpro_accepted_credit_cards_string);?></span>
265
+ </h3>
266
+ <?php $sslseal = pmpro_getOption("sslseal"); ?>
267
+ <?php if(!empty($sslseal)) { ?>
268
+ <div class="pmpro_checkout-fields-display-seal">
269
+ <?php } ?>
270
+ <div class="pmpro_checkout-fields">
271
+ <?php
272
+ $pmpro_include_cardtype_field = apply_filters('pmpro_include_cardtype_field', false);
273
+ if($pmpro_include_cardtype_field) { ?>
274
+ <div class="pmpro_checkout-field pmpro_payment-card-type">
275
+ <label for="CardType"><?php _e('Card Type', 'paid-memberships-pro' );?></label>
276
+ <select id="CardType" name="CardType" class="<?php echo pmpro_getClassForField("CardType");?>">
277
+ <?php foreach($pmpro_accepted_credit_cards as $cc) { ?>
278
+ <option value="<?php echo $cc?>" <?php if($CardType == $cc) { ?>selected="selected"<?php } ?>><?php echo $cc?></option>
279
+ <?php } ?>
280
+ </select>
281
+ </div> <!-- end pmpro_payment-card-type -->
282
+ <?php } else { ?>
283
+ <input type="hidden" id="CardType" name="CardType" value="<?php echo esc_attr($CardType);?>" />
284
+ <script>
285
+ <!--
286
+ jQuery(document).ready(function() {
287
+ jQuery('#AccountNumber').validateCreditCard(function(result) {
288
+ var cardtypenames = {
289
+ "amex" : "American Express",
290
+ "diners_club_carte_blanche" : "Diners Club Carte Blanche",
291
+ "diners_club_international" : "Diners Club International",
292
+ "discover" : "Discover",
293
+ "jcb" : "JCB",
294
+ "laser" : "Laser",
295
+ "maestro" : "Maestro",
296
+ "mastercard" : "Mastercard",
297
+ "visa" : "Visa",
298
+ "visa_electron" : "Visa Electron"
299
+ };
300
 
301
+ if(result.card_type)
302
+ jQuery('#CardType').val(cardtypenames[result.card_type.name]);
303
+ else
304
+ jQuery('#CardType').val('Unknown Card Type');
305
+ });
306
+ });
307
+ -->
308
+ </script>
309
+ <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
310
  }
311
  ?>
312
+ <div class="pmpro_checkout-field pmpro_payment-account-number">
313
+ <label for="AccountNumber"><?php _e('Card Number', 'paid-memberships-pro' );?></label>
314
+ <input id="AccountNumber" name="AccountNumber" class="input <?php echo pmpro_getClassForField("AccountNumber");?>" type="text" size="25" value="<?php echo esc_attr($AccountNumber)?>" autocomplete="off" />
 
 
 
 
 
 
 
 
 
 
 
315
  </div>
316
+ <div class="pmpro_checkout-field pmpro_payment-expiration">
317
+ <label for="ExpirationMonth"><?php _e('Expiration Date', 'paid-memberships-pro' );?></label>
318
+ <select id="ExpirationMonth" name="ExpirationMonth">
319
+ <option value="01" <?php if($ExpirationMonth == "01") { ?>selected="selected"<?php } ?>>01</option>
320
+ <option value="02" <?php if($ExpirationMonth == "02") { ?>selected="selected"<?php } ?>>02</option>
321
+ <option value="03" <?php if($ExpirationMonth == "03") { ?>selected="selected"<?php } ?>>03</option>
322
+ <option value="04" <?php if($ExpirationMonth == "04") { ?>selected="selected"<?php } ?>>04</option>
323
+ <option value="05" <?php if($ExpirationMonth == "05") { ?>selected="selected"<?php } ?>>05</option>
324
+ <option value="06" <?php if($ExpirationMonth == "06") { ?>selected="selected"<?php } ?>>06</option>
325
+ <option value="07" <?php if($ExpirationMonth == "07") { ?>selected="selected"<?php } ?>>07</option>
326
+ <option value="08" <?php if($ExpirationMonth == "08") { ?>selected="selected"<?php } ?>>08</option>
327
+ <option value="09" <?php if($ExpirationMonth == "09") { ?>selected="selected"<?php } ?>>09</option>
328
+ <option value="10" <?php if($ExpirationMonth == "10") { ?>selected="selected"<?php } ?>>10</option>
329
+ <option value="11" <?php if($ExpirationMonth == "11") { ?>selected="selected"<?php } ?>>11</option>
330
+ <option value="12" <?php if($ExpirationMonth == "12") { ?>selected="selected"<?php } ?>>12</option>
331
+ </select>/<select id="ExpirationYear" name="ExpirationYear">
332
+ <?php
333
+ for($i = date_i18n("Y"); $i < date_i18n("Y") + 10; $i++)
334
+ {
335
+ ?>
336
+ <option value="<?php echo $i?>" <?php if($ExpirationYear == $i) { ?>selected="selected"<?php } ?>><?php echo $i?></option>
337
+ <?php
338
+ }
339
+ ?>
340
+ </select>
341
+ </div>
342
+ <?php
343
+ $pmpro_show_cvv = apply_filters("pmpro_show_cvv", true);
344
+ if($pmpro_show_cvv) {
345
+ if ( true == ini_get('allow_url_include') ) {
346
+ $cvv_template = pmpro_loadTemplate('popup-cvv', 'url', 'pages', 'html');
347
+ } else {
348
+ $cvv_template = plugins_url( 'paid-memberships-pro/pages/popup-cvv.html', PMPRO_DIR );
349
+ }
350
+ ?>
351
+ <div class="pmpro_checkout-field pmpro_payment-cvv">
352
+ <label for="CVV"><?php _e('CVV', 'paid-memberships-pro' );?></label>
353
+ <input id="CVV" name="CVV" type="text" size="4" value="<?php if(!empty($_REQUEST['CVV'])) { echo esc_attr($_REQUEST['CVV']); }?>" class="input <?php echo pmpro_getClassForField("CVV");?>" /> <small>(<a href="javascript:void(0);" onclick="javascript:window.open('<?php echo pmpro_https_filter($cvv_template); ?>','cvv','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=600, height=475');"><?php _e("what's this?", 'paid-memberships-pro' );?></a>)</small>
354
+ </div>
355
+ <?php } ?>
356
+ </div> <!-- end pmpro_checkout-fields -->
357
+ </div> <!-- end pmpro_payment_information_fields -->
358
+ <?php
359
+ }
360
+ ?>
361
+
362
  <?php do_action("pmpro_billing_before_submit_button"); ?>
363
+
364
  <div align="center">
365
  <input type="hidden" name="update-billing" value="1" />
366
  <input type="submit" class="pmpro_btn pmpro_btn-submit" value="<?php _e('Update', 'paid-memberships-pro' );?>" />
367
  <input type="button" name="cancel" class="pmpro_btn pmpro_btn-cancel" value="<?php _e('Cancel', 'paid-memberships-pro' );?>" onclick="location.href='<?php echo pmpro_url("account")?>';" />
368
  </div>
 
369
  </form>
370
  <script>
371
  <!--
paid-memberships-pro.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Paid Memberships Pro
4
  Plugin URI: http://www.paidmembershipspro.com
5
  Description: Plugin to Handle Memberships
6
- Version: 1.9.4.3
7
  Author: Stranger Studios
8
  Author URI: http://www.strangerstudios.com
9
  Text Domain: paid-memberships-pro
@@ -15,7 +15,7 @@ Domain Path: /languages
15
  */
16
 
17
  // version constant
18
- define( 'PMPRO_VERSION', '1.9.4.3' );
19
  define( 'PMPRO_USER_AGENT', 'Paid Memberships Pro v' . PMPRO_VERSION . '; ' . site_url() );
20
  define( 'PMPRO_MIN_PHP_VERSION', '5.6' );
21
 
3
  Plugin Name: Paid Memberships Pro
4
  Plugin URI: http://www.paidmembershipspro.com
5
  Description: Plugin to Handle Memberships
6
+ Version: 1.9.4.4
7
  Author: Stranger Studios
8
  Author URI: http://www.strangerstudios.com
9
  Text Domain: paid-memberships-pro
15
  */
16
 
17
  // version constant
18
+ define( 'PMPRO_VERSION', '1.9.4.4' );
19
  define( 'PMPRO_USER_AGENT', 'Paid Memberships Pro v' . PMPRO_VERSION . '; ' . site_url() );
20
  define( 'PMPRO_MIN_PHP_VERSION', '5.6' );
21
 
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: strangerstudios
3
  Tags: membership, memberships, member, members, ecommerce, e-commerce, paypal, stripe, braintree, authorize.net, payflow, restrict access, restrict content, directory
4
  Requires at least: 4
5
- Tested up to: 4.9.1
6
- Stable tag: 1.9.4.3
7
 
8
  Get Paid with Paid Memberships Pro: The most complete member management and membership subscriptions plugin for your WordPress site.
9
 
@@ -129,6 +129,15 @@ Not sure? You can find out by doing a bit a research.
129
 
130
  == Changelog ==
131
 
 
 
 
 
 
 
 
 
 
132
  = 1.9.4.3 - 2018-01-04 =
133
  * BUG FIX: Fixed issue where PMPro would attempt to cancel gateway subscriptions more than once in some cases.
134
 
2
  Contributors: strangerstudios
3
  Tags: membership, memberships, member, members, ecommerce, e-commerce, paypal, stripe, braintree, authorize.net, payflow, restrict access, restrict content, directory
4
  Requires at least: 4
5
+ Tested up to: 4.9.4
6
+ Stable tag: 1.9.4.4
7
 
8
  Get Paid with Paid Memberships Pro: The most complete member management and membership subscriptions plugin for your WordPress site.
9
 
129
 
130
  == Changelog ==
131
 
132
+ = 1.9.4.4 =
133
+ * BUG FIX: Updated the filters to extend membership levels to use the new pmpro_getSpecificMembershipLevelForUser() function to avoid bugs when MMPU is enabled.
134
+ * BUG FIX: Fixed cases where certain email templates were resulting in the body of the email being duplicated.
135
+ * BUG FIX: Fixed conflict with pmpro-email-templates when emails were disabled (the pmpro_email filter returns false). (Thanks, Mathieu Hays)
136
+ * BUG FIX: Now updating status on related subscription orders BEFORE canceling at gateway to avoid cases where the webhook sent by the gateway after canceling the subscription triggers further cancellation attempts.
137
+ * BUG FIX: No longer showing the "Stripe Publishable Key appears incorrect" error message if the key field is blank.
138
+ * ENHANCEMENT: Added the pmpro_getSpecificMembershipLevelForUser( $user_id, $level_id ) function for cases where MMPU is enabled and you want data about a specific membership level a user might have.
139
+ * ENHANCEMENT: Changed labels on the reCAPTCHA settings to match their current terminology: Site Key and Secret Key.
140
+
141
  = 1.9.4.3 - 2018-01-04 =
142
  * BUG FIX: Fixed issue where PMPro would attempt to cancel gateway subscriptions more than once in some cases.
143
 
scheduled/crons.php CHANGED
@@ -23,7 +23,7 @@ function pmpro_cron_expire_memberships()
23
  do_action("pmpro_membership_pre_membership_expiry", $e->user_id, $e->membership_id );
24
 
25
  //remove their membership
26
- pmpro_changeMembershipLevel(false, $e->user_id, 'expired');
27
 
28
  do_action("pmpro_membership_post_membership_expiry", $e->user_id, $e->membership_id );
29
 
23
  do_action("pmpro_membership_pre_membership_expiry", $e->user_id, $e->membership_id );
24
 
25
  //remove their membership
26
+ pmpro_changeMembershipLevel(false, $e->user_id, 'expired', $e->membership_id);
27
 
28
  do_action("pmpro_membership_post_membership_expiry", $e->user_id, $e->membership_id );
29