Paid Memberships Pro - Version 1.8.5.3

Version Description

  • BUG: Fixed issue where addon information was not being updated. (Thanks, walcee, jeff1010ihs, and ron)
  • BUG: Fixed DB errors that would happen sometimes on brand new activations.
  • BUG: Fixed notices in the code that shows a member's payment amount on the edit user/profile page.
  • BUG: Fixed warnings that would show up if you used pmpro_getLevel('name') to get a level by name for a level that didn't exist.
Download this release

Release Info

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

Code changes from version 1.8.5.2 to 1.8.5.3

adminpages/membershiplevels.php CHANGED
@@ -327,8 +327,7 @@
327
  <textarea rows="10" cols="80" name="confirmation" id="confirmation"><?php echo esc_textarea($level->confirmation);?></textarea>
328
  <?php
329
  }
330
- ?>
331
- <p>[ ] Include this message in the Membership Confirmation Email</p>
332
  </div>
333
  </td>
334
  </tr>
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>
includes/addons.php CHANGED
@@ -52,7 +52,7 @@ function pmpro_getAddons()
52
  //error
53
  pmpro_setMessage("Could not connect to the PMPro License Server to update addon information. Try again later.", "error");
54
  }
55
- elseif(!empty($r) && $r['response']['code'] == 200)
56
  {
57
  //update addons in cache
58
  $addons = json_decode(wp_remote_retrieve_body($remote_addons), true);
52
  //error
53
  pmpro_setMessage("Could not connect to the PMPro License Server to update addon information. Try again later.", "error");
54
  }
55
+ elseif(!empty($remote_addons) && $remote_addons['response']['code'] == 200)
56
  {
57
  //update addons in cache
58
  $addons = json_decode(wp_remote_retrieve_body($remote_addons), true);
includes/functions.php CHANGED
@@ -1451,10 +1451,15 @@ function pmpro_getLevel($level)
1451
  }
1452
  }
1453
  else
1454
- {
1455
  global $wpdb;
1456
- $level_obj = $wpdb->get_row("SELECT * FROM $wpdb->pmpro_membership_levels WHERE name = '" . esc_sql($level) . "' LIMIT 1");
1457
- $level_id = $level_obj->id;
 
 
 
 
 
1458
  $pmpro_levels[$level_id] = $level_obj;
1459
  return $pmpro_levels[$level_id];
1460
  }
1451
  }
1452
  }
1453
  else
1454
+ {
1455
  global $wpdb;
1456
+ $level_obj = $wpdb->get_row("SELECT * FROM $wpdb->pmpro_membership_levels WHERE name = '" . esc_sql($level) . "' LIMIT 1");
1457
+
1458
+ if(!empty($level_obj))
1459
+ $level_id = $level_obj->id;
1460
+ else
1461
+ return false;
1462
+
1463
  $pmpro_levels[$level_id] = $level_obj;
1464
  return $pmpro_levels[$level_id];
1465
  }
includes/profile.php CHANGED
@@ -49,12 +49,17 @@ function pmpro_membership_level_profile_fields($user)
49
  <span id="current_level_cost">
50
  <?php
51
  $membership_values = pmpro_getMembershipLevelForUser($user->ID);
 
52
  //we tweak the initial payment here so the text here effectively shows the recurring amount
53
- $membership_values->original_initial_payment = $membership_values->initial_payment;
54
- $membership_values->initial_payment = $membership_values->billing_amount;
 
 
 
 
55
  if(empty($membership_values) || pmpro_isLevelFree($membership_values))
