Paid Memberships Pro - Version 1.8.13.2

Version Description

  • BUG: Fixed bug with updating credit cards through Braintree.
  • BUG: Fixed bug with updating credit cards through Stripe.
  • BUG: Fixed SQL warnings when generating the pmpro_membership_levelmeta table. (Thanks, itibet on GitHub)
  • BUG/ENHANCEMENT: Moved some update billing and checkout related code from the preheaders and page templates into the Braintree and Stripe classes.
  • ENHANCEMENT: Added pmpro_billing_order filter that functions similar to pmpro_checkout_order.
  • ENHANCEMENT: Added pmpro_billing_before_submit_button hook that functions similar to the pmpro_checkout_before_submit_button hook.
  • ENHANCEMENT: Clicking on a report widget no longer takes you to the details page. You have to click the details button. This allows us to add additional functionality to the widgets.
  • ENHANCEMENT: Updated reports widgets so the "details" button only shows if a page function is defined for that report. You can now have report widgets without details pages.
  • ENHANCEMENT: You can now click on a heading in the Membership Stats report widget to see data for up to 3 of your levels. The first 3 levels per the level ordering are shown.
Download this release

Release Info

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

Code changes from version 1.8.13.1 to 1.8.13.2

adminpages/membershiplevels.php CHANGED
@@ -3,8 +3,8 @@
3
if(!function_exists("current_user_can") || (!current_user_can("manage_options") && !current_user_can("pmpro_membershiplevels")))
4
{
5
die(__("You do not have permissions to perform this action.", "pmpro"));
6
- }
7
-
8
global $wpdb, $msg, $msgt, $pmpro_currency_symbol;
9
10
//some vars
@@ -12,7 +12,7 @@
12
$pmpro_level_order = pmpro_getOption('level_order');
13
14
global $pmpro_stripe_error, $pmpro_braintree_error, $pmpro_payflow_error, $pmpro_twocheckout_error, $wp_version;
15
-
16
if(isset($_REQUEST['edit']))
17
$edit = intval($_REQUEST['edit']);
18
else
@@ -23,12 +23,12 @@
23
$s = sanitize_text_field($_REQUEST['s']);
24
else
25
$s = "";
26
-
27
if(isset($_REQUEST['action']))
28
$action = sanitize_text_field($_REQUEST['action']);
29
else
30
$action = false;
31
-
32
if(isset($_REQUEST['saveandnext']))
33
$saveandnext = intval($_REQUEST['saveandnext']);
34
@@ -37,8 +37,7 @@
37
if(isset($_REQUEST['deleteid']))
38
$deleteid = intval($_REQUEST['deleteid']);
39
40
- if($action == "save_membershiplevel")
41
- {
42
$ml_name = stripslashes($_REQUEST['name']);
43
$ml_description = stripslashes($_REQUEST['description']);
44
$ml_confirmation = stripslashes($_REQUEST['confirmation']);
@@ -49,14 +48,14 @@
49
$ml_recurring = 0;
50
$ml_billing_amount = stripslashes($_REQUEST['billing_amount']);
51
$ml_cycle_number = stripslashes($_REQUEST['cycle_number']);
52
- $ml_cycle_period = stripslashes($_REQUEST['cycle_period']);
53
$ml_billing_limit = stripslashes($_REQUEST['billing_limit']);
54
if(!empty($_REQUEST['custom_trial']))
55
$ml_custom_trial = 1;
56
else
57
$ml_custom_trial = 0;
58
$ml_trial_amount = stripslashes($_REQUEST['trial_amount']);
59
- $ml_trial_limit = stripslashes($_REQUEST['trial_limit']);
60
if(!empty($_REQUEST['expiration']))
61
$ml_expiration = 1;
62
else
@@ -64,162 +63,177 @@
64
$ml_expiration_number = stripslashes($_REQUEST['expiration_number']);
65
$ml_expiration_period = stripslashes($_REQUEST['expiration_period']);
66
$ml_categories = array();
67
-
68
//reversing disable to allow here
69
if(empty($_REQUEST['disable_signups']))
70
$ml_allow_signups = 1;
71
else
72
$ml_allow_signups = 0;
73
74
- foreach ( $_REQUEST as $key => $value )
75
- {
76
- if ( $value == 'yes' && preg_match( '/^membershipcategory_(\d+)#x2F;i', $key, $matches ) )
77
- {
78
$ml_categories[] = $matches[1];
79
}
80
}
81
82
//clearing out values if checkboxes aren't checked
83
- if(empty($ml_recurring))
84
- {
85
$ml_billing_amount = $ml_cycle_number = $ml_cycle_period = $ml_billing_limit = $ml_trial_amount = $ml_trial_limit = 0;
86
- }
87
- elseif(empty($ml_custom_trial))
88
- {
89
$ml_trial_amount = $ml_trial_limit = 0;
90
}
91
- if(empty($ml_expiration))
92
- {
93
$ml_expiration_number = $ml_expiration_period = 0;
94
}
95
96
- if($saveid > 0)
97
- {
98
- $sqlQuery = " UPDATE {$wpdb->pmpro_membership_levels}
99
- SET name = '" . esc_sql($ml_name) . "',
100
- description = '" . esc_sql($ml_description) . "',
101
- confirmation = '" . esc_sql($ml_confirmation) . "',
102
- initial_payment = '" . esc_sql($ml_initial_payment) . "',
103
- billing_amount = '" . esc_sql($ml_billing_amount) . "',
104
- cycle_number = '" . esc_sql($ml_cycle_number) . "',
105
- cycle_period = '" . esc_sql($ml_cycle_period) . "',
106
- billing_limit = '" . esc_sql($ml_billing_limit) . "',
107
- trial_amount = '" . esc_sql($ml_trial_amount) . "',
108
- trial_limit = '" . esc_sql($ml_trial_limit) . "',
109
- expiration_number = '" . esc_sql($ml_expiration_number) . "',
110
- expiration_period = '" . esc_sql($ml_expiration_period) . "',
111
- allow_signups = '" . esc_sql($ml_allow_signups) . "'
112
- WHERE id = '$saveid' LIMIT 1;";
113
- $wpdb->query($sqlQuery);
114
115
pmpro_updateMembershipCategories( $saveid, $ml_categories );
116
- if(empty($wpdb->last_error))
117
- {
118
$edit = false;
119
$msg = 2;
120
$msgt = __("Membership level updated successfully.", "pmpro");
121
- }
122
- else
123
- {
124
$msg = -2;
125
$msg = true;
126
$msgt = __("Error updating membership level.", "pmpro");
127
}
128
}
129
- else
130
- {
131
- $sqlQuery = " INSERT INTO {$wpdb->pmpro_membership_levels}
132
- ( name, description, confirmation, initial_payment, billing_amount, cycle_number, cycle_period, billing_limit, trial_amount, trial_limit, expiration_number, expiration_period, allow_signups)
133
- VALUES
134
- ( '" . esc_sql($ml_name) . "', '" . esc_sql($ml_description) . "', '" . esc_sql($ml_confirmation) . "', '" . esc_sql($ml_initial_payment) . "', '" . esc_sql($ml_billing_amount) . "', '" . esc_sql($ml_cycle_number) . "', '" . esc_sql($ml_cycle_period) . "', '" . esc_sql($ml_billing_limit) . "', '" . esc_sql($ml_trial_amount) . "', '" . esc_sql($ml_trial_limit) . "', '" . esc_sql($ml_expiration_number) . "', '" . esc_sql($ml_expiration_period) . "', '" . esc_sql($ml_allow_signups) . "' )";
135
- $wpdb->query($sqlQuery);
136
- if(empty($wpdb->last_error))
137
- {
138
- $saveid = $wpdb->insert_id;
139
- pmpro_updateMembershipCategories( $saveid, $ml_categories );
140
-
141
- $edit = false;
142
- $msg = 1;
143
- $msgt = __("Membership level added successfully.", "pmpro");
144
- }
145
- else
146
- {
147
- $msg = -1;
148
- $msgt = __("Error adding membership level.", "pmpro");
149
- }
150
- }
151
-
152
do_action("pmpro_save_membership_level", $saveid);
153
- }
154
elseif($action == "delete_membership_level")
155
{
156
global $wpdb;
157
158
$ml_id = intval($_REQUEST['deleteid']);
159
-
160
- if($ml_id > 0)
161
- {
162
do_action("pmpro_delete_membership_level", $ml_id);
163
-
164
//remove any categories from the ml
165
- $sqlQuery = "DELETE FROM $wpdb->pmpro_memberships_categories WHERE membership_id = '$ml_id'";
166
$r1 = $wpdb->query($sqlQuery);
167
-
168
//cancel any subscriptions to the ml
169
$r2 = true;
170
- $user_ids = $wpdb->get_col("SELECT user_id FROM $wpdb->pmpro_memberships_users WHERE membership_id = '$ml_id' AND status = 'active'");
171
- foreach($user_ids as $user_id)
172
- {
173
//change there membership level to none. that will handle the cancel
174
- if(pmpro_changeMembershipLevel(0, $user_id))
175
- {
176
//okay
177
- }
178
- else
179
- {
180
//couldn't delete the subscription
181
- //we should probably notify the admin
182
- $pmproemail = new PMProEmail();
183
$pmproemail->data = array("body"=>"<p>" . sprintf(__("There was an error canceling the subscription for user with ID=%d. You will want to check your payment gateway to see if their subscription is still active.", "pmpro"), $user_id) . "</p>");
184
- $last_order = $wpdb->get_row("SELECT * FROM $wpdb->pmpro_membership_orders WHERE user_id = '" . $user_id . "' ORDER BY timestamp DESC LIMIT 1");
185
if($last_order)
186
$pmproemail->data["body"] .= "<p>" . __("Last Invoice", "pmpro") . ":<br />" . nl2br(var_export($last_order, true)) . "</p>";
187
- $pmproemail->sendEmail(get_bloginfo("admin_email"));
188
189
$r2 = false;
190
- }
191
- }
192
-
193
//delete the ml
194
- $sqlQuery = "DELETE FROM $wpdb->pmpro_membership_levels WHERE id = '$ml_id' LIMIT 1";
195
$r3 = $wpdb->query($sqlQuery);
196
-
197
- if($r1 !== FALSE && $r2 !== FALSE && $r3 !== FALSE)
198
- {
199
$msg = 3;
200
$msgt = __("Membership level deleted successfully.", "pmpro");
201
- }
202
- else
203
- {
204
$msg = -3;
205
- $msgt = __("Error deleting membership level.", "pmpro");
206
}
207
}
208
- else
209
- {
210
$msg = -3;
211
$msgt = __("Error deleting membership level.", "pmpro");
212
}
213
- }
214
-
215
- require_once(dirname(__FILE__) . "/admin_header.php");
216
?>
217
218
- <?php
219
- if($edit)
220
- {
221
?>
222
-
223
<h2>
224
<?php
225
if($edit > 0)
@@ -228,26 +242,34 @@
228
echo __("Add New Membership Level", "pmpro");
229
?>
230
</h2>
231
-
232
<div>
233
<?php
234
// get the level...
235
- if(!empty($edit) && $edit > 0)
236
- {
237
- $level = $wpdb->get_row("SELECT * FROM $wpdb->pmpro_membership_levels WHERE id = '$edit' LIMIT 1", OBJECT);
238
$temp_id = $level->id;
239
- }
240
- elseif(!empty($copy) && $copy > 0)
241
- {
242
- $level = $wpdb->get_row("SELECT * FROM $wpdb->pmpro_membership_levels WHERE id = '$copy' LIMIT 1", OBJECT);
243
$temp_id = $level->id;
244
$level->id = NULL;
245
}
246
else
247
248
// didn't find a membership level, let's add a new one...
249
- if(empty($level))
250
- {
251
$level = new stdClass();
252
$level->id = NULL;
253
$level->name = NULL;
@@ -261,23 +283,25 @@
261
$level->expiration_number = NULL;
262
$level->expiration_period = NULL;
263
$edit = -1;
264
- }
265
266
//defaults for new levels
267
- if(empty($copy) && $edit == -1)
268
- {
269
$level->cycle_number = 1;
270
$level->cycle_period = "Month";
271
}
272
-
273
// grab the categories for the given level...
274
if(!empty($temp_id))
275
- $level->categories = $wpdb->get_col("SELECT c.category_id
276
- FROM $wpdb->pmpro_memberships_categories c
277
- WHERE c.membership_id = '" . $temp_id . "'");
278
if(empty($level->categories))
279
- $level->categories = array();
280
-
281
?>
282
<form action="" method="post" enctype="multipart/form-data">
283
<input name="saveid" type="hidden" value="<?php echo esc_attr($edit); ?>" />
@@ -287,53 +311,53 @@
287
<tr>
288
<th scope="row" valign="top"><label><?php _e('ID', 'pmpro');?>:</label></th>
289
<td>
290
- <?php echo $level->id?>
291
</td>
292
- </tr>
293
-
294
<tr>
295
<th scope="row" valign="top"><label for="name"><?php _e('Name', 'pmpro');?>:</label></th>
296
<td><input name="name" type="text" size="50" value="<?php echo esc_attr($level->name);?>" /></td>
297
</tr>
298
-
299
<tr>
300
<th scope="row" valign="top"><label for="description"><?php _e('Description', 'pmpro');?>:</label></th>
301
<td>
302
- <div id="poststuff" class="pmpro_description">
303
- <?php
304
if(version_compare($wp_version, "3.3") >= 0)
305
- wp_editor($level->description, "description", array("textarea_rows"=>5));
306
else
307
{
308
?>
309
<textarea rows="10" cols="80" name="description" id="description"><?php echo esc_textarea($level->description);?></textarea>
310
<?php
311
}
312
- ?>
313
- </div>
314
</td>
315
</tr>
316
-
317
<tr>
318
<th scope="row" valign="top"><label for="confirmation"><?php _e('Confirmation Message', 'pmpro');?>:</label></th>
319
<td>
320
- <div class="pmpro_confirmation">
321
- <?php
322
if(version_compare($wp_version, "3.3") >= 0)
323
- wp_editor($level->confirmation, "confirmation", array("textarea_rows"=>5));
324
else
325
{
326
?>
327
- <textarea rows="10" cols="80" name="confirmation" id="confirmation"><?php echo esc_textarea($level->confirmation);?></textarea>
328
<?php
329
}
330
?>
331
- </div>
332
</td>
333
</tr>
334
</tbody>
335
</table>
336
-
337
<h3 class="topborder"><?php _e('Billing Details', 'pmpro');?></h3>
338
<table class="form-table">
339
<tbody>
@@ -344,19 +368,19 @@
344
if(pmpro_getCurrencyPosition() == "left")
345
echo $pmpro_currency_symbol;
346
?>
347
- <input name="initial_payment" type="text" size="20" value="<?php echo esc_attr($level->initial_payment);?>" />
348
<?php
349
if(pmpro_getCurrencyPosition() == "right")
350
echo $pmpro_currency_symbol;
351
?>
352
<small><?php _e('The initial amount collected at registration.', 'pmpro');?></small></td>
353
</tr>
354
-
355
<tr>
356
<th scope="row" valign="top"><label><?php _e('Recurring Subscription', 'pmpro');?>:</label></th>
357
<td><input id="recurring" name="recurring" type="checkbox" value="yes" <?php if(pmpro_isLevelRecurring($level)) { echo "checked='checked'"; } ?> onclick="if(jQuery('#recurring').is(':checked')) { jQuery('.recurring_info').show(); if(jQuery('#custom_trial').is(':checked')) {jQuery('.trial_info').show();} else {jQuery('.trial_info').hide();} } else { jQuery('.recurring_info').hide();}" /> <label for="recurring"><?php _e('Check if this level has a recurring subscription payment.', 'pmpro');?></label></td>
358
</tr>
359
-
360
<tr class="recurring_info" <?php if(!pmpro_isLevelRecurring($level)) {?>style="display: none;"<?php } ?>>
361
<th scope="row" valign="top"><label for="billing_amount"><?php _e('Billing Amount', 'pmpro');?>:</label></th>
362
<td>
@@ -364,7 +388,7 @@
364
if(pmpro_getCurrencyPosition() == "left")
365
echo $pmpro_currency_symbol;
366
?>
367
- <input name="billing_amount" type="text" size="20" value="<?php echo esc_attr($level->billing_amount);?>" />
368
<?php
369
if(pmpro_getCurrencyPosition() == "right")
370
echo $pmpro_currency_symbol;
@@ -381,40 +405,40 @@
381
}
382
?>
383
</select>
384
- <br /><small>
385
- <?php _e('The amount to be billed one cycle after the initial payment.', 'pmpro');?>
386
<?php if($gateway == "stripe") { ?>
387
<br /><strong <?php if(!empty($pmpro_stripe_error)) { ?>class="pmpro_red"<?php } ?>><?php _e('Stripe integration currently only supports billing periods of "Week", "Month" or "Year".', 'pmpro');?>
388
<?php } elseif($gateway == "braintree") { ?>
389
- <br /><strong <?php if(!empty($pmpro_braintree_error)) { ?>class="pmpro_red"<?php } ?>><?php _e('Braintree integration currently only supports billing periods of "Month" or "Year".', 'pmpro');?>
390
<?php } ?>
391
- </small>
392
<?php if($gateway == "braintree" && $edit < 0) { ?>
393
<p class="pmpro_message"><strong><?php _e('Note', 'pmpro');?>:</strong> <?php _e('After saving this level, make note of the ID and create a "Plan" in your Braintree dashboard with the same settings and the "Plan ID" set to <em>pmpro_#</em>, where # is the level ID.', 'pmpro');?></p>
394
<?php } elseif($gateway == "braintree") { ?>
395
<p class="pmpro_message"><strong><?php _e('Note', 'pmpro');?>:</strong> <?php _e('You will need to create a "Plan" in your Braintree dashboard with the same settings and the "Plan ID" set to', 'pmpro');?> <em>pmpro_<?php echo $level->id;?></em>.</p>
396
- <?php } ?>
397
</td>
398
- </tr>
399
-
400
<tr class="recurring_info" <?php if(!pmpro_isLevelRecurring($level)) {?>style="display: none;"<?php } ?>>
401
<th scope="row" valign="top"><label for="billing_limit"><?php _e('Billing Cycle Limit', 'pmpro');?>:</label></th>
402
<td>
403
<input name="billing_limit" type="text" size="20" value="<?php echo $level->billing_limit?>" />
404
<br /><small>
405
- <?php _e('The <strong>total</strong> number of recurring billing cycles for this level, including the trial period (if applicable) but not including the initial payment. Set to zero if membership is indefinite.', 'pmpro');?>
406
<?php if($gateway == "stripe") { ?>
407
- <br /><strong <?php if(!empty($pmpro_stripe_error)) { ?>class="pmpro_red"<?php } ?>><?php _e('Stripe integration currently does not support billing limits. You can still set an expiration date below.', 'pmpro');?></strong>
408
<?php } ?>
409
</small>
410
</td>
411
- </tr>
412
413
<tr class="recurring_info" <?php if (!pmpro_isLevelRecurring($level)) echo "style='display:none;'";?>>
414
<th scope="row" valign="top"><label><?php _e('Custom Trial', 'pmpro');?>:</label></th>
415
<td>
416
<input id="custom_trial" name="custom_trial" type="checkbox" value="yes" <?php if ( pmpro_isLevelTrial($level) ) { echo "checked='checked'"; } ?> onclick="jQuery('.trial_info').toggle();" /> <label for="custom_trial"><?php _e('Check to add a custom trial period.', 'pmpro');?></label>
417
-
418
<?php if($gateway == "twocheckout") { ?>
419
<br /><small><strong <?php if(!empty($pmpro_twocheckout_error)) { ?>class="pmpro_red"<?php } ?>><?php _e('2Checkout integration does not support custom trials. You can do one period trials by setting an initial payment different from the billing amount.', 'pmpro');?></strong></small>
420
<?php } ?>
@@ -435,11 +459,11 @@
435
?>
436
<small><?php _e('for the first', 'pmpro');?></small>
437
<input name="trial_limit" type="text" size="10" value="<?php echo esc_attr($level->trial_limit);?>" />
438
- <small><?php _e('subscription payments', 'pmpro');?>.</small>
439
<?php if($gateway == "stripe") { ?>
440
<br /><small>
441
<strong <?php if(!empty($pmpro_stripe_error)) { ?>class="pmpro_red"<?php } ?>><?php _e('Stripe integration currently does not support trial amounts greater than $0.', 'pmpro');?></strong>
442
- </small>
443
<?php } elseif($gateway == "braintree") { ?>
444
<br /><small>
445
<strong <?php if(!empty($pmpro_braintree_error)) { ?>class="pmpro_red"<?php } ?>><?php _e('Braintree integration currently does not support trial amounts greater than $0.', 'pmpro');?></strong>
@@ -447,14 +471,14 @@
447
<?php } elseif($gateway == "payflowpro") { ?>
448
<br /><small>
449
<strong <?php if(!empty($pmpro_payflow_error)) { ?>class="pmpro_red"<?php } ?>><?php _e('Payflow integration currently does not support trial amounts greater than $0.', 'pmpro');?></strong>
450
- </small>
451
<?php } ?>
452
</td>
453
</tr>
454
-
455
</tbody>
456
</table>
457
-
458
<h3 class="topborder"><?php _e('Other Settings', 'pmpro');?></h3>
459
<table class="form-table">
460
<tbody>
@@ -462,15 +486,15 @@
462
<th scope="row" valign="top"><label><?php _e('Disable New Signups', 'pmpro');?>:</label></th>
463
<td><input id="disable_signups" name="disable_signups" type="checkbox" value="yes" <?php if($level->id && !$level->allow_signups) { ?>checked="checked"<?php } ?> /> <label for="disable_signups"><?php _e('Check to hide this level from the membership levels page and disable registration.', 'pmpro');?></label></td>
464
</tr>
465
-
466
<tr>
467
<th scope="row" valign="top"><label><?php _e('Membership Expiration', 'pmpro');?>:</label></th>
468
<td><input id="expiration" name="expiration" type="checkbox" value="yes" <?php if(pmpro_isLevelExpiring($level)) { echo "checked='checked'"; } ?> onclick="if(jQuery('#expiration').is(':checked')) { jQuery('.expiration_info').show(); } else { jQuery('.expiration_info').hide();}" /> <label for="expiration"><?php _e('Check this to set when membership access expires.', 'pmpro');?></label></a></td>
469
</tr>
470
-
471
<tr class="expiration_info" <?php if(!pmpro_isLevelExpiring($level)) {?>style="display: none;"<?php } ?>>
472
<th scope="row" valign="top"><label for="billing_amount"><?php _e('Expires In', 'pmpro');?>:</label></th>
473
- <td>
474
<input id="expiration_number" name="expiration_number" type="text" size="10" value="<?php echo esc_attr($level->expiration_number);?>" />
475
<select id="expiration_period" name="expiration_period">
476
<?php
@@ -482,14 +506,14 @@
482
}
483
?>
484
</select>
485
- <br /><small><?php _e('Set the duration of membership access. Note that the any future payments (recurring subscription, if any) will be cancelled when the membership expires.', 'pmpro');?></small>
486
</td>
487
- </tr>
488
</tbody>
489
</table>
490
-
491
- <?php do_action("pmpro_membership_level_after_other_settings"); ?>
492
-
493
<h3 class="topborder"><?php _e('Content Settings', 'pmpro');?></h3>
494
<table class="form-table">
495
<tbody>
@@ -500,47 +524,47 @@
500
</td>
501
</tr>
502
</tbody>
503
- </table>
504
<p class="submit topborder">
505
<input name="save" type="submit" class="button-primary" value="<?php _e('Save Level', 'pmpro'); ?>" />
506
<input name="cancel" type="button" value="<?php _e('Cancel', 'pmpro'); ?>" onclick="location.href='<?php echo add_query_arg( 'page', 'pmpro-membershiplevels' , get_admin_url(NULL, '/admin.php') ); ?>';" />
507
</p>
508
</form>
509
</div>
510
-
511
<?php
512
- }
513
else
514
{
515
$sqlQuery = "SELECT * FROM $wpdb->pmpro_membership_levels ";
516
if($s)
517
$sqlQuery .= "WHERE name LIKE '%$s%' ";
518
- $sqlQuery .= "ORDER BY id ASC";
519
-
520
- $levels = $wpdb->get_results($sqlQuery, OBJECT);
521
-
522
if(empty($_REQUEST['s']) && !empty($pmpro_level_order)) {
523
//reorder levels
524
$order = explode(',', $pmpro_level_order);
525
-
526
//put level ids in their own array
527
$level_ids = array();
528
foreach($levels as $level)
529
$level_ids[] = $level->id;
530
-
531
//remove levels from order if they are gone
532
foreach($order as $key => $level_id)
533
if(!in_array($level_id, $level_ids))
534
unset($order[$key]);
535
-
536
//add levels to the end if they aren't in the order array
537
foreach($level_ids as $level_id)
538
if(!in_array($level_id, $order))
539
$order[] = $level_id;
540
-
541
//remove dupes
542
$order = array_unique($order);
543
-
544
//save the level order
545
pmpro_setOption('level_order', implode(',', $order));
546
@@ -551,7 +575,7 @@
551
if ($level_id == $level->id)
552
$reordered_levels[] = $level;
553
}
554
- }
555
}
556
else
557
$reordered_levels = $levels;
@@ -605,7 +629,7 @@
605
?>
606
607
<h2 class="alignleft"><?php _e('Membership Levels', 'pmpro');?> <a href="<?php echo add_query_arg( array( 'page' => 'pmpro-membershiplevels', 'edit' => -1 ), get_admin_url(null, 'admin.php' ) ); ?>" class="add-new-h2"><?php _e('Add New Level', 'pmpro');?></a></h2>
608
- <form id="posts-filter" method="get" action="">
609
<p class="search-box">
610
<label class="screen-reader-text" for="post-search-input"><?php _e('Search Levels', 'pmpro');?>:</label>
611
<input type="hidden" name="page" value="pmpro-membershiplevels" />
@@ -640,7 +664,7 @@
640
foreach($reordered_levels as $level)
641
{
642
?>
643
- <tr class="<?php if($count++ % 2 == 1) { ?>alternate<?php } ?> <?php if(!$level->allow_signups) { ?>pmpro_gray<?php } ?> <?php if(!pmpro_checkLevelForStripeCompatibility($level) || !pmpro_checkLevelForBraintreeCompatibility($level) || !pmpro_checkLevelForPayflowCompatibility($level) || !pmpro_checkLevelForTwoCheckoutCompatibility($level)) { ?>pmpro_error<?php } ?>">
644
<td><?php echo $level->id?></td>
645
<td class="level_name"><a href="<?php echo add_query_arg( array( 'page' => 'pmpro-membershiplevels', 'edit' => $level->id ), admin_url( 'admin.php' ) ); ?>"><?php esc_attr_e( $level->name ); ?></a></td>
646
<td>
@@ -653,7 +677,7 @@
653
<td>
654
<?php if(!pmpro_isLevelExpiring($level)) { ?>
655
--
656
- <?php } else { ?>
657
<?php _e('After', 'pmpro');?> <?php echo $level->expiration_number?> <?php echo sornot($level->expiration_period,$level->expiration_number)?>
658
<?php } ?>
659
</td>
@@ -665,12 +689,12 @@
665
}
666
?>
667
</tbody>
668
- </table>
669
<?php
670
$table_html = ob_get_clean();
671
672
/**
673
- * Filter to change the Membership Levels table
674
* @since 1.8.10
675
*
676
* @param string $table_html HTML of the membership levels table
@@ -680,8 +704,7 @@
680
681
echo $table_html;
682
}
683
- ?>
684
-
685
<?php
686
- require_once(dirname(__FILE__) . "/admin_footer.php");
687
- ?>
3
if(!function_exists("current_user_can") || (!current_user_can("manage_options") && !current_user_can("pmpro_membershiplevels")))
4
{
5
die(__("You do not have permissions to perform this action.", "pmpro"));
6
+ }
7
+
8
global $wpdb, $msg, $msgt, $pmpro_currency_symbol;
9
10
//some vars
12
$pmpro_level_order = pmpro_getOption('level_order');
13
14
global $pmpro_stripe_error, $pmpro_braintree_error, $pmpro_payflow_error, $pmpro_twocheckout_error, $wp_version;
15
+
16
if(isset($_REQUEST['edit']))
17
$edit = intval($_REQUEST['edit']);
18
else
23
$s = sanitize_text_field($_REQUEST['s']);
24
else
25
$s = "";
26
+
27
if(isset($_REQUEST['action']))
28
$action = sanitize_text_field($_REQUEST['action']);
29
else
30
$action = false;
31
+
32
if(isset($_REQUEST['saveandnext']))
33
$saveandnext = intval($_REQUEST['saveandnext']);
34
37
if(isset($_REQUEST['deleteid']))
38
$deleteid = intval($_REQUEST['deleteid']);
39
40
+ if($action == "save_membershiplevel") {
41
$ml_name = stripslashes($_REQUEST['name']);
42
$ml_description = stripslashes($_REQUEST['description']);
43
$ml_confirmation = stripslashes($_REQUEST['confirmation']);
48
$ml_recurring = 0;
49
$ml_billing_amount = stripslashes($_REQUEST['billing_amount']);
50
$ml_cycle_number = stripslashes($_REQUEST['cycle_number']);
51
+ $ml_cycle_period = stripslashes($_REQUEST['cycle_period']);
52
$ml_billing_limit = stripslashes($_REQUEST['billing_limit']);
53
if(!empty($_REQUEST['custom_trial']))
54
$ml_custom_trial = 1;
55
else
56
$ml_custom_trial = 0;
57
$ml_trial_amount = stripslashes($_REQUEST['trial_amount']);
58
+ $ml_trial_limit = stripslashes($_REQUEST['trial_limit']);
59
if(!empty($_REQUEST['expiration']))
60
$ml_expiration = 1;
61
else
63
$ml_expiration_number = stripslashes($_REQUEST['expiration_number']);
64
$ml_expiration_period = stripslashes($_REQUEST['expiration_period']);
65
$ml_categories = array();
66
+
67
//reversing disable to allow here
68
if(empty($_REQUEST['disable_signups']))
69
$ml_allow_signups = 1;
70
else
71
$ml_allow_signups = 0;
72
73
+ foreach ( $_REQUEST as $key => $value ) {
74
+ if ( $value == 'yes' && preg_match( '/^membershipcategory_(\d+)#x2F;i', $key, $matches ) ) {
75
$ml_categories[] = $matches[1];
76
}
77
}
78
79
//clearing out values if checkboxes aren't checked
80
+ if(empty($ml_recurring)) {
81
$ml_billing_amount = $ml_cycle_number = $ml_cycle_period = $ml_billing_limit = $ml_trial_amount = $ml_trial_limit = 0;
82
+ } elseif(empty($ml_custom_trial)) {
83
$ml_trial_amount = $ml_trial_limit = 0;
84
}
85
+ if(empty($ml_expiration)) {
86
$ml_expiration_number = $ml_expiration_period = 0;
87
}
88
89
+ $wpdb->replace(
90
+ $wpdb->pmpro_membership_levels,
91
+ array(
92
+ 'id'=>max($saveid, 0),
93
+ 'name' => $ml_name,
94
+ 'description' => $ml_description,
95
+ 'confirmation' => $ml_confirmation,
96
+ 'initial_payment' => $ml_initial_payment,
97
+ 'billing_amount' => $ml_billing_amount,
98
+ 'cycle_number' => $ml_cycle_number,
99
+ 'cycle_period' => $ml_cycle_period,
100
+ 'billing_limit' => $ml_billing_limit,
101
+ 'trial_amount' => $ml_trial_amount,
102
+ 'trial_limit' => $ml_trial_limit,
103
+ 'expiration_number' => $ml_expiration_number,
104
+ 'expiration_period' => $ml_expiration_period,
105
+ 'allow_signups' => $ml_allow_signups
106
+ ),
107
+ array(
108
+ '%d', //id
109
+ '%s', //name
110
+ '%s', //description
111
+ '%s', //confirmation
112
+ '%f', //initial_payment
113
+ '%f', //billing_amount
114
+ '%d', //cycle_number
115
+ '%s', //cycle_period
116
+ '%d', //billing_limit
117
+ '%f', //trial_amount
118
+ '%d', //trial_limit
119
+ '%d', //expiration_number
120
+ '%s', //expiration_period
121
+ '%d', //allow_signups
122
+ )
123
+ );
124
+
125
+ if($saveid < 1) {
126
+ //added a level
127
+ $saveid = $wpdb->insert_id;
128
+
129
+ pmpro_updateMembershipCategories( $saveid, $ml_categories );
130
131
+ if(empty($wpdb->last_error)) {
132
+ $saveid = $wpdb->insert_id;
133
+ pmpro_updateMembershipCategories( $saveid, $ml_categories );
134
+
135
+ $edit = false;
136
+ $msg = 1;
137
+ $msgt = __("Membership level added successfully.", "pmpro");
138
+ } else {
139
+ $msg = -1;
140
+ $msgt = __("Error adding membership level.", "pmpro");
141
+ }
142
+ } else {
143
pmpro_updateMembershipCategories( $saveid, $ml_categories );
144
+
145
+ if(empty($wpdb->last_error)) {
146
$edit = false;
147
$msg = 2;
148
$msgt = __("Membership level updated successfully.", "pmpro");
149
+ } else {
150
$msg = -2;
151
$msg = true;
152
$msgt = __("Error updating membership level.", "pmpro");
153
}
154
}
155
+
156
do_action("pmpro_save_membership_level", $saveid);
157
+ }
158
elseif($action == "delete_membership_level")
159
{
160
global $wpdb;
161
162
$ml_id = intval($_REQUEST['deleteid']);
163
+
164
+ if($ml_id > 0) {
165
do_action("pmpro_delete_membership_level", $ml_id);
166
+
167
//remove any categories from the ml
168
+ $sqlQuery = $wpdb->prepare("
169
+ DELETE FROM $wpdb->pmpro_memberships_categories
170
+ WHERE membership_id = %d",
171
+ $ml_id
172
+ );
173
+
174
$r1 = $wpdb->query($sqlQuery);
175
+
176
//cancel any subscriptions to the ml
177
$r2 = true;
178
+ $user_ids = $wpdb->get_col( $wpdb->prepare( "
179
+ SELECT user_id FROM $wpdb->pmpro_memberships_users
180
+ WHERE membership_id = %d
181
+ AND status = 'active'",
182
+ $ml_id
183
+ ) );
184
+
185
+ foreach($user_ids as $user_id) {
186
//change there membership level to none. that will handle the cancel
187
+ if(pmpro_changeMembershipLevel(0, $user_id)) {
188
//okay
189
+ } else {
190
//couldn't delete the subscription
191
+ //we should probably notify the admin
192
+ $pmproemail = new PMProEmail();
193
$pmproemail->data = array("body"=>"<p>" . sprintf(__("There was an error canceling the subscription for user with ID=%d. You will want to check your payment gateway to see if their subscription is still active.", "pmpro"), $user_id) . "</p>");
194
+ $last_order = $wpdb->get_row( $wpdb->prepare( "
195
+ SELECT * FROM $wpdb->pmpro_membership_orders
196
+ WHERE user_id = %d
197
+ ORDER BY timestamp DESC LIMIT 1",
198
+ $user_id
199
+ ) );
200
if($last_order)
201
$pmproemail->data["body"] .= "<p>" . __("Last Invoice", "pmpro") . ":<br />" . nl2br(var_export($last_order, true)) . "</p>";
202
+ $pmproemail->sendEmail(get_bloginfo("admin_email"));
203
204
$r2 = false;
205
+ }
206
+ }
207
+
208
//delete the ml
209
+ $sqlQuery = $wpdb->prepare( "
210
+ DELETE FROM $wpdb->pmpro_membership_levels
211
+ WHERE id = %d LIMIT 1",
212
+ $ml_id
213
+ );
214
$r3 = $wpdb->query($sqlQuery);
215
+
216
+ if($r1 !== FALSE && $r2 !== FALSE && $r3 !== FALSE) {
217
$msg = 3;
218
$msgt = __("Membership level deleted successfully.", "pmpro");
219
+ } else {
220
$msg = -3;
221
+ $msgt = __("Error deleting membership level.", "pmpro");
222
}
223
}
224
+ else {
225
$msg = -3;
226
$msgt = __("Error deleting membership level.", "pmpro");
227
}
228
+ }
229
+
230
+ require_once(dirname(__FILE__) . "/admin_header.php");
231
?>
232
233
+ <?php
234
+ if($edit) {
235
?>
236
+
237
<h2>
238
<?php
239
if($edit > 0)
242
echo __("Add New Membership Level", "pmpro");
243
?>
244
</h2>
245
+
246
<div>
247
<?php
248
// get the level...
249
+ if(!empty($edit) && $edit > 0) {
250
+ $level = $wpdb->get_row( $wpdb->prepare( "
251
+ SELECT * FROM $wpdb->pmpro_membership_levels
252
+ WHERE id = %d LIMIT 1",
253
+ $edit
254
+ ),
255
+ OBJECT
256
+ );
257
$temp_id = $level->id;
258
+ } elseif(!empty($copy) && $copy > 0) {
259
+ $level = $wpdb->get_row( $wpdb->prepare( "
260
+ SELECT * FROM $wpdb->pmpro_membership_levels
261
+ WHERE id = %d LIMIT 1",
262
+ $copy
263
+ ),
264
+ OBJECT
265
+ );
266
$temp_id = $level->id;
267
$level->id = NULL;
268
}
269
else
270
271
// didn't find a membership level, let's add a new one...
272
+ if(empty($level)) {
273
$level = new stdClass();
274
$level->id = NULL;
275
$level->name = NULL;
283
$level->expiration_number = NULL;
284
$level->expiration_period = NULL;
285
$edit = -1;
286
+ }
287
288
//defaults for new levels
289
+ if(empty($copy) && $edit == -1) {
290
$level->cycle_number = 1;
291
$level->cycle_period = "Month";
292
}
293
+
294
// grab the categories for the given level...
295
if(!empty($temp_id))
296
+ $level->categories = $wpdb->get_col( $wpdb->prepare( "
297
+ SELECT c.category_id
298
+ FROM $wpdb->pmpro_memberships_categories c
299
+ WHERE c.membership_id = %d",
300
+ $temp_id
301
+ ) );
302
if(empty($level->categories))
303
+ $level->categories = array();
304
+
305
?>
306
<form action="" method="post" enctype="multipart/form-data">
307
<input name="saveid" type="hidden" value="<?php echo esc_attr($edit); ?>" />
311
<tr>
312
<th scope="row" valign="top"><label><?php _e('ID', 'pmpro');?>:</label></th>
313
<td>
314
+ <?php echo $level->id?>
315
</td>
316
+ </tr>
317
+
318
<tr>
319
<th scope="row" valign="top"><label for="name"><?php _e('Name', 'pmpro');?>:</label></th>
320
<td><input name="name" type="text" size="50" value="<?php echo esc_attr($level->name);?>" /></td>
321
</tr>
322
+
323
<tr>
324
<th scope="row" valign="top"><label for="description"><?php _e('Description', 'pmpro');?>:</label></th>
325
<td>
326
+ <div id="poststuff" class="pmpro_description">
327
+ <?php
328
if(version_compare($wp_version, "3.3") >= 0)
329
+ wp_editor($level->description, "description", array("textarea_rows"=>5));
330
else
331
{
332
?>
333
<textarea rows="10" cols="80" name="description" id="description"><?php echo esc_textarea($level->description);?></textarea>
334
<?php
335
}
336
+ ?>
337
+ </div>
338
</td>
339
</tr>
340
+
341
<tr>
342
<th scope="row" valign="top"><label for="confirmation"><?php _e('Confirmation Message', 'pmpro');?>:</label></th>
343
<td>
344
+ <div class="pmpro_confirmation">
345
+ <?php
346
if(version_compare($wp_version, "3.3") >= 0)
347
+ wp_editor($level->confirmation, "confirmation", array("textarea_rows"=>5));
348
else
349
{
350
?>
351
+ <textarea rows="10" cols="80" name="confirmation" id="confirmation"><?php echo esc_textarea($level->confirmation);?></textarea>
352
<?php
353
}
354
?>
355
+ </div>
356
</td>
357
</tr>
358
</tbody>
359
</table>
360
+
361
<h3 class="topborder"><?php _e('Billing Details', 'pmpro');?></h3>
362
<table class="form-table">
363
<tbody>
368
if(pmpro_getCurrencyPosition() == "left")
369
echo $pmpro_currency_symbol;
370
?>
371
+ <input name="initial_payment" type="text" size="20" value="<?php echo esc_attr($level->initial_payment);?>" />
372
<?php
373
if(pmpro_getCurrencyPosition() == "right")
374
echo $pmpro_currency_symbol;
375
?>
376
<small><?php _e('The initial amount collected at registration.', 'pmpro');?></small></td>
377
</tr>
378
+
379
<tr>
380
<th scope="row" valign="top"><label><?php _e('Recurring Subscription', 'pmpro');?>:</label></th>
381
<td><input id="recurring" name="recurring" type="checkbox" value="yes" <?php if(pmpro_isLevelRecurring($level)) { echo "checked='checked'"; } ?> onclick="if(jQuery('#recurring').is(':checked')) { jQuery('.recurring_info').show(); if(jQuery('#custom_trial').is(':checked')) {jQuery('.trial_info').show();} else {jQuery('.trial_info').hide();} } else { jQuery('.recurring_info').hide();}" /> <label for="recurring"><?php _e('Check if this level has a recurring subscription payment.', 'pmpro');?></label></td>
382
</tr>
383
+
384
<tr class="recurring_info" <?php if(!pmpro_isLevelRecurring($level)) {?>style="display: none;"<?php } ?>>
385
<th scope="row" valign="top"><label for="billing_amount"><?php _e('Billing Amount', 'pmpro');?>:</label></th>
386
<td>
388
if(pmpro_getCurrencyPosition() == "left")
389
echo $pmpro_currency_symbol;
390
?>
391
+ <input name="billing_amount" type="text" size="20" value="<?php echo esc_attr($level->billing_amount);?>" />
392
<?php
393
if(pmpro_getCurrencyPosition() == "right")
394
echo $pmpro_currency_symbol;
405
}
406
?>
407
</select>
408
+ <br /><small>
409
+ <?php _e('The amount to be billed one cycle after the initial payment.', 'pmpro');?>
410
<?php if($gateway == "stripe") { ?>
411
<br /><strong <?php if(!empty($pmpro_stripe_error)) { ?>class="pmpro_red"<?php } ?>><?php _e('Stripe integration currently only supports billing periods of "Week", "Month" or "Year".', 'pmpro');?>
412
<?php } elseif($gateway == "braintree") { ?>
413
+ <br /><strong <?php if(!empty($pmpro_braintree_error)) { ?>class="pmpro_red"<?php } ?>><?php _e('Braintree integration currently only supports billing periods of "Month" or "Year".', 'pmpro');?>
414
<?php } ?>
415
+ </small>
416
<?php if($gateway == "braintree" && $edit < 0) { ?>
417
<p class="pmpro_message"><strong><?php _e('Note', 'pmpro');?>:</strong> <?php _e('After saving this level, make note of the ID and create a "Plan" in your Braintree dashboard with the same settings and the "Plan ID" set to <em>pmpro_#</em>, where # is the level ID.', 'pmpro');?></p>
418
<?php } elseif($gateway == "braintree") { ?>
419
<p class="pmpro_message"><strong><?php _e('Note', 'pmpro');?>:</strong> <?php _e('You will need to create a "Plan" in your Braintree dashboard with the same settings and the "Plan ID" set to', 'pmpro');?> <em>pmpro_<?php echo $level->id;?></em>.</p>
420
+ <?php } ?>
421
</td>
422
+ </tr>
423
+
424
<tr class="recurring_info" <?php if(!pmpro_isLevelRecurring($level)) {?>style="display: none;"<?php } ?>>
425
<th scope="row" valign="top"><label for="billing_limit"><?php _e('Billing Cycle Limit', 'pmpro');?>:</label></th>
426
<td>
427
<input name="billing_limit" type="text" size="20" value="<?php echo $level->billing_limit?>" />
428
<br /><small>
429
+ <?php _e('The <strong>total</strong> number of recurring billing cycles for this level, including the trial period (if applicable) but not including the initial payment. Set to zero if membership is indefinite.', 'pmpro');?>
430
<?php if($gateway == "stripe") { ?>
431
+ <br /><strong <?php if(!empty($pmpro_stripe_error)) { ?>class="pmpro_red"<?php } ?>><?php _e('Stripe integration currently does not support billing limits. You can still set an expiration date below.', 'pmpro');?></strong>
432
<?php } ?>
433
</small>
434
</td>
435
+ </tr>
436
437
<tr class="recurring_info" <?php if (!pmpro_isLevelRecurring($level)) echo "style='display:none;'";?>>
438
<th scope="row" valign="top"><label><?php _e('Custom Trial', 'pmpro');?>:</label></th>
439
<td>
440
<input id="custom_trial" name="custom_trial" type="checkbox" value="yes" <?php if ( pmpro_isLevelTrial($level) ) { echo "checked='checked'"; } ?> onclick="jQuery('.trial_info').toggle();" /> <label for="custom_trial"><?php _e('Check to add a custom trial period.', 'pmpro');?></label>
441
+
442
<?php if($gateway == "twocheckout") { ?>
443
<br /><small><strong <?php if(!empty($pmpro_twocheckout_error)) { ?>class="pmpro_red"<?php } ?>><?php _e('2Checkout integration does not support custom trials. You can do one period trials by setting an initial payment different from the billing amount.', 'pmpro');?></strong></small>
444
<?php } ?>
459
?>
460
<small><?php _e('for the first', 'pmpro');?></small>
461
<input name="trial_limit" type="text" size="10" value="<?php echo esc_attr($level->trial_limit);?>" />
462
+ <small><?php _e('subscription payments', 'pmpro');?>.</small>
463
<?php if($gateway == "stripe") { ?>
464
<br /><small>
465
<strong <?php if(!empty($pmpro_stripe_error)) { ?>class="pmpro_red"<?php } ?>><?php _e('Stripe integration currently does not support trial amounts greater than $0.', 'pmpro');?></strong>
466
+ </small>
467
<?php } elseif($gateway == "braintree") { ?>
468
<br /><small>
469
<strong <?php if(!empty($pmpro_braintree_error)) { ?>class="pmpro_red"<?php } ?>><?php _e('Braintree integration currently does not support trial amounts greater than $0.', 'pmpro');?></strong>
471
<?php } elseif($gateway == "payflowpro") { ?>
472
<br /><small>
473
<strong <?php if(!empty($pmpro_payflow_error)) { ?>class="pmpro_red"<?php } ?>><?php _e('Payflow integration currently does not support trial amounts greater than $0.', 'pmpro');?></strong>
474
+ </small>
475
<?php } ?>
476
</td>
477
</tr>
478
+
479
</tbody>
480
</table>
481
+
482
<h3 class="topborder"><?php _e('Other Settings', 'pmpro');?></h3>
483
<table class="form-table">
484
<tbody>
486
<th scope="row" valign="top"><label><?php _e('Disable New Signups', 'pmpro');?>:</label></th>
487
<td><input id="disable_signups" name="disable_signups" type="checkbox" value="yes" <?php if($level->id && !$level->allow_signups) { ?>checked="checked"<?php } ?> /> <label for="disable_signups"><?php _e('Check to hide this level from the membership levels page and disable registration.', 'pmpro');?></label></td>
488
</tr>
489
+
490
<tr>
491
<th scope="row" valign="top"><label><?php _e('Membership Expiration', 'pmpro');?>:</label></th>
492
<td><input id="expiration" name="expiration" type="checkbox" value="yes" <?php if(pmpro_isLevelExpiring($level)) { echo "checked='checked'"; } ?> onclick="if(jQuery('#expiration').is(':checked')) { jQuery('.expiration_info').show(); } else { jQuery('.expiration_info').hide();}" /> <label for="expiration"><?php _e('Check this to set when membership access expires.', 'pmpro');?></label></a></td>
493
</tr>
494
+
495
<tr class="expiration_info" <?php if(!pmpro_isLevelExpiring($level)) {?>style="display: none;"<?php } ?>>
496
<th scope="row" valign="top"><label for="billing_amount"><?php _e('Expires In', 'pmpro');?>:</label></th>
497
+ <td>
498
<input id="expiration_number" name="expiration_number" type="text" size="10" value="<?php echo esc_attr($level->expiration_number);?>" />
499
<select id="expiration_period" name="expiration_period">
500
<?php
506
}
507
?>
508
</select>
509
+ <br /><small><?php _e('Set the duration of membership access. Note that the any future payments (recurring subscription, if any) will be cancelled when the membership expires.', 'pmpro');?></small>
510
</td>
511
+ </tr>
512
</tbody>
513
</table>
514
+
515
+ <?php do_action("pmpro_membership_level_after_other_settings"); ?>
516
+
517
<h3 class="topborder"><?php _e('Content Settings', 'pmpro');?></h3>
518
<table class="form-table">
519
<tbody>
524
</td>
525
</tr>
526
</tbody>
527
+ </table>
528
<p class="submit topborder">
529
<input name="save" type="submit" class="button-primary" value="<?php _e('Save Level', 'pmpro'); ?>" />
530
<input name="cancel" type="button" value="<?php _e('Cancel', 'pmpro'); ?>" onclick="location.href='<?php echo add_query_arg( 'page', 'pmpro-membershiplevels' , get_admin_url(NULL, '/admin.php') ); ?>';" />
531
</p>
532
</form>
533
</div>
534
+
535
<?php
536
+ }
537
else
538
{
539
$sqlQuery = "SELECT * FROM $wpdb->pmpro_membership_levels ";
540
if($s)
541
$sqlQuery .= "WHERE name LIKE '%$s%' ";
542
+ $sqlQuery .= "ORDER BY id ASC";
543
+
544
+ $levels = $wpdb->get_results($sqlQuery, OBJECT);
545
+
546
if(empty($_REQUEST['s']) && !empty($pmpro_level_order)) {
547
//reorder levels
548
$order = explode(',', $pmpro_level_order);
549
+
550
//put level ids in their own array
551
$level_ids = array();
552
foreach($levels as $level)
553
$level_ids[] = $level->id;
554
+
555
//remove levels from order if they are gone
556
foreach($order as $key => $level_id)
557
if(!in_array($level_id, $level_ids))
558
unset($order[$key]);
559
+
560
//add levels to the end if they aren't in the order array
561
foreach($level_ids as $level_id)
562
if(!in_array($level_id, $order))
563
$order[] = $level_id;
564
+
565
//remove dupes
566
$order = array_unique($order);
567
+
568
//save the level order
569
pmpro_setOption('level_order', implode(',', $order));
570
575
if ($level_id == $level->id)
576
$reordered_levels[] = $level;
577
}
578
+ }
579
}
580
else
581
$reordered_levels = $levels;
629
?>
630
631
<h2 class="alignleft"><?php _e('Membership Levels', 'pmpro');?> <a href="<?php echo add_query_arg( array( 'page' => 'pmpro-membershiplevels', 'edit' => -1 ), get_admin_url(null, 'admin.php' ) ); ?>" class="add-new-h2"><?php _e('Add New Level', 'pmpro');?></a></h2>
632
+ <form id="posts-filter" method="get" action="">
633
<p class="search-box">
634
<label class="screen-reader-text" for="post-search-input"><?php _e('Search Levels', 'pmpro');?>:</label>
635
<input type="hidden" name="page" value="pmpro-membershiplevels" />
664
foreach($reordered_levels as $level)
665
{
666
?>
667
+ <tr class="<?php if($count++ % 2 == 1) { ?>alternate<?php } ?> <?php if(!$level->allow_signups) { ?>pmpro_gray<?php } ?> <?php if(!pmpro_checkLevelForStripeCompatibility($level) || !pmpro_checkLevelForBraintreeCompatibility($level) || !pmpro_checkLevelForPayflowCompatibility($level) || !pmpro_checkLevelForTwoCheckoutCompatibility($level)) { ?>pmpro_error<?php } ?>">
668
<td><?php echo $level->id?></td>
669
<td class="level_name"><a href="<?php echo add_query_arg( array( 'page' => 'pmpro-membershiplevels', 'edit' => $level->id ), admin_url( 'admin.php' ) ); ?>"><?php esc_attr_e( $level->name ); ?></a></td>
670
<td>
677
<td>
678
<?php if(!pmpro_isLevelExpiring($level)) { ?>
679
--
680
+ <?php } else { ?>
681
<?php _e('After', 'pmpro');?> <?php echo $level->expiration_number?> <?php echo sornot($level->expiration_period,$level->expiration_number)?>
682
<?php } ?>
683
</td>
689
}
690
?>
691
</tbody>
692
+ </table>
693
<?php
694
$table_html = ob_get_clean();
695
696
/**
697
+ * Filter to change the Membership Levels table
698
* @since 1.8.10
699
*
700
* @param string $table_html HTML of the membership levels table
704
705
echo $table_html;
706
}
707
+ ?>
708
+
709
<?php
710
+ require_once(dirname(__FILE__) . "/admin_footer.php");
adminpages/reports.php CHANGED
@@ -32,13 +32,15 @@
32
<?php
33
}
34
?>
35
- <div id="pmpro_report_<?php echo $report; ?>" class="postbox pmpro_clickable" onclick="location.href='<?php echo admin_url("admin.php?page=pmpro-reports&report=" . $report);?>';">
36
- <h2 class="hndle"><span><?php echo $title; ?></span></h2>
37
<div class="inside">
38
<?php call_user_func("pmpro_report_" . $report . "_widget"); ?>
39
<p style="text-align:center;">
40
<a class="button button-primary" href="<?php echo admin_url("admin.php?page=pmpro-reports&report=" . $report);?>"><?php _e('Details', 'pmpro');?></a>
41
</p>
42
</div>
43
</div>
44
<?php
32
<?php
33
}
34
?>
35
+ <div id="pmpro_report_<?php echo $report; ?>" class="postbox">
36
+ <h2><span><?php echo $title; ?></span></h2>
37
<div class="inside">
38
<?php call_user_func("pmpro_report_" . $report . "_widget"); ?>
39
+ <?php if(function_exists('pmpro_report_' . $report . '_page')) { ?>
40
<p style="text-align:center;">
41
<a class="button button-primary" href="<?php echo admin_url("admin.php?page=pmpro-reports&report=" . $report);?>"><?php _e('Details', 'pmpro');?></a>
42
</p>
43
+ <?php } ?>
44
</div>
45
</div>
46
<?php
adminpages/reports/memberships.php CHANGED
@@ -28,6 +28,9 @@ add_action( 'init', 'pmpro_report_memberships_init' );
28
//widget
29
function pmpro_report_memberships_widget() {
30
global $wpdb;
31
?>
32
<span id="pmpro_report_memberships">
33
<table class="wp-list-table widefat fixed striped">
@@ -38,30 +41,59 @@ function pmpro_report_memberships_widget() {
38
<th scope="col"><?php _e('All Cancellations','pmpro'); ?></th>
39
</tr>
40
</thead>
41
- <tbody>
42
- <tr>
43
- <th scope="row"><?php _e('Today','pmpro'); ?></th>
44
- <td><?php echo number_format_i18n(pmpro_getSignups('today')); ?></td>
45
- <td><?php echo number_format_i18n(pmpro_getCancellations('today')); ?></td>
46
- </tr>
47
- <tr>
48
- <th scope="row"><?php _e('This Month','pmpro'); ?></th>
49
- <td><?php echo number_format_i18n(pmpro_getSignups('this month')); ?></td>
50
- <td><?php echo number_format_i18n(pmpro_getCancellations('this month')); ?></td>
51
- </tr>
52
- <tr>
53
- <th scope="row"><?php _e('This Year','pmpro'); ?></th>
54
- <td><?php echo number_format_i18n(pmpro_getSignups('this year')); ?></td>
55
- <td><?php echo number_format_i18n(pmpro_getCancellations('this year')); ?></td>
56
- </tr>
57
- <tr>
58
- <th scope="row"><?php _e('All Time','pmpro'); ?></th>
59
- <td><?php echo number_format_i18n(pmpro_getSignups('all time')); ?></td>
60
- <td><?php echo number_format_i18n(pmpro_getCancellations('all time')); ?></td>
61
- </tr>
62
- </tbody>
63
</table>
64
</span>
65
<?php
66
}
67
@@ -213,10 +245,7 @@ function pmpro_report_memberships_page()
213
if ( $type === "signup_v_cancel" || $type === "signup_v_expiration" || $type === "signup_v_all" )
214
{
215
$sqlQuery = "SELECT $date_function(mu1.modified) as date, COUNT(DISTINCT mu1.user_id) as cancellations
216
- FROM $wpdb->pmpro_memberships_users mu1
217
- LEFT JOIN $wpdb->pmpro_memberships_users mu2 ON mu1.user_id = mu2.user_id AND
218
- mu2.modified > mu1.enddate AND
219
- DATE_ADD(mu1.modified, INTERVAL 1 DAY) > mu2.startdate ";
220
if ( $type === "signup_v_cancel")
221
$sqlQuery .= "WHERE mu1.status IN('inactive','cancelled','cancelled_admin') ";
222
elseif($type === "signup_v_expiration")
@@ -224,8 +253,7 @@ function pmpro_report_memberships_page()
224
else
225
$sqlQuery .= "WHERE mu1.status IN('inactive','expired','cancelled','cancelled_admin') ";
226
227
- $sqlQuery .= "AND mu2.id IS NULL
228
- AND mu1.startdate >= '" . $startdate . "'
229
AND mu1.startdate < '" . $enddate . "' ";
230
231
//restrict by level
@@ -480,7 +508,7 @@ function pmpro_getSignups($period = false, $levels = 'all')
480
* @param array(string) $status - Array of statuses to fetch data for
481
* @return null|int - The # of cancellations for the period specified
482
*/
483
- function pmpro_getCancellations($period = null, $levels = 'all', $status = array('inactive','expired','cancelled','cancelled_admin') )
484
{
485
//make sure status is an array
486
if(!is_array($status))
@@ -525,14 +553,10 @@ function pmpro_getCancellations($period = null, $levels = 'all', $status = array
525
*/
526
global $wpdb;
527
528
- $sqlQuery = "
529
- SELECT COUNT(mu1.id)
530
- FROM {$wpdb->pmpro_memberships_users} AS mu1
531
- LEFT JOIN {$wpdb->pmpro_memberships_users} AS mu2 ON mu1.user_id = mu2.user_id AND
532
- mu2.modified > mu1.enddate AND
533
- DATE_ADD(mu1.modified, INTERVAL 1 DAY) > mu2.startdate
534
WHERE mu1.status IN('" . implode("','", $status) . "')
535
- AND mu2.id IS NULL
536
AND mu1.enddate >= '" . $startdate . "'
537
AND mu1.enddate <= " . $enddate . "
538
";
28
//widget
29
function pmpro_report_memberships_widget() {
30
global $wpdb;
31
+
32
+ //get levels to show stats on first 3
33
+ $levels = pmpro_getAllLevels(true, true);
34
?>
35
<span id="pmpro_report_memberships">
36
<table class="wp-list-table widefat fixed striped">
41
<th scope="col"><?php _e('All Cancellations','pmpro'); ?></th>
42
</tr>
43
</thead>
44
+ <?php
45
+ $reports = array(
46
+ 'today'=> __('Today', 'pmpro'),
47
+ 'this month'=> __('This Month', 'pmpro'),
48
+ 'this year'=> __('This Year', 'pmpro'),
49
+ 'all time'=> __('All Time', 'pmpro'),
50
+ );
51
+
52
+ foreach($reports as $report_type => $report_name) {
53
+ ?>
54
+ <tbody>
55
+ <tr class="pmpro_report_tr">
56
+ <th scope="row"><button class="pmpro_report_th pmpro_report_th_closed"><?php echo $report_name; ?></button></th>
57
+ <td><?php echo number_format_i18n(pmpro_getSignups($report_type)); ?></td>
58
+ <td><?php echo number_format_i18n(pmpro_getCancellations($report_type)); ?></td>
59
+ </tr>
60
+ <?php
61
+ //level stats
62
+ $count = 0;
63
+ foreach($levels as $level) {
64
+ if($count++ > 2) break;
65
+ ?>
66
+ <tr class="pmpro_report_tr_sub" style="display: none;">
67
+ <th scope="row">- <?php echo $level->name;?></th>
68
+ <td><?php echo number_format_i18n(pmpro_getSignups($report_type, $level->id)); ?></td>
69
+ <td><?php echo number_format_i18n(pmpro_getCancellations($report_type, $level->id)); ?></td>
70
+ </tr>
71
+ <?php
72
+ }
73
+ ?>
74
+ </tbody>
75
+ <?php
76
+ }
77
+ ?>
78
</table>
79
</span>
80
+ <script>
81
+ jQuery(document).ready(function() {
82
+ jQuery('.pmpro_report_th ').click(function() {
83
+ //toggle sub rows
84
+ jQuery(this).closest('tbody').find('.pmpro_report_tr_sub').toggle();
85
+
86
+ //change arrow
87
+ if(jQuery(this).hasClass('pmpro_report_th_closed')) {
88
+ jQuery(this).removeClass('pmpro_report_th_closed');
89
+ jQuery(this).addClass('pmpro_report_th_opened');
90
+ } else {
91
+ jQuery(this).removeClass('pmpro_report_th_opened');
92
+ jQuery(this).addClass('pmpro_report_th_closed');
93
+ }
94
+ });
95
+ });
96
+ </script>
97
<?php
98
}
99
245
if ( $type === "signup_v_cancel" || $type === "signup_v_expiration" || $type === "signup_v_all" )
246
{
247
$sqlQuery = "SELECT $date_function(mu1.modified) as date, COUNT(DISTINCT mu1.user_id) as cancellations
248
+ FROM $wpdb->pmpro_memberships_users mu1 ";
249
if ( $type === "signup_v_cancel")
250
$sqlQuery .= "WHERE mu1.status IN('inactive','cancelled','cancelled_admin') ";
251
elseif($type === "signup_v_expiration")
253
else
254
$sqlQuery .= "WHERE mu1.status IN('inactive','expired','cancelled','cancelled_admin') ";
255
256
+ $sqlQuery .= "AND mu1.startdate >= '" . $startdate . "'
257
AND mu1.startdate < '" . $enddate . "' ";
258
259
//restrict by level
508
* @param array(string) $status - Array of statuses to fetch data for
509
* @return null|int - The # of cancellations for the period specified
510
*/
511
+ function pmpro_getCancellations($period = null, $levels = 'all', $status = array('inactive','expired','cancelled','admin_cancelled') )
512
{
513
//make sure status is an array
514
if(!is_array($status))
553
*/
554
global $wpdb;
555
556
+ $sqlQuery = "
557
+ SELECT COUNT( DISTINCT mu1.user_id )
558
+ FROM {$wpdb->pmpro_memberships_users} AS mu1
559
WHERE mu1.status IN('" . implode("','", $status) . "')
560
AND mu1.enddate >= '" . $startdate . "'
561
AND mu1.enddate <= " . $enddate . "
562
";
classes/class.memberorder.php CHANGED
@@ -190,8 +190,9 @@
190
*
191
* @param int $user_id ID of user to find order for.
192
* @param string $status Limit search to only orders with this status. Defaults to "success".
193
- * @param id $membership_id Limit search to only orders for this membership level. Defaults to NULL to find orders for any level.
194
*
195
*/
196
function getLastMemberOrder($user_id = NULL, $status = 'success', $membership_id = NULL, $gateway = NULL, $gateway_environment = NULL)
197
{
190
*
191
* @param int $user_id ID of user to find order for.
192
* @param string $status Limit search to only orders with this status. Defaults to "success".
193
+ * @param int $membership_id Limit search to only orders for this membership level. Defaults to NULL to find orders for any level.
194
*
195
+ * @return MemberOrder
196
*/
197
function getLastMemberOrder($user_id = NULL, $status = 'success', $membership_id = NULL, $gateway = NULL, $gateway_environment = NULL)
198
{
classes/gateways/class.pmprogateway_braintree.php CHANGED
@@ -92,7 +92,9 @@
92
if($default_gateway == "braintree" || $current_gateway == "braintree" && empty($_REQUEST['review'])) //$_REQUEST['review'] means the PayPal Express review page
93
{
94
add_action('pmpro_checkout_before_submit_button', array('PMProGateway_braintree', 'pmpro_checkout_before_submit_button'));
95
add_filter('pmpro_checkout_order', array('PMProGateway_braintree', 'pmpro_checkout_order'));
96
add_filter('pmpro_required_billing_fields', array('PMProGateway_braintree', 'pmpro_required_billing_fields'));
97
add_filter('pmpro_include_payment_information_fields', array('PMProGateway_braintree', 'pmpro_include_payment_information_fields'));
98
}
@@ -613,7 +615,7 @@
613
return $this->customer;
614
}
615
else
616
- {
617
$order->error = __("Failed to update customer.", "pmpro") . " " . $response->message;
618
$order->shorterror = $order->error;
619
return false;
@@ -791,7 +793,7 @@
791
}
792
793
function update(&$order)
794
- {
795
//we just have to run getCustomer which will look for the customer and update it with the new token
796
$this->getCustomer($order, true);
797
92
if($default_gateway == "braintree" || $current_gateway == "braintree" && empty($_REQUEST['review'])) //$_REQUEST['review'] means the PayPal Express review page
93
{
94
add_action('pmpro_checkout_before_submit_button', array('PMProGateway_braintree', 'pmpro_checkout_before_submit_button'));
95
+ add_action('pmpro_billing_before_submit_button', array('PMProGateway_braintree', 'pmpro_checkout_before_submit_button'));
96
add_filter('pmpro_checkout_order', array('PMProGateway_braintree', 'pmpro_checkout_order'));
97
+ add_filter('pmpro_billing_order', array('PMProGateway_braintree', 'pmpro_checkout_order'));
98
add_filter('pmpro_required_billing_fields', array('PMProGateway_braintree', 'pmpro_required_billing_fields'));
99
add_filter('pmpro_include_payment_information_fields', array('PMProGateway_braintree', 'pmpro_include_payment_information_fields'));
100
}
615
return $this->customer;
616
}
617
else
618
+ {
619
$order->error = __("Failed to update customer.", "pmpro") . " " . $response->message;
620
$order->shorterror = $order->error;
621
return false;
793
}
794
795
function update(&$order)
796
+ {
797
//we just have to run getCustomer which will look for the customer and update it with the new token
798
$this->getCustomer($order, true);
799
classes/gateways/class.pmprogateway_stripe.php CHANGED
@@ -102,7 +102,8 @@
102
//old global RE showing billing address or not
103
global $pmpro_stripe_lite;
104
$pmpro_stripe_lite = apply_filters("pmpro_stripe_lite", !pmpro_getOption("stripe_billingaddress")); //default is oposite of the stripe_billingaddress setting
105
-
106
//updates cron
107
add_action('pmpro_cron_stripe_subscription_updates', array('PMProGateway_stripe', 'pmpro_cron_stripe_subscription_updates'));
108
@@ -122,6 +123,7 @@
122
if(($default_gateway == "stripe" || $current_gateway == "stripe") && empty($_REQUEST['review'])) //$_REQUEST['review'] means the PayPal Express review page
123
{
124
add_action('pmpro_checkout_preheader', array('PMProGateway_stripe', 'pmpro_checkout_preheader'));
125
add_filter('pmpro_checkout_order', array('PMProGateway_stripe', 'pmpro_checkout_order'));
126
add_filter('pmpro_include_billing_address_fields', array('PMProGateway_stripe', 'pmpro_include_billing_address_fields'));
127
add_filter('pmpro_include_cardtype_field', array('PMProGateway_stripe', 'pmpro_include_billing_address_fields'));
@@ -265,8 +267,11 @@
265
var tokenNum = 0;
266
267
jQuery(document).ready(function() {
268
- jQuery("#pmpro_form, .pmpro_form").submit(function(event) {
269
-
270
//double check in case a discount code made the level free
271
if(pmpro_require_billing)
272
{
@@ -300,12 +305,16 @@
300
args['name'] = jQuery.trim(jQuery('#bfirstname').val() + ' ' + jQuery('#blastname').val());
301
302
//create token(s)
303
- var levelnums = jQuery("#level").val().split(",");
304
- for(var cnt = 0, len = levelnums.length; cnt < len; cnt++) {
305
Stripe.createToken(args, stripeResponseHandler);
306
}
307
-
308
- // prevent the form from submitting with the default action
309
return false;
310
}
311
else
@@ -316,7 +325,7 @@
316
function stripeResponseHandler(status, response) {
317
if (response.error) {
318
// re-enable the submit button
319
- jQuery('.pmpro_btn-submit-checkout').removeAttr("disabled");
320
321
//hide processing message
322
jQuery('#pmpro_processing_message').css('visibility', 'hidden');
@@ -338,7 +347,7 @@
338
if(jQuery('#CardType[name=CardType]').length)
339
jQuery('#CardType').val(response['card']['brand']);
340
else
341
- form$.append("<input type='hidden' name='CardType' value='" + response['card']['brand'] + "'/>");
342
form$.append("<input type='hidden' name='AccountNumber' value='XXXXXXXXXXXX" + response['card']['last4'] + "'/>");
343
form$.append("<input type='hidden' name='ExpirationMonth' value='" + ("0" + response['card']['exp_month']).slice(-2) + "'/>");
344
form$.append("<input type='hidden' name='ExpirationYear' value='" + response['card']['exp_year'] + "'/>");
@@ -362,6 +371,35 @@
362
add_filter("pmpro_required_billing_fields", "pmpro_stripe_dont_require_CVV");
363
}
364
}
365
366
/**
367
* Filtering orders at checkout.
102
//old global RE showing billing address or not
103
global $pmpro_stripe_lite;
104
$pmpro_stripe_lite = apply_filters("pmpro_stripe_lite", !pmpro_getOption("stripe_billingaddress")); //default is oposite of the stripe_billingaddress setting
105
+ add_filter('pmpro_required_billing_fields', array('PMProGateway_stripe', 'pmpro_required_billing_fields'));
106
+
107
//updates cron
108
add_action('pmpro_cron_stripe_subscription_updates', array('PMProGateway_stripe', 'pmpro_cron_stripe_subscription_updates'));
109
123
if(($default_gateway == "stripe" || $current_gateway == "stripe") && empty($_REQUEST['review'])) //$_REQUEST['review'] means the PayPal Express review page
124
{
125
add_action('pmpro_checkout_preheader', array('PMProGateway_stripe', 'pmpro_checkout_preheader'));
126
+ add_action('pmpro_billing_preheader', array('PMProGateway_stripe', 'pmpro_checkout_preheader'));
127
add_filter('pmpro_checkout_order', array('PMProGateway_stripe', 'pmpro_checkout_order'));
128
add_filter('pmpro_include_billing_address_fields', array('PMProGateway_stripe', 'pmpro_include_billing_address_fields'));
129
add_filter('pmpro_include_cardtype_field', array('PMProGateway_stripe', 'pmpro_include_billing_address_fields'));
267
var tokenNum = 0;
268
269
jQuery(document).ready(function() {
270
+ jQuery(".pmpro_form").submit(function(event) {
271
+
272
+ // prevent the form from submitting with the default action
273
+ event.preventDefault();
274
+
275
//double check in case a discount code made the level free
276
if(pmpro_require_billing)
277
{
305
args['name'] = jQuery.trim(jQuery('#bfirstname').val() + ' ' + jQuery('#blastname').val());
306
307
//create token(s)
308
+ if (jQuery('#level').length) {
309
+ var levelnums = jQuery("#level").val().split(",");
310
+ for(var cnt = 0, len = levelnums.length; cnt < len; cnt++) {
311
+ Stripe.createToken(args, stripeResponseHandler);
312
+ }
313
+ } else {
314
Stripe.createToken(args, stripeResponseHandler);
315
}
316
+
317
+ // prevent the form from submitting with the default action
318
return false;
319
}
320
else
325
function stripeResponseHandler(status, response) {
326
if (response.error) {
327
// re-enable the submit button
328
+ jQuery('.pmpro_btn-submit-checkout,.pmpro_btn-submit').removeAttr("disabled");
329
330
//hide processing message
331
jQuery('#pmpro_processing_message').css('visibility', 'hidden');
347
if(jQuery('#CardType[name=CardType]').length)
348
jQuery('#CardType').val(response['card']['brand']);
349
else
350
+ form$.append("<input type='hidden' name='CardType' value='" + response['card']['brand'] + "'/>");
351
form$.append("<input type='hidden' name='AccountNumber' value='XXXXXXXXXXXX" + response['card']['last4'] + "'/>");
352
form$.append("<input type='hidden' name='ExpirationMonth' value='" + ("0" + response['card']['exp_month']).slice(-2) + "'/>");
353
form$.append("<input type='hidden' name='ExpirationYear' value='" + response['card']['exp_year'] + "'/>");
371
add_filter("pmpro_required_billing_fields", "pmpro_stripe_dont_require_CVV");
372
}
373
}
374
+
375
+ /**
376
+ * Don't require the CVV.
377
+ * Don't require address fields if they are set to hide.
378
+ */
379
+ static function pmpro_required_billing_fields($fields)
380
+ {
381
+ global $pmpro_stripe_lite, $current_user, $bemail, $bconfirmemail;
382
+
383
+ //CVV is not required if set that way at Stripe. The Stripe JS will require it if it is required.
384
+ unset($fields['CVV']);
385
+
386
+ //if using stripe lite, remove some fields from the required array
387
+ if ($pmpro_stripe_lite) {
388
+ //some fields to remove
389
+ $remove = array('bfirstname', 'blastname', 'baddress1', 'bcity', 'bstate', 'bzipcode', 'bphone', 'bcountry', 'CardType');
390
+ //if a user is logged in, don't require bemail either
391
+ if (!empty($current_user->user_email)) {
392
+ $remove[] = 'bemail';
393
+ $bemail = $current_user->user_email;
394
+ $bconfirmemail = $bemail;
395
+ }
396
+ //remove the fields
397
+ foreach ($remove as $field)
398
+ unset($fields[$field]);
399
+ }
400
+
401
+ return $fields;
402
+ }
403
404
/**
405
* Filtering orders at checkout.
css/admin.css CHANGED
@@ -115,9 +115,19 @@ h2.nav-tab-wrapper {margin-bottom: 1em; }
115
116
/* reports */
117
.pmpro_reports-holder { }
118
.pmpro_clickable {cursor: pointer;}
119
.js .postbox.pmpro_clickable h3 {cursor: pointer;}
120
.pmpro_reports-holder .wp-list-table tbody td {font-size: 1.2rem; font-weight: bold; }
121
@media screen and (max-width: 782px) {
122
.pmpro_reports-holder tr:not(.inline-edit-row):not(.no-items) td:not(.check-column) {display: table-cell; }
123
}
115
116
/* reports */
117
.pmpro_reports-holder { }
118
+ .pmpro_reports-holder .postbox h2 {border-bottom: 1px solid #eee; font-size: 14px; padding: 8px 12px; margin: 0; line-height: 1.4; }
119
.pmpro_clickable {cursor: pointer;}
120
.js .postbox.pmpro_clickable h3 {cursor: pointer;}
121
.pmpro_reports-holder .wp-list-table tbody td {font-size: 1.2rem; font-weight: bold; }
122
+ .pmpro_reports-holder .wp-list-table tbody th button {border: none; background: 0 0; -webkit-border-radius: 0; border-radius: 0; color: #555; cursor: pointer; line-height: 1.7; padding: 0; }
123
+ button.pmpro_report_th:before {bottom: 2px; display: inline-block; font: 400 20px/1 dashicons; left: 0; padding: 0 5px 0 0; position: relative; vertical-align: bottom; text-decoration: none; }
124
+ button.pmpro_report_th_opened:before {content: "\f140"; }
125
+ button.pmpro_report_th_closed:before {content: "\f139"; }
126
+ .pmpro_reports-holder .wp-list-table tbody tr.pmpro_report_tr_sub:last-child th, .pmpro_reports-holder .wp-list-table tbody tr.pmpro_report_tr_sub:last-child td {border-bottom: 1px solid #CCC; }
127
+ .pmpro_reports-holder .wp-list-table tbody .pmpro_report_tr_sub th, .pmpro_reports-holder .wp-list-table tbody .pmpro_report_tr_sub td {font-size: 12px; padding: 6px 10px; }
128
+ #pmpro_report_memberships .wp-list-table tbody:nth-child(odd) .pmpro_report_tr th, #pmpro_report_memberships .wp-list-table tbody:nth-child(odd) .pmpro_report_tr td {background-color: #fff; }
129
+ #pmpro_report_memberships .wp-list-table tbody:nth-child(even) .pmpro_report_tr th, #pmpro_report_memberships .wp-list-table tbody:nth-child(even) .pmpro_report_tr td {background-color: #f9f9f9; }
130
+
131
@media screen and (max-width: 782px) {
132
.pmpro_reports-holder tr:not(.inline-edit-row):not(.no-items) td:not(.check-column) {display: table-cell; }
133
}
includes/profile.php CHANGED
@@ -92,11 +92,13 @@ function pmpro_membership_level_profile_fields($user)
92
93
//is there an end date?
94
$user->membership_level = pmpro_getMembershipLevelForUser($user->ID);
95
- $end_date = !empty($user->membership_level->enddate); // Returned as UTC timestamp
96
97
// Convert UTC to local time
98
- $user->membership_level->enddate = strtotime($wp_tz, $user->membership_level->enddate );
99
-
100
//some vars for the dates
101
$current_day = date_i18n("j", current_time('timestamp'));
102
if($end_date)
92
93
//is there an end date?
94
$user->membership_level = pmpro_getMembershipLevelForUser($user->ID);
95
+ $end_date = (!empty($user->membership_level) && !empty($user->membership_level->enddate)); // Returned as UTC timestamp
96
97
// Convert UTC to local time
98
+ if ( $end_date ) {
99
+ $user->membership_level->enddate = strtotime( $wp_tz, $user->membership_level->enddate );
100
+ }
101
+
102
//some vars for the dates
103
$current_day = date_i18n("j", current_time('timestamp'));
104
if($end_date)
includes/setup.sql CHANGED
@@ -106,8 +106,8 @@ CREATE TABLE `wp_pmpro_membership_levelmeta` (
106
`meta_key` varchar(255) NOT NULL,
107
`meta_value` longtext,
108
PRIMARY KEY (`meta_id`),
109
- KEY (`pmpro_membership_level_id`),
110
- KEY (`meta_key`)
111
);
112
113
-- --------------------------------------------------------
106
`meta_key` varchar(255) NOT NULL,
107
`meta_value` longtext,
108
PRIMARY KEY (`meta_id`),
109
+ KEY `pmpro_membership_level_id` (`pmpro_membership_level_id`),
110
+ KEY `meta_key` (`meta_key`)
111
);
112
113
-- --------------------------------------------------------
includes/upgradecheck.php CHANGED
@@ -418,8 +418,8 @@ function pmpro_db_delta()
418
`meta_key` varchar(255) NOT NULL,
419
`meta_value` longtext,
420
PRIMARY KEY (`meta_id`),
421
- KEY (`pmpro_membership_level_id`),
422
- KEY (`meta_key`)
423
);
424
";
425
dbDelta($sqlQuery);
418
`meta_key` varchar(255) NOT NULL,
419
`meta_value` longtext,
420
PRIMARY KEY (`meta_id`),
421
+ KEY `pmpro_membership_level_id` (`pmpro_membership_level_id`),
422
+ KEY `meta_key` (`meta_key`)
423
);
424
";
425
dbDelta($sqlQuery);
languages/pmpro-es_ES.mo CHANGED
Binary file
languages/pmpro-es_ES.po CHANGED
@@ -2,15 +2,16 @@ msgid ""
2
msgstr ""
3
"Project-Id-Version: pmpro\n"
4
"POT-Creation-Date: 2013-08-01 05:01-0500\n"
5
- "PO-Revision-Date: 2013-08-22 03:37-0800\n"
6
"Last-Translator: \n"
7
"Language-Team: Stranger Studios <jason@strangerstudios.com>\n"
8
"MIME-Version: 1.0\n"
9
"Content-Type: text/plain; charset=UTF-8\n"
10
"Content-Transfer-Encoding: 8bit\n"
11
- "X-Generator: Poedit 1.5.7\n"
12
"X-Poedit-KeywordsList: __;_;_e;_ex;_x;_n\n"
13
- "X-Poedit-Basepath: ../\n"
14
"X-Poedit-SearchPath-0: includes\n"
15
"X-Poedit-SearchPath-1: .\n"
16
"X-Poedit-SearchPath-2: classes\n"
@@ -70,7 +71,7 @@ msgstr "Códigos de Descuento"
70
#: includes/adminpages.php:44 adminpages/admin_header.php:128
71
#: adminpages/membershiplevels.php:490
72
msgid "Membership Levels"
73
- msgstr "Niveles de Membresía"
74
75
#: includes/cleanup.php:24
76
#, php-format
@@ -80,8 +81,8 @@ msgid ""
80
"active."
81
msgstr ""
82
"Hubo un error cancelando la subscripcion para el usuario con ID=%s. Deberías "
83
- "comprobar tu procesamiento de pagos (payment gateway) y ver si tu "
84
- "suscripción sigue activa."
85
86
#: includes/currencies.php:7 includes/currencies.php:37
87
msgid "US Dollars (&#36;)"
@@ -178,32 +179,32 @@ msgstr "baht tailandés"
178
#: includes/functions.php:160
179
#, php-format
180
msgid "The price for membership is <strong>%s</strong> now"
181
- msgstr "El precio por la membresía es <strong>%s</strong> ahora"
182
183
#: includes/functions.php:169
184
#, php-format
185
msgid " and then <strong>%s per %s for %d more %s</strong>."
186
- msgstr "y después <strong>%s por %s durante %d %s mas </strong>."
187
188
#: includes/functions.php:173
189
#, php-format
190
msgid " and then <strong>%s every %d %s for %d more %s</strong>."
191
- msgstr "y después <strong>%s cada %d %s por %d durante %s más </strong>."
192
193
#: includes/functions.php:178
194
#, php-format
195
msgid " and then <strong>%s after %d %s</strong>."
196
- msgstr "y luego <strong>%s después %d %s</strong>."
197
198
#: includes/functions.php:184
199
#, php-format
200
msgid " and then <strong>%s per %s</strong>."
201
- msgstr "y despues <strong>%s por %s</strong>."
202
203
#: includes/functions.php:188
204
#, php-format
205
msgid " and then <strong>%s every %d %s</strong>."
206
- msgstr "y después <strong>%s cada %d %s</strong>."
207
208
#: includes/functions.php:202 pages/levels.php:82
209
msgid "After your initial payment, your first payment is Free."
@@ -232,7 +233,7 @@ msgstr "A los clientes en %s se les cobrará %s%% de impuestos."
232
#: includes/functions.php:242
233
#, php-format
234
msgid "Membership expires after %d %s."
235
- msgstr "La membresía expira despues de %d %s."
236
237
#: includes/functions.php:491
238
msgid "User ID not found."
@@ -253,7 +254,7 @@ msgstr "Error interactuando con la base de datos"
253
254
#: includes/functions.php:629 includes/functions.php:668
255
msgid "Membership level not found."
256
- msgstr "Nivel de membresía no encontrado."
257
258
#: includes/functions.php:1050
259
msgid "The discount code could not be found."
@@ -275,7 +276,7 @@ msgstr "Éste cupón de descuento ya no es válido."
275
276
#: includes/functions.php:1102
277
msgid "This discount code does not apply to this membership level."
278
- msgstr "Este cupón de descuento no se puede aplicar a este nivel de membresía."
279
280
#: includes/functions.php:1110
281
msgid "This discount code is okay."
@@ -327,21 +328,21 @@ msgstr "Años"
327
328
#: includes/metaboxes.php:38
329
msgid ""
330
- "This post is already protected for this level because it is within a "
331
- "category that requires membership."
332
msgstr ""
333
- "Esta entrada ya esta protegida para este nivel por que pertenece a una "
334
- "categoría que requiere membresía."
335
336
#: includes/metaboxes.php:99 includes/metaboxes.php:100
337
msgid "Require Membership"
338
- msgstr "Requerir membresía"
339
340
#: includes/profile.php:25 adminpages/orders.php:601 pages/checkout.php:34
341
#: pages/confirmation.php:46 pages/confirmation.php:62
342
#: pages/confirmation.php:103 pages/invoice.php:27 pages/invoice.php:49
343
msgid "Membership Level"
344
- msgstr "Nivel de membresía"
345
346
#: includes/profile.php:34
347
msgid "Current Level"
@@ -391,11 +392,11 @@ msgstr "Desactivado"
391
392
#: adminpages/admin_header.php:25
393
msgid "Add a membership level to get started."
394
- msgstr "Añade un nivel de membresía para comenzar."
395
396
#: adminpages/admin_header.php:27
397
msgid "Set up the membership pages"
398
- msgstr "Configura las paginas de membresía"
399
400
#: adminpages/admin_header.php:29
401
msgid "Set up your SSL certificate and payment gateway"
@@ -406,13 +407,13 @@ msgid ""
406
"The billing details for some of your membership levels is not supported by "
407
"Stripe."
408
msgstr ""
409
- "Los detalles de facturación para alguna de tus niveles de membresía no esta "
410
"soportado por Stripe."
411
412
#: adminpages/admin_header.php:46
413
msgid ""
414
- "The billing details for this level are not supported by Stripe. Please "
415
- "review the notes in the Billing Details section below."
416
msgstr ""
417
"Los detalles de facturación para este nivel no estan soportados por Stripe. "
418
"Por favor revisa las notas en la sección Detalles de Facturación aqui debajo."
@@ -432,7 +433,7 @@ msgid ""
432
"The billing details for some of your membership levels is not supported by "
433
"Payflow."
434
msgstr ""
435
- "Los detalles de facturación de tus niveles de membresa no estan soportados "
436
"por Payflow."
437
438
#: adminpages/admin_header.php:66
@@ -448,7 +449,7 @@ msgid ""
448
"The billing details for some of your membership levels is not supported by "
449
"Braintree."
450
msgstr ""
451
- "Los detalles de facturación para alguno de tus niveles de membresía no estan "
452
"soportados por Braintree."
453
454
#: adminpages/admin_header.php:86
@@ -497,8 +498,8 @@ msgstr "Mensaje para no-miembros logeados"
497
msgid ""
498
"This message replaces the post content for non-members. Available variables"
499
msgstr ""
500
- "Este mensaje reemplaza el contenido de la entrada para no-miembros. "
501
- "Variables disponibles"
502
503
#: adminpages/advancedsettings.php:94
504
msgid "Message for Logged-out Users"
@@ -565,11 +566,11 @@ msgstr "Usar reCAPTCHA?"
565
566
#: adminpages/advancedsettings.php:200
567
msgid "Yes - Free memberships only."
568
- msgstr "Si - Solo membresías gratuitas."
569
570
#: adminpages/advancedsettings.php:201
571
msgid "Yes - All memberships."
572
- msgstr "Si - Todas las membresías."
573
574
#: adminpages/advancedsettings.php:203
575
msgid "A free reCAPTCHA key is required."
@@ -611,8 +612,8 @@ msgstr "Cupón de descuento actualizado correctamente."
611
#: adminpages/discountcodes.php:55
612
msgid "Error updating discount code. That code may already be in use."
613
msgstr ""
614
- "Error actualizando el cupón de descuento. Es posible que el cupón "
615
- "introducido ya este en uso."
616
617
#: adminpages/discountcodes.php:64
618
msgid "Discount code added successfully."
@@ -639,8 +640,8 @@ msgstr "Cupón %s borrado correctamente."
639
640
#: adminpages/discountcodes.php:239
641
msgid ""
642
- "Error deleting discount code. The code was only partially deleted. Please "
643
- "try again."
644
msgstr ""
645
"Error borrando cupón de descuento. El cupón fue parcialmente eliminado. Por "
646
"favor inténtelo de nuevo."
@@ -681,8 +682,7 @@ msgstr "Cupón"
681
msgid "Start Date"
682
msgstr "Fecha de inicio"
683
684
- #: adminpages/discountcodes.php:367 pages/billing.php:249
685
- #: pages/checkout.php:525
686
msgid "Expiration Date"
687
msgstr "Fecha de expiración"
688
@@ -725,9 +725,9 @@ msgstr "Límite del ciclo de facturación"
725
726
#: adminpages/discountcodes.php:459 adminpages/membershiplevels.php:384
727
msgid ""
728
- "The <strong>total</strong> number of recurring billing cycles for this "
729
- "level, including the trial period (if applicable) but not including the "
730
- "initial payment. Set to zero if membership is indefinite."
731
msgstr ""
732
"El número <strong>total</strong>de ciclos recurrentes para este nivel, "
733
"incluyendo el periodo de prueba ( si existe) pero no incluyendo el pago "
@@ -755,7 +755,7 @@ msgstr "pagos de susbscipción"
755
756
#: adminpages/discountcodes.php:479 adminpages/membershiplevels.php:431
757
msgid "Membership Expiration"
758
- msgstr "Expiración de la membresía"
759
760
#: adminpages/discountcodes.php:480
761
msgid "Check this to set an expiration date for new sign ups."
@@ -767,15 +767,15 @@ msgstr "Expira en"
767
768
#: adminpages/discountcodes.php:497
769
msgid ""
770
- "How long before the expiration expires. Note that any future payments will "
771
- "be cancelled when the membership expires."
772
msgstr ""
773
- "Cuanto tiempo ha de pasar antes de que la expiración expire. Ten en cuenta "
774
- "que los pagos futuros serán cancelados cuando la membresía expire."
775
776
#: adminpages/discountcodes.php:525
777
msgid "Memberships Discount Codes"
778
- msgstr "Cupónes de descuento de membresías"
779
780
#: adminpages/discountcodes.php:535
781
msgid "Search Discount Codes"
@@ -798,8 +798,8 @@ msgid ""
798
"Discount codes allow you to offer your memberships at discounted prices to "
799
"select customers."
800
msgstr ""
801
- "Los cupones de descuento te permiten ofrecer tus membresías a precios "
802
- "descontados para cierto clientes."
803
804
#: adminpages/discountcodes.php:570
805
msgid "Create your first discount code now"
@@ -841,8 +841,8 @@ msgid ""
841
"To modify the appearance of system generated emails, add the files "
842
"<em>email_header.html</em> and <em>email_footer.html</em> to your theme's "
843
"directory. This will modify both the WordPress default messages as well as "
844
- "messages generated by Paid Memberships Pro. <a title=\"Paid Memberships Pro "
845
- "- Member Communications\" target=\"_blank\" href=\"http://www."
846
"paidmembershipspro.com/documentation/member-communications/\">Click here to "
847
"learn more about Paid Memberships Pro emails</a>."
848
msgstr ""
@@ -850,9 +850,9 @@ msgstr ""
850
"los archivos <em>email_header.html</em> y <em>email_footer.html</em> al "
851
"directorio de tu tema. Esto modificará los mensajes originales de wordpress "
852
"tanto como los mensajes generados por Paid Memberships Pro. <a title=\"Paid "
853
- "Memberships Pro - Comunicaciones a miembros\" target=\"_blank\" href="
854
- "\"http://www.paidmembershipspro.com/documentation/member-communications/"
855
- "\">Haz click aquí para aprender sobre los emails de Paid Memberships Pro</a>."
856
857
#: adminpages/emailsettings.php:69
858
msgid "From Email"
@@ -881,8 +881,7 @@ msgstr "Cambios por el Admin"
881
#: adminpages/emailsettings.php:105
882
msgid "when an admin changes a user's membership level through the dashboard."
883
msgstr ""
884
- "cuando un administrador cambia el nivel de un usuario a traves del "
885
- "Escritorio."
886
887
#: adminpages/emailsettings.php:110
888
msgid "Cancellation"
@@ -919,19 +918,19 @@ msgstr ""
919
920
#: adminpages/membershiplevels.php:118
921
msgid "Membership level updated successfully."
922
- msgstr "Nivel de membresa actualizado correctamente."
923
924
#: adminpages/membershiplevels.php:124
925
msgid "Error updating membership level."
926
- msgstr "Error actualizando el nivel de membresa."
927
928
#: adminpages/membershiplevels.php:141
929
msgid "Membership level added successfully."
930
- msgstr "Nivel de membresa añadido correctamente."
931
932
#: adminpages/membershiplevels.php:146
933
msgid "Error adding membership level."
934
- msgstr "Error añadiendo nivel de membresía."
935
936
#: adminpages/membershiplevels.php:179
937
#, php-format
@@ -953,15 +952,15 @@ msgstr "Nivel de mebresa eliminado correctamente."
953
954
#: adminpages/membershiplevels.php:201 adminpages/membershiplevels.php:207
955
msgid "Error deleting membership level."
956
- msgstr "Error eliminando nivel de membresía."
957
958
#: adminpages/membershiplevels.php:222
959
msgid "Edit Membership Level"
960
- msgstr "Editar nivel de membresía"
961
962
#: adminpages/membershiplevels.php:224
963
msgid "Add New Membership Level"
964
- msgstr "Añade un nuevo nivel de membresía"
965
966
#: adminpages/membershiplevels.php:291 adminpages/membershiplevels.php:506
967
#: adminpages/reports/login.php:142
@@ -1014,11 +1013,11 @@ msgstr ""
1014
1015
#: adminpages/membershiplevels.php:366
1016
msgid ""
1017
- "Braintree integration currently only supports billing periods of \"Month\" "
1018
- "or \"Year\"."
1019
msgstr ""
1020
- "La integración con Braintree actualmente solo soporta periodos de "
1021
- "facturación \"mensuales \" o \"anuales \"."
1022
1023
#: adminpages/membershiplevels.php:368
1024
msgid ""
@@ -1056,8 +1055,8 @@ msgid ""
1056
"Stripe integration currently does not support billing limits. You can still "
1057
"set an expiration date below."
1058
msgstr ""
1059
- "La integración con Stripe actualmente no soporta límites de facturación. "
1060
- "Pero puedes elegir una fecha de expiración aqui abajo."
1061
1062
#: adminpages/membershiplevels.php:406
1063
msgid ""
@@ -1094,12 +1093,12 @@ msgid ""
1094
"Check to hide this level from the membership levels page and disable "
1095
"registration."
1096
msgstr ""
1097
- "Marcar para esconder este nivel de la página de membresías y desactivar "
1098
"registro."
1099
1100
#: adminpages/membershiplevels.php:432
1101
msgid "Check this to set when membership access expires."
1102
- msgstr "Marcar esto para elegir cuando termina el acceso a la membresía."
1103
1104
#: adminpages/membershiplevels.php:449
1105
msgid ""
@@ -1107,9 +1106,9 @@ msgid ""
1107
"(recurring subscription, if any) will be cancelled when the membership "
1108
"expires."
1109
msgstr ""
1110
- "Elige la duración de acceso para la membresía. Ten en cuenta que cualquier "
1111
- "futuro pago ( subscripciones recurrentes, si las hay) serán canceladas "
1112
- "cuando la membresía expire."
1113
1114
#: adminpages/membershiplevels.php:457
1115
msgid "Content Settings"
@@ -1171,7 +1170,7 @@ msgid ""
1171
"Are you sure you want to delete membership level %s? All subscriptions will "
1172
"be cancelled."
1173
msgstr ""
1174
- "¿Seguro que quieres borrar el nivel de membresía %s? Todas las "
1175
"subscripciones serán canceladas."
1176
1177
#: adminpages/memberslist.php:26 adminpages/orders.php:522
@@ -1278,7 +1277,7 @@ msgstr "ID de usuario"
1278
1279
#: adminpages/orders.php:234
1280
msgid "Membership Level ID"
1281
- msgstr "ID de nivel de membresía"
1282
1283
#: adminpages/orders.php:243
1284
msgid "Billing Name"
@@ -1553,8 +1552,8 @@ msgstr "Opciones SSL"
1553
1554
#: adminpages/paymentsettings.php:170
1555
msgid ""
1556
- "Payflow Pro currently only supports one-time payments. Users will not be "
1557
- "able to checkout for levels with recurring payments."
1558
msgstr ""
1559
"Payflow Pro actualmente solo soporta pagos on-time. Los usuarios no podrán "
1560
"darse de alta en niveles con pagos recurrentes."
@@ -1712,8 +1711,8 @@ msgstr "Silent Post URL"
1712
msgid ""
1713
"To fully integrate with Authorize.net, be sure to set your Silent Post URL to"
1714
msgstr ""
1715
- "Para integrar completamente con Authorize.net, asegurate de asignar tu "
1716
- "Silent Post URL a"
1717
1718
#: adminpages/paymentsettings.php:462 adminpages/paymentsettings.php:470
1719
msgid "Web Hook URL"
@@ -1722,8 +1721,7 @@ msgstr "Web Hook URL"
1722
#: adminpages/paymentsettings.php:465
1723
msgid "To fully integrate with Stripe, be sure to set your Web Hook URL to"
1724
msgstr ""
1725
- "Para integrar completamente con Stripe, asegurate de asignar tu Web Hook URL "
1726
- "a"
1727
1728
#: adminpages/paymentsettings.php:474
1729
msgid "To fully integrate with Braintree, be sure to set your Web Hook URL to"
@@ -1843,7 +1841,7 @@ msgstr "Un email de %s"
1843
#: classes/class.pmproemail.php:120
1844
#, php-format
1845
msgid "Your membership at %s has been CANCELLED"
1846
- msgstr "Tu membresía %s ha sido CANCELADA"
1847
1848
#: classes/class.pmproemail.php:142
1849
#, php-format
@@ -1853,7 +1851,7 @@ msgstr "Membresía para %s en %s ha sido CANCELADA"
1853
#: classes/class.pmproemail.php:172
1854
#, php-format
1855
msgid "Your membership confirmation for %s"
1856
- msgstr "Confirmación de membresía para %s"
1857
1858
#: classes/class.pmproemail.php:216 classes/class.pmproemail.php:225
1859
#: classes/class.pmproemail.php:234 classes/class.pmproemail.php:304
@@ -1867,7 +1865,7 @@ msgstr "Cupón de descuento"
1867
#: classes/class.pmproemail.php:538
1868
#, php-format
1869
msgid "This membership will expire on %s."
1870
- msgstr "Esta membresía caducará en %s"
1871
1872
#: classes/class.pmproemail.php:263
1873
#, php-format
@@ -1887,12 +1885,12 @@ msgstr "La información de facturacion para %s ha sido actualizada a %s"
1887
#: classes/class.pmproemail.php:425
1888
#, php-format
1889
msgid "Membership Payment Failed at %s"
1890
- msgstr "Pago de membresía ha fallado a %s"
1891
1892
#: classes/class.pmproemail.php:462
1893
#, php-format
1894
msgid "Membership Payment Failed For %s at %s"
1895
- msgstr "Pago de membresía ha fallado para %s a %s"
1896
1897
#: classes/class.pmproemail.php:501
1898
#, php-format
@@ -1907,44 +1905,44 @@ msgstr "Tu periodo de prueba en %s se acaba pronto"
1907
#: classes/class.pmproemail.php:596
1908
#, php-format
1909
msgid "Your membership at %s has ended"
1910
- msgstr "Tu membresía en %s ha terminado"
1911
1912
#: classes/class.pmproemail.php:621
1913
#, php-format
1914
msgid "Your membership at %s will end soon"
1915
- msgstr "Tu membresía en %s acabará pronto"
1916
1917
#: classes/class.pmproemail.php:641
1918
#, php-format
1919
msgid "Your membership at %s has been changed"
1920
- msgstr "Tu membresía en %s ha cambiado"
1921
1922
#: classes/class.pmproemail.php:645 classes/class.pmproemail.php:683
1923
#, php-format
1924
msgid "The new level is %s. This membership is free"
1925
- msgstr "El nuevo nivel es %s. Esta membresa es gratuita"
1926
1927
#: classes/class.pmproemail.php:647
1928
msgid "Your membership has been cancelled"
1929
- msgstr "Tu membresa ha sido cancelada"
1930
1931
#: classes/class.pmproemail.php:651 classes/class.pmproemail.php:689
1932
#, php-format
1933
msgid "This membership will expire on %s"
1934
- msgstr "Esta membresía terminará en %s"
1935
1936
#: classes/class.pmproemail.php:655 classes/class.pmproemail.php:693
1937
msgid "This membership does not expire"
1938
- msgstr "Esta membresa no caduca"
1939
1940
#: classes/class.pmproemail.php:679
1941
#, php-format
1942
msgid "Membership for %s at %s has been changed"
1943
- msgstr "La membresía para %s en %s ha cambiado"
1944
1945
#: classes/class.pmproemail.php:685
1946
msgid "membership has been cancelled"
1947
- msgstr "La membresía ha sido cancelada"
1948
1949
#: classes/gateways/class.pmprogateway.php:55
1950
#: classes/gateways/class.pmprogateway_authorizenet.php:55
@@ -2048,7 +2046,7 @@ msgstr "Error subscribiendo al cliente al plan con Stripe:"
2048
2049
#: pages/account.php:10
2050
msgid "Your membership is <strong>active</strong>."
2051
- msgstr "Tu membresía esta <strong>activa</strong>."
2052
2053
#: pages/account.php:12 pages/billing.php:16 pages/levels.php:13
2054
msgid "Level"
@@ -2056,7 +2054,7 @@ msgstr "Nivel"
2056
2057
#: pages/account.php:14 pages/billing.php:18
2058
msgid "Membership Fee"
2059
- msgstr "Cuota de membresía"
2060
2061
#: pages/account.php:25 pages/billing.php:29
2062
msgid "Duration"
@@ -2064,7 +2062,7 @@ msgstr "Duración"
2064
2065
#: pages/account.php:29 pages/confirmation.php:48 pages/invoice.php:29
2066
msgid "Membership Expires"
2067
- msgstr "La membresía expira"
2068
2069
#: pages/account.php:34
2070
#, php-format
@@ -2114,11 +2112,11 @@ msgstr "Actualizar información de facturación"
2114
2115
#: pages/account.php:155
2116
msgid "Change Membership Level"
2117
- msgstr "Cambiar nivel de membresía."
2118
2119
#: pages/account.php:157
2120
msgid "Cancel Membership"
2121
- msgstr "Cancelar membresía"
2122
2123
#: pages/billing.php:14
2124
#, php-format
@@ -2221,7 +2219,7 @@ msgstr ""
2221
2222
#: pages/cancel.php:14
2223
msgid "Are you sure you want to cancel your membership?"
2224
- msgstr "¿Estas seguro de que quieres cancelar tu membresía?"
2225
2226
#: pages/cancel.php:17
2227
msgid "Yes, cancel my account"
@@ -2240,7 +2238,7 @@ msgid ""
2240
"Almost done. Review the membership information and pricing below then "
2241
"<strong>click the \"Complete Payment\" button</strong> to finish your order."
2242
msgstr ""
2243
- "Casi has terminado. Revisa la información de la membresía y precios aqui "
2244
"abajo y después <strong>haz click en el botón \"Completar pago\" </strong> "
2245
"para finalizar."
2246
@@ -2251,7 +2249,7 @@ msgstr "cambiar"
2251
#: pages/checkout.php:42
2252
#, php-format
2253
msgid "You have selected the <strong>%s</strong> membership level."
2254
- msgstr "Has seleccionado el nivel de membresía <strong>%s</strong>."
2255
2256
#: pages/checkout.php:52
2257
#, php-format
@@ -2309,7 +2307,7 @@ msgid ""
2309
"different account for this membership, <a href=\"%s\">log out now</a>."
2310
msgstr ""
2311
"Estas logeado como <strong>%s</strong>. Si deseas usar una cuenta diferente "
2312
- "para esta membresía,<a href=\"%s\">deslogeate ahora</a>."
2313
2314
#: pages/checkout.php:277
2315
#, php-format
@@ -2357,13 +2355,14 @@ msgstr "Procesando..."
2357
msgid ""
2358
"Your payment has been submitted to PayPal. Your membership will be activated "
2359
"shortly."
2360
- msgstr "Tu pago ha sido enviado a PayPal. Tu membresía será activada en breve."
2361
2362
#: pages/confirmation.php:14
2363
#, php-format
2364
msgid "Thank you for your membership to %s. Your %s membership is now active."
2365
msgstr ""
2366
- "Gracias por hacerte miembro en %s. Tu membresía %s ahora esta activada."
2367
2368
#: pages/confirmation.php:28
2369
#, php-format
@@ -2372,9 +2371,9 @@ msgid ""
2372
"initial membership invoice. A welcome email with a copy of your initial "
2373
"membership invoice has been sent to %s."
2374
msgstr ""
2375
- "Debajo estan los detalles sobre tu cuenta de membresía y un recibo por la "
2376
"factura de tu pago inicial. Un email de bienvenida y una copia de la factura "
2377
- "de tu membresía inicial ha sido enviado a %s."
2378
2379
#: pages/confirmation.php:41 pages/invoice.php:22
2380
#, php-format
@@ -2501,7 +2500,7 @@ msgstr "&larr; Volver a la página principal"
2501
2502
#: preheaders/account.php:7 preheaders/levels.php:19
2503
msgid "Your membership status has been updated - Thank you!"
2504
- msgstr "El estado de tu membresa ha sido actualizado - Gracias!"
2505
2506
#: preheaders/account.php:11 preheaders/levels.php:23
2507
msgid ""
@@ -2540,7 +2539,7 @@ msgstr "Error actualizando la información de facturación."
2540
2541
#: preheaders/cancel.php:24
2542
msgid "Your membership has been cancelled."
2543
- msgstr "Tu membresía ha sido cancelada."
2544
2545
#: preheaders/checkout.php:28 preheaders/checkout.php:491
2546
msgid "Invalid gateway."
@@ -2588,8 +2587,8 @@ msgstr "Pago aceptado."
2588
msgid ""
2589
"Unknown error generating account. Please contact us to set up your membership."
2590
msgstr ""
2591
- "Error desconocido generando tu cuenta. Por favor contactanos para que "
2592
- "podamos configurar tu membresía."
2593
2594
#: preheaders/checkout.php:735 preheaders/checkout.php:803
2595
msgid "The PayPal Token was lost."
@@ -2609,7 +2608,7 @@ msgid ""
2609
"authorized, but we cancelled the order immediately. You should not try to "
2610
"submit this form again. Please contact the site owner to fix this issue."
2611
msgstr ""
2612
- "IMPORTANTE: Algún error ocurrió durante la creación de tu membresía. Tu "
2613
"tarjeta de crédito fue autorizada, pero hemos cancelado el pago "
2614
"inmediatamente. No envíes este formulario de nuevo. Ponte en contacto con el "
2615
"administrador del sitio para arreglar este problema."
@@ -2620,9 +2619,9 @@ msgid ""
2620
"was charged, but we couldn't assign your membership. You should not submit "
2621
"this form again. Please contact the site owner to fix this issue."
2622
msgstr ""
2623
- "IMPORTANTE: Algún error ocurrió durante la creación de tu membresía. Tu "
2624
"tarjeta de crédito ha recibito un cargo, pero no hemos podido asignarte la "
2625
- "membresía. No envíes este formulario de nuevo. Ponte en contacto con el "
2626
"administrador del sitio para arreglar este problema."
2627
2628
#: preheaders/checkout.php:1001
@@ -2643,12 +2642,12 @@ msgstr ""
2643
#: scheduled/crons.php:27
2644
#, php-format
2645
msgid "Membership expiring email sent to %s. "
2646
- msgstr "Emails de expiración de membresía enviados a %s."
2647
2648
#: scheduled/crons.php:61
2649
#, php-format
2650
msgid "Membership expired email sent to %s. "
2651
- msgstr "Email de membresía expirada enviado a %s."
2652
2653
#: scheduled/crons.php:104
2654
#, php-format
@@ -2675,4 +2674,4 @@ msgid ""
2675
"this user's membership is cancelled on your site if it should be."
2676
msgstr ""
2677
"Stripe ha cancelado la subscripción de pago para %s. Por favor asegurate que "
2678
- "la membresía de este usuario es cancelada en tu sitio si es necesario."
2
msgstr ""
3
"Project-Id-Version: pmpro\n"
4
"POT-Creation-Date: 2013-08-01 05:01-0500\n"
5
+ "PO-Revision-Date: 2017-01-17 17:14+0100\n"
6
"Last-Translator: \n"
7
"Language-Team: Stranger Studios <jason@strangerstudios.com>\n"
8
"MIME-Version: 1.0\n"
9
"Content-Type: text/plain; charset=UTF-8\n"
10
"Content-Transfer-Encoding: 8bit\n"
11
+ "X-Generator: Poedit 1.8.7.1\n"
12
"X-Poedit-KeywordsList: __;_;_e;_ex;_x;_n\n"
13
+ "X-Poedit-Basepath: ..\n"
14
+ "Language: es_ES\n"
15
"X-Poedit-SearchPath-0: includes\n"
16
"X-Poedit-SearchPath-1: .\n"
17
"X-Poedit-SearchPath-2: classes\n"
71
#: includes/adminpages.php:44 adminpages/admin_header.php:128
72
#: adminpages/membershiplevels.php:490
73
msgid "Membership Levels"
74
+ msgstr "Tipos de Suscripción"
75
76
#: includes/cleanup.php:24
77
#, php-format
81
"active."
82
msgstr ""
83
"Hubo un error cancelando la subscripcion para el usuario con ID=%s. Deberías "
84
+ "comprobar tu procesamiento de pagos (payment gateway) y ver si tu suscripción "
85
+ "sigue activa."
86
87
#: includes/currencies.php:7 includes/currencies.php:37
88
msgid "US Dollars (&#36;)"
179
#: includes/functions.php:160
180
#, php-format
181
msgid "The price for membership is <strong>%s</strong> now"
182
+ msgstr "El precio por la suscripción es <strong>%s</strong> ahora"
183
184
#: includes/functions.php:169
185
#, php-format
186
msgid " and then <strong>%s per %s for %d more %s</strong>."
187
+ msgstr " y después <strong>%s por %s durante %d %s mas </strong>."
188
189
#: includes/functions.php:173
190
#, php-format
191
msgid " and then <strong>%s every %d %s for %d more %s</strong>."
192
+ msgstr " y después <strong>%s cada %d %s por %d durante %s más </strong>."
193
194
#: includes/functions.php:178
195
#, php-format
196
msgid " and then <strong>%s after %d %s</strong>."
197
+ msgstr " y luego <strong>%s después %d %s</strong>."
198
199
#: includes/functions.php:184
200
#, php-format
201
msgid " and then <strong>%s per %s</strong>."
202
+ msgstr " y después <strong>%s por %s</strong>. "
203
204
#: includes/functions.php:188
205
#, php-format
206
msgid " and then <strong>%s every %d %s</strong>."
207
+ msgstr " y después <strong>%s cada %d %s</strong>."
208
209
#: includes/functions.php:202 pages/levels.php:82
210
msgid "After your initial payment, your first payment is Free."
233
#: includes/functions.php:242
234
#, php-format
235
msgid "Membership expires after %d %s."
236
+ msgstr "La suscripción expira despues de %d %s."
237
238
#: includes/functions.php:491
239
msgid "User ID not found."
254
255
#: includes/functions.php:629 includes/functions.php:668
256
msgid "Membership level not found."
257
+ msgstr "Tipo de suscripción no encontrado."
258
259
#: includes/functions.php:1050
260
msgid "The discount code could not be found."
276
277
#: includes/functions.php:1102
278
msgid "This discount code does not apply to this membership level."
279
+ msgstr "Este cupón de descuento no se puede aplicar a este tipo de suscripción."
280
281
#: includes/functions.php:1110
282
msgid "This discount code is okay."
328
329
#: includes/metaboxes.php:38
330
msgid ""
331
+ "This post is already protected for this level because it is within a category "
332
+ "that requires membership."
333
msgstr ""
334
+ "Esta entrada ya esta protegida para este nivel porque pertenece a una "
335
+ "categoría que requiere suscripción."
336
337
#: includes/metaboxes.php:99 includes/metaboxes.php:100
338
msgid "Require Membership"
339
+ msgstr "Requerir suscripción"
340
341
#: includes/profile.php:25 adminpages/orders.php:601 pages/checkout.php:34
342
#: pages/confirmation.php:46 pages/confirmation.php:62
343
#: pages/confirmation.php:103 pages/invoice.php:27 pages/invoice.php:49
344
msgid "Membership Level"
345
+ msgstr "Tipo de suscripción"
346
347
#: includes/profile.php:34
348
msgid "Current Level"
392
393
#: adminpages/admin_header.php:25
394
msgid "Add a membership level to get started."
395
+ msgstr "Añade un tipo de suscripción para comenzar."
396
397
#: adminpages/admin_header.php:27
398
msgid "Set up the membership pages"
399
+ msgstr "Configura las paginas de suscripción"
400
401
#: adminpages/admin_header.php:29
402
msgid "Set up your SSL certificate and payment gateway"
407
"The billing details for some of your membership levels is not supported by "
408
"Stripe."
409
msgstr ""
410
+ "Los detalles de facturación para alguno de tus tipos de suscripción no esta "
411
"soportado por Stripe."
412
413
#: adminpages/admin_header.php:46
414
msgid ""
415
+ "The billing details for this level are not supported by Stripe. Please review "
416
+ "the notes in the Billing Details section below."
417
msgstr ""
418
"Los detalles de facturación para este nivel no estan soportados por Stripe. "
419
"Por favor revisa las notas en la sección Detalles de Facturación aqui debajo."
433
"The billing details for some of your membership levels is not supported by "
434
"Payflow."
435
msgstr ""
436
+ "Los detalles de facturación de tus tipos de suscripción no estan soportados "
437
"por Payflow."
438
439
#: adminpages/admin_header.php:66
449
"The billing details for some of your membership levels is not supported by "
450
"Braintree."
451
msgstr ""
452
+ "Los detalles de facturación para alguno de tus tipos de suscripción no estan "
453
"soportados por Braintree."
454
455
#: adminpages/admin_header.php:86
498
msgid ""
499
"This message replaces the post content for non-members. Available variables"
500
msgstr ""
501
+ "Este mensaje reemplaza el contenido de la entrada para no-miembros. Variables "
502
+ "disponibles"
503
504
#: adminpages/advancedsettings.php:94
505
msgid "Message for Logged-out Users"
566
567
#: adminpages/advancedsettings.php:200
568
msgid "Yes - Free memberships only."
569
+ msgstr " - Solo suscripciones gratuitas."
570
571
#: adminpages/advancedsettings.php:201
572
msgid "Yes - All memberships."
573
+ msgstr " - Todas las suscripciones."
574
575
#: adminpages/advancedsettings.php:203
576
msgid "A free reCAPTCHA key is required."
612
#: adminpages/discountcodes.php:55
613
msgid "Error updating discount code. That code may already be in use."
614
msgstr ""
615
+ "Error actualizando el cupón de descuento. Es posible que el cupón introducido "
616
+ "ya este en uso."
617
618
#: adminpages/discountcodes.php:64
619
msgid "Discount code added successfully."
640
641
#: adminpages/discountcodes.php:239
642
msgid ""
643
+ "Error deleting discount code. The code was only partially deleted. Please try "
644
+ "again."
645
msgstr ""
646
"Error borrando cupón de descuento. El cupón fue parcialmente eliminado. Por "
647
"favor inténtelo de nuevo."
682
msgid "Start Date"
683
msgstr "Fecha de inicio"
684
685
+ #: adminpages/discountcodes.php:367 pages/billing.php:249 pages/checkout.php:525
686
msgid "Expiration Date"
687
msgstr "Fecha de expiración"
688
725
726
#: adminpages/discountcodes.php:459 adminpages/membershiplevels.php:384
727
msgid ""
728
+ "The <strong>total</strong> number of recurring billing cycles for this level, "
729
+ "including the trial period (if applicable) but not including the initial "
730
+ "payment. Set to zero if membership is indefinite."
731
msgstr ""
732
"El número <strong>total</strong>de ciclos recurrentes para este nivel, "
733
"incluyendo el periodo de prueba ( si existe) pero no incluyendo el pago "
755
756
#: adminpages/discountcodes.php:479 adminpages/membershiplevels.php:431
757
msgid "Membership Expiration"
758
+ msgstr "Caducidad de la suscripción"
759
760
#: adminpages/discountcodes.php:480
761
msgid "Check this to set an expiration date for new sign ups."
767
768
#: adminpages/discountcodes.php:497
769
msgid ""
770
+ "How long before the expiration expires. Note that any future payments will be "
771
+ "cancelled when the membership expires."
772
msgstr ""
773
+ "Cuanto tiempo ha de pasar antes de que la caducidad expire. Ten en cuenta que "
774
+ "los pagos futuros serán cancelados cuando la suscripción caduque."
775
776
#: adminpages/discountcodes.php:525
777
msgid "Memberships Discount Codes"
778
+ msgstr "Cupónes de descuento de suscripciones"
779
780
#: adminpages/discountcodes.php:535
781
msgid "Search Discount Codes"
798
"Discount codes allow you to offer your memberships at discounted prices to "
799
"select customers."
800
msgstr ""
801
+ "Los cupones de descuento te permiten ofrecer tus suscripciones a precios con "
802
+ "descuento para ciertos clientes."
803
804
#: adminpages/discountcodes.php:570
805
msgid "Create your first discount code now"
841
"To modify the appearance of system generated emails, add the files "
842
"<em>email_header.html</em> and <em>email_footer.html</em> to your theme's "
843
"directory. This will modify both the WordPress default messages as well as "
844
+ "messages generated by Paid Memberships Pro. <a title=\"Paid Memberships Pro - "
845
+ "Member Communications\" target=\"_blank\" href=\"http://www."
846
"paidmembershipspro.com/documentation/member-communications/\">Click here to "
847
"learn more about Paid Memberships Pro emails</a>."
848
msgstr ""
850
"los archivos <em>email_header.html</em> y <em>email_footer.html</em> al "
851
"directorio de tu tema. Esto modificará los mensajes originales de wordpress "
852
"tanto como los mensajes generados por Paid Memberships Pro. <a title=\"Paid "
853
+ "Memberships Pro - Comunicaciones a miembros\" target=\"_blank\" href=\"http://"
854
+ "www.paidmembershipspro.com/documentation/member-communications/\">Haz click "
855
+ "aquí para aprender sobre los emails de Paid Memberships Pro</a>."
856
857
#: adminpages/emailsettings.php:69
858
msgid "From Email"
881
#: adminpages/emailsettings.php:105
882
msgid "when an admin changes a user's membership level through the dashboard."
883
msgstr ""
884
+ "cuando un administrador cambia el nivel de un usuario a traves del Escritorio."
885
886
#: adminpages/emailsettings.php:110
887
msgid "Cancellation"
918
919
#: adminpages/membershiplevels.php:118
920
msgid "Membership level updated successfully."
921
+ msgstr "Tipo de suscripción actualizado correctamente."
922
923
#: adminpages/membershiplevels.php:124
924
msgid "Error updating membership level."
925
+ msgstr "Error actualizando el tipo de suscripción."
926
927
#: adminpages/membershiplevels.php:141
928
msgid "Membership level added successfully."
929
+ msgstr "Tipo de suscripción añadido correctamente."
930
931
#: adminpages/membershiplevels.php:146
932
msgid "Error adding membership level."
933
+ msgstr "Error añadiendo tipo de suscripción."
934
935
#: adminpages/membershiplevels.php:179
936
#, php-format
952
953
#: adminpages/membershiplevels.php:201 adminpages/membershiplevels.php:207
954
msgid "Error deleting membership level."
955
+ msgstr "Error eliminando tipo de suscripción."
956
957
#: adminpages/membershiplevels.php:222
958
msgid "Edit Membership Level"
959
+ msgstr "Editar tipo de suscripción"
960
961
#: adminpages/membershiplevels.php:224
962
msgid "Add New Membership Level"
963
+ msgstr "Añade un nuevo tipo de suscripción"
964
965
#: adminpages/membershiplevels.php:291 adminpages/membershiplevels.php:506
966
#: adminpages/reports/login.php:142
1013
1014
#: adminpages/membershiplevels.php:366
1015
msgid ""
1016
+ "Braintree integration currently only supports billing periods of \"Month\" or "
1017
+ "\"Year\"."
1018
msgstr ""
1019
+ "La integración con Braintree actualmente solo soporta periodos de facturación "
1020
+ "\"mensuales \" o \"anuales \"."
1021
1022
#: adminpages/membershiplevels.php:368
1023
msgid ""
1055
"Stripe integration currently does not support billing limits. You can still "
1056
"set an expiration date below."
1057
msgstr ""
1058
+ "La integración con Stripe actualmente no soporta límites de facturación. Pero "
1059
+ "puedes elegir una fecha de expiración aqui abajo."
1060
1061
#: adminpages/membershiplevels.php:406
1062
msgid ""
1093
"Check to hide this level from the membership levels page and disable "
1094
"registration."
1095
msgstr ""
1096
+ "Marcar para esconder este nivel de la página de suscripciones y desactivar "
1097
"registro."
1098
1099
#: adminpages/membershiplevels.php:432
1100
msgid "Check this to set when membership access expires."
1101
+ msgstr "Marcar esto para elegir cuando termina el acceso a la suscripción."
1102
1103
#: adminpages/membershiplevels.php:449
1104
msgid ""
1106
"(recurring subscription, if any) will be cancelled when the membership "
1107
"expires."
1108
msgstr ""
1109
+ "Elige la duración de acceso para la suscripción. Ten en cuenta que cualquier "
1110
+ "futuro pago ( subscripciones recurrentes, si las hay) serán canceladas cuando "
1111
+ "la suscripción expire."
1112
1113
#: adminpages/membershiplevels.php:457
1114
msgid "Content Settings"
1170
"Are you sure you want to delete membership level %s? All subscriptions will "
1171
"be cancelled."
1172
msgstr ""
1173
+ "¿Seguro que quieres borrar el nivel de suscripción %s? Todas las "
1174
"subscripciones serán canceladas."
1175
1176
#: adminpages/memberslist.php:26 adminpages/orders.php:522
1277
1278
#: adminpages/orders.php:234
1279
msgid "Membership Level ID"
1280
+ msgstr "ID de nivel de suscripción"
1281
1282
#: adminpages/orders.php:243
1283
msgid "Billing Name"
1552
1553
#: adminpages/paymentsettings.php:170
1554
msgid ""
1555
+ "Payflow Pro currently only supports one-time payments. Users will not be able "
1556
+ "to checkout for levels with recurring payments."
1557
msgstr ""
1558
"Payflow Pro actualmente solo soporta pagos on-time. Los usuarios no podrán "
1559
"darse de alta en niveles con pagos recurrentes."
1711
msgid ""
1712
"To fully integrate with Authorize.net, be sure to set your Silent Post URL to"
1713
msgstr ""
1714
+ "Para integrar completamente con Authorize.net, asegurate de asignar tu Silent "
1715
+ "Post URL a"
1716
1717
#: adminpages/paymentsettings.php:462 adminpages/paymentsettings.php:470
1718
msgid "Web Hook URL"
1721
#: adminpages/paymentsettings.php:465
1722
msgid "To fully integrate with Stripe, be sure to set your Web Hook URL to"
1723
msgstr ""
1724
+ "Para integrar completamente con Stripe, asegurate de asignar tu Web Hook URL a"
1725
1726
#: adminpages/paymentsettings.php:474
1727
msgid "To fully integrate with Braintree, be sure to set your Web Hook URL to"
1841
#: classes/class.pmproemail.php:120
1842
#, php-format
1843
msgid "Your membership at %s has been CANCELLED"
1844
+ msgstr "Tu suscripción %s ha sido CANCELADA"
1845
1846
#: classes/class.pmproemail.php:142
1847
#, php-format
1851
#: classes/class.pmproemail.php:172
1852
#, php-format
1853
msgid "Your membership confirmation for %s"
1854
+ msgstr "Confirmación de suscripción para %s"
1855
1856
#: classes/class.pmproemail.php:216 classes/class.pmproemail.php:225
1857
#: classes/class.pmproemail.php:234 classes/class.pmproemail.php:304
1865
#: classes/class.pmproemail.php:538
1866
#, php-format
1867
msgid "This membership will expire on %s."
1868
+ msgstr "Esta suscripción caducará en %s"
1869
1870
#: classes/class.pmproemail.php:263
1871
#, php-format
1885
#: classes/class.pmproemail.php:425
1886
#, php-format
1887
msgid "Membership Payment Failed at %s"
1888
+ msgstr "Pago de suscripción ha fallado a %s"
1889
1890
#: classes/class.pmproemail.php:462
1891
#, php-format
1892
msgid "Membership Payment Failed For %s at %s"
1893
+ msgstr "Pago de suscripción ha fallado para %s a %s"
1894
1895
#: classes/class.pmproemail.php:501
1896
#, php-format
1905
#: classes/class.pmproemail.php:596
1906
#, php-format
1907
msgid "Your membership at %s has ended"
1908
+ msgstr "Tu suscripción en %s ha terminado"
1909
1910
#: classes/class.pmproemail.php:621
1911
#, php-format
1912
msgid "Your membership at %s will end soon"
1913
+ msgstr "Tu suscripción en %s acabará pronto"
1914
1915
#: classes/class.pmproemail.php:641
1916
#, php-format
1917
msgid "Your membership at %s has been changed"
1918
+ msgstr "Tu suscripción en %s ha cambiado"
1919
1920
#: classes/class.pmproemail.php:645 classes/class.pmproemail.php:683
1921
#, php-format
1922
msgid "The new level is %s. This membership is free"
1923
+ msgstr "El nuevo nivel es %s. Esta suscripción es gratuita"
1924
1925
#: classes/class.pmproemail.php:647
1926
msgid "Your membership has been cancelled"
1927
+ msgstr "Tu suscripción ha sido cancelada"
1928
1929
#: classes/class.pmproemail.php:651 classes/class.pmproemail.php:689
1930
#, php-format
1931
msgid "This membership will expire on %s"
1932
+ msgstr "Esta suscripción terminará en %s"
1933
1934
#: classes/class.pmproemail.php:655 classes/class.pmproemail.php:693
1935
msgid "This membership does not expire"
1936
+ msgstr "Esta suscripción no caduca"
1937
1938
#: classes/class.pmproemail.php:679
1939
#, php-format
1940
msgid "Membership for %s at %s has been changed"
1941
+ msgstr "La suscripción para %s en %s ha cambiado"
1942
1943
#: classes/class.pmproemail.php:685
1944
msgid "membership has been cancelled"
1945
+ msgstr "La suscripción ha sido cancelada"
1946
1947
#: classes/gateways/class.pmprogateway.php:55
1948
#: classes/gateways/class.pmprogateway_authorizenet.php:55
2046
2047
#: pages/account.php:10
2048
msgid "Your membership is <strong>active</strong>."
2049
+ msgstr "Tu suscripción esta <strong>activa</strong>."
2050
2051
#: pages/account.php:12 pages/billing.php:16 pages/levels.php:13
2052
msgid "Level"
2054
2055
#: pages/account.php:14 pages/billing.php:18
2056
msgid "Membership Fee"
2057
+ msgstr "Cuota de suscripción"
2058
2059
#: pages/account.php:25 pages/billing.php:29
2060
msgid "Duration"
2062
2063
#: pages/account.php:29 pages/confirmation.php:48 pages/invoice.php:29
2064
msgid "Membership Expires"
2065
+ msgstr "La suscripción expira"
2066
2067
#: pages/account.php:34
2068
#, php-format
2112
2113
#: pages/account.php:155
2114
msgid "Change Membership Level"
2115
+ msgstr "Cambiar nivel de suscripción."
2116
2117
#: pages/account.php:157
2118
msgid "Cancel Membership"
2119
+ msgstr "Cancelar suscripción"
2120
2121
#: pages/billing.php:14
2122
#, php-format
2219
2220
#: pages/cancel.php:14
2221
msgid "Are you sure you want to cancel your membership?"
2222
+ msgstr "¿Estas seguro de que quieres cancelar tu suscripción?"
2223
2224
#: pages/cancel.php:17
2225
msgid "Yes, cancel my account"
2238
"Almost done. Review the membership information and pricing below then "
2239
"<strong>click the \"Complete Payment\" button</strong> to finish your order."
2240
msgstr ""
2241
+ "Casi has terminado. Revisa la información de la suscripción y precios aqui "
2242
"abajo y después <strong>haz click en el botón \"Completar pago\" </strong> "
2243
"para finalizar."
2244
2249
#: pages/checkout.php:42
2250
#, php-format
2251
msgid "You have selected the <strong>%s</strong> membership level."
2252
+ msgstr "Has seleccionado el nivel de suscripción <strong>%s</strong>."
2253
2254
#: pages/checkout.php:52
2255
#, php-format
2307
"different account for this membership, <a href=\"%s\">log out now</a>."
2308
msgstr ""
2309
"Estas logeado como <strong>%s</strong>. Si deseas usar una cuenta diferente "
2310
+ "para esta suscripción,<a href=\"%s\">deslogeate ahora</a>."
2311
2312
#: pages/checkout.php:277
2313
#, php-format
2355
msgid ""
2356
"Your payment has been submitted to PayPal. Your membership will be activated "
2357
"shortly."
2358
+ msgstr ""
2359
+ "Tu pago ha sido enviado a PayPal. Tu suscripción será activada en breve."
2360
2361
#: pages/confirmation.php:14
2362
#, php-format
2363
msgid "Thank you for your membership to %s. Your %s membership is now active."
2364
msgstr ""
2365
+ "Gracias por hacerte miembro en %s. Tu suscripción %s ahora esta activada."
2366
2367
#: pages/confirmation.php:28
2368
#, php-format
2371
"initial membership invoice. A welcome email with a copy of your initial "
2372
"membership invoice has been sent to %s."
2373
msgstr ""
2374
+ "Debajo estan los detalles sobre tu cuenta de suscripción y un recibo por la "
2375
"factura de tu pago inicial. Un email de bienvenida y una copia de la factura "
2376
+ "de tu suscripción inicial ha sido enviado a %s."
2377
2378
#: pages/confirmation.php:41 pages/invoice.php:22
2379
#, php-format
2500
2501
#: preheaders/account.php:7 preheaders/levels.php:19
2502
msgid "Your membership status has been updated - Thank you!"
2503
+</