56
  {
57
- if($membership_values->original_initial_payment > 0)
58
  echo "Paid " . pmpro_formatPrice($membership_values->original_initial_payment) . ".";
59
  else
60
  _e('Not paying.', 'pmpro');
49
  <span id="current_level_cost">
50
  <?php
51
  $membership_values = pmpro_getMembershipLevelForUser($user->ID);
52
+
53
  //we tweak the initial payment here so the text here effectively shows the recurring amount
54
+ if(!empty($membership_values))
55
+ {
56
+ $membership_values->original_initial_payment = $membership_values->initial_payment;
57
+ $membership_values->initial_payment = $membership_values->billing_amount;
58
+ }
59
+
60
  if(empty($membership_values) || pmpro_isLevelFree($membership_values))
61
  {
62
+ if(!empty($membership_values->original_initial_payment) && $membership_values->original_initial_payment > 0)
63
  echo "Paid " . pmpro_formatPrice($membership_values->original_initial_payment) . ".";
64
  else
65
  _e('Not paying.', 'pmpro');
includes/upgradecheck.php CHANGED
@@ -460,8 +460,8 @@ function pmpro_upgrade_1()
460
  pmpro_db_delta();
461
 
462
  //update version and return
463
- pmpro_setOption("db_version", "1.702"); //no need to run other updates
464
- return 1.702;
465
  }
466
 
467
  function pmpro_db_delta()
460
  pmpro_db_delta();
461
 
462
  //update version and return
463
+ pmpro_setOption("db_version", "1.71"); //no need to run other updates
464
+ return 1.71;
465
  }
466
 
467
  function pmpro_db_delta()
paid-memberships-pro.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Paid Memberships Pro
4
  Plugin URI: http://www.paidmembershipspro.com
5
  Description: Plugin to Handle Memberships
6
- Version: 1.8.5.2
7
  Author: Stranger Studios
8
  Author URI: http://www.strangerstudios.com
9
  */
@@ -13,7 +13,7 @@ Author URI: http://www.strangerstudios.com
13
  */
14
 
15
  //version constant
16
- define("PMPRO_VERSION", "1.8.5.2");
17
 
18
  //if the session has been started yet, start it (ignore if running from command line)
19
  if(defined('STDIN') )
3
  Plugin Name: Paid Memberships Pro
4
  Plugin URI: http://www.paidmembershipspro.com
5
  Description: Plugin to Handle Memberships
6
+ Version: 1.8.5.3
7
  Author: Stranger Studios
8
  Author URI: http://www.strangerstudios.com
9
  */
13
  */
14
 
15
  //version constant
16
+ define("PMPRO_VERSION", "1.8.5.3");
17
 
18
  //if the session has been started yet, start it (ignore if running from command line)
19
  if(defined('STDIN') )
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: strangerstudios
3
  Tags: memberships, membership, authorize.net, ecommerce, paypal, stripe, braintree, restrict access, restrict content, directory site, payflow
4
  Requires at least: 3.5
5
  Tested up to: 4.2.4
6
- Stable tag: 1.8.5.2
7
 
8
  The easiest way to GET PAID with your WordPress site. Flexible content control by Membership Level, Reports, Affiliates and Discounts
9
 
@@ -102,6 +102,12 @@ Not sure? You can find out by doing a bit a research.
102
  4. Offer Membership Discounts with specific price rules (restricted by level, unique pricing for each level, # of uses, expiration date.)
103
 
104
  == Changelog ==
 
 
 
 
 
 
105
  = 1.8.5.2 =
106
  * BUG: Fixed notice in pmpro_reset_update_plugins_cache
107
  * BUG: Removed debug code from the PayPal Express gateway.
3
  Tags: memberships, membership, authorize.net, ecommerce, paypal, stripe, braintree, restrict access, restrict content, directory site, payflow
4
  Requires at least: 3.5
5
  Tested up to: 4.2.4
6
+ Stable tag: 1.8.5.3
7
 
8
  The easiest way to GET PAID with your WordPress site. Flexible content control by Membership Level, Reports, Affiliates and Discounts
9
 
102
  4. Offer Membership Discounts with specific price rules (restricted by level, unique pricing for each level, # of uses, expiration date.)
103
 
104
  == Changelog ==
105
+ = 1.8.5.3 =
106
+ * BUG: Fixed issue where addon information was not being updated. (Thanks, walcee, jeff1010ihs, and ron)
107
+ * BUG: Fixed DB errors that would happen sometimes on brand new activations.
108
+ * BUG: Fixed notices in the code that shows a member's payment amount on the edit user/profile page.
109
+ * BUG: Fixed warnings that would show up if you used pmpro_getLevel('name') to get a level by name for a level that didn't exist.
110
+
111
  = 1.8.5.2 =
112
  * BUG: Fixed notice in pmpro_reset_update_plugins_cache
113
  * BUG: Removed debug code from the PayPal Express gateway.