Paid Memberships Pro - Version 2.0.7

Version Description

  • 2019-05-30 =
  • BUG FIX: Fixed issue where the profile start date would sometimes be set incorrectly on the Stripe subscription.
  • BUG FIX: Fixed issue where the membership shortcode would not work properly if more than one level name was given.
  • BUG FIX: Fixed issue where an incorrect email address was sometimes set in the confirm email field on the update billing page. (Thanks, Jessica Thomas)
  • BUG FIX/ENHANCEMENT: Fixed placement of the hr tag above the user fields at checkout for consistency.
  • ENHANCEMENT: Set the priority on the Require Membership meta box to "high" so it appears higher in the right sidebar.
Download this release

Release Info

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

Code changes from version 2.0.6 to 2.0.7

classes/gateways/class.pmprogateway_stripe.php CHANGED
@@ -1667,10 +1667,11 @@ class PMProGateway_stripe extends PMProGateway
1667
$update_order->ProfileStartDate = date_i18n("Y-m-d", $end_timestamp);
1668
$update_order->BillingPeriod = $update['cycle_period'];
1669
$update_order->BillingFrequency = $update['cycle_number'];
1670
-
1671
//need filter to reset ProfileStartDate
1672
- add_filter('pmpro_profile_start_date', function( $startdate, $order ) use ( $update_order ) {
1673
- return "{$update_order->ProfileStartDate}T0:0:0";
1674
}, 10, 2);
1675
1676
//update subscription
1667
$update_order->ProfileStartDate = date_i18n("Y-m-d", $end_timestamp);
1668
$update_order->BillingPeriod = $update['cycle_period'];
1669
$update_order->BillingFrequency = $update['cycle_number'];
1670
+
1671
//need filter to reset ProfileStartDate
1672
+ $profile_start_date = $update_order->ProfileStartDate;
1673
+ add_filter('pmpro_profile_start_date', function( $startdate, $order ) use ( $profile_start_date ) {
1674
+ return "{$profile_start_date}T0:0:0";
1675
}, 10, 2);
1676
1677
//update subscription
includes/functions.php CHANGED
@@ -825,7 +825,7 @@ function pmpro_hasMembershipLevel( $levels = null, $user_id = null ) {
825
$found_level = false;
826
827
foreach ( $membership_levels as $membership_level ) {
828
- if ( $membership_level->id == $level_obj->id ) {
829
$found_level = true;
830
}
831
}
@@ -834,8 +834,8 @@ function pmpro_hasMembershipLevel( $levels = null, $user_id = null ) {
834
$return = true;
835
} elseif ( is_numeric( $level ) && intval( $level ) > 0 && $found_level ) {
836
$return = true;
837
- } elseif ( ! is_numeric( $level ) ) { // if a level name was passed
838
- $return = $found_level;
839
}
840
}
841
}
825
$found_level = false;
826
827
foreach ( $membership_levels as $membership_level ) {
828
+ if ( $membership_level->id == $level_obj->id || $membership_level->name == $level_obj->name) {
829
$found_level = true;
830
}
831
}
834
$return = true;
835
} elseif ( is_numeric( $level ) && intval( $level ) > 0 && $found_level ) {
836
$return = true;
837
+ } elseif ( ! is_numeric( $level ) && $found_level) { // if a level name was passed
838
+ $return = true;
839
}
840
}
841
}
includes/metaboxes.php CHANGED
@@ -102,8 +102,8 @@ function pmpro_page_save($post_id)
102
//wrapper to add meta boxes
103
function pmpro_page_meta_wrapper()
104
{
105
- add_meta_box('pmpro_page_meta', __('Require Membership', 'paid-memberships-pro' ), 'pmpro_page_meta', 'page', 'side');
106
- add_meta_box('pmpro_page_meta', __('Require Membership', 'paid-memberships-pro' ), 'pmpro_page_meta', 'post', 'side');
107
}
108
if (is_admin())
109
{
102
//wrapper to add meta boxes
103
function pmpro_page_meta_wrapper()
104
{
105
+ add_meta_box('pmpro_page_meta', __('Require Membership', 'paid-memberships-pro' ), 'pmpro_page_meta', 'page', 'side', 'high' );
106
+ add_meta_box('pmpro_page_meta', __('Require Membership', 'paid-memberships-pro' ), 'pmpro_page_meta', 'post', 'side', 'high' );
107
}
108
if (is_admin())
109
{
pages/checkout.php CHANGED
@@ -164,8 +164,8 @@
164
?>
165
166
<?php if(!$skip_account_fields && !$pmpro_review) { ?>
167
- <hr />
168
<div id="pmpro_user_fields" class="pmpro_checkout">
169
<h3>
170
<span class="pmpro_checkout-h3-name"><?php _e('Account Information', 'paid-memberships-pro' );?></span>
171
<span class="pmpro_checkout-h3-msg"><?php _e('Already have an account?', 'paid-memberships-pro' );?> <a href="<?php echo wp_login_url(pmpro_url("checkout", "?level=" . $pmpro_level->id)); ?>"><?php _e('Log in here', 'paid-memberships-pro' );?></a></span>
164
?>
165
166
<?php if(!$skip_account_fields && !$pmpro_review) { ?>
167
<div id="pmpro_user_fields" class="pmpro_checkout">
168
+ <hr />
169
<h3>
170
<span class="pmpro_checkout-h3-name"><?php _e('Account Information', 'paid-memberships-pro' );?></span>
171
<span class="pmpro_checkout-h3-msg"><?php _e('Already have an account?', 'paid-memberships-pro' );?> <a href="<?php echo wp_login_url(pmpro_url("checkout", "?level=" . $pmpro_level->id)); ?>"><?php _e('Log in here', 'paid-memberships-pro' );?></a></span>
paid-memberships-pro.php CHANGED
@@ -3,7 +3,7 @@
3
* Plugin Name: Paid Memberships Pro
4
* Plugin URI: https://www.paidmembershipspro.com
5
* Description: The most complete member management and membership subscriptions plugin for WordPress.
6
- * Version: 2.0.6
7
* Author: Stranger Studios
8
* Author URI: https://www.strangerstudios.com
9
* Text Domain: paid-memberships-pro
@@ -16,7 +16,7 @@
16
*/
17
18
// version constant
19
- define( 'PMPRO_VERSION', '2.0.6' );
20
define( 'PMPRO_USER_AGENT', 'Paid Memberships Pro v' . PMPRO_VERSION . '; ' . site_url() );
21
define( 'PMPRO_MIN_PHP_VERSION', '5.6' );
22
3
* Plugin Name: Paid Memberships Pro
4
* Plugin URI: https://www.paidmembershipspro.com
5
* Description: The most complete member management and membership subscriptions plugin for WordPress.
6
+ * Version: 2.0.7
7
* Author: Stranger Studios
8
* Author URI: https://www.strangerstudios.com
9
* Text Domain: paid-memberships-pro
16
*/
17
18
// version constant
19
+ define( 'PMPRO_VERSION', '2.0.7' );
20
define( 'PMPRO_USER_AGENT', 'Paid Memberships Pro v' . PMPRO_VERSION . '; ' . site_url() );
21
define( 'PMPRO_MIN_PHP_VERSION', '5.6' );
22
preheaders/billing.php CHANGED
@@ -247,7 +247,7 @@ if ($submit) {
247
$bcountry = get_user_meta($current_user->ID, "pmpro_bcountry", true);
248
$bphone = get_user_meta($current_user->ID, "pmpro_bphone", true);
249
$bemail = get_user_meta($current_user->ID, "pmpro_bemail", true);
250
- $bconfirmemail = get_user_meta($current_user->ID, "pmpro_bconfirmemail", true);
251
$CardType = get_user_meta($current_user->ID, "pmpro_CardType", true);
252
//$AccountNumber = hideCardNumber(get_user_meta($current_user->ID, "pmpro_AccountNumber", true), false);
253
$ExpirationMonth = get_user_meta($current_user->ID, "pmpro_ExpirationMonth", true);
247
$bcountry = get_user_meta($current_user->ID, "pmpro_bcountry", true);
248
$bphone = get_user_meta($current_user->ID, "pmpro_bphone", true);
249
$bemail = get_user_meta($current_user->ID, "pmpro_bemail", true);
250
+ $bconfirmemail = get_user_meta($current_user->ID, "pmpro_bemail", true);
251
$CardType = get_user_meta($current_user->ID, "pmpro_CardType", true);
252
//$AccountNumber = hideCardNumber(get_user_meta($current_user->ID, "pmpro_AccountNumber", true), false);
253
$ExpirationMonth = get_user_meta($current_user->ID, "pmpro_ExpirationMonth", true);
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: strangerstudios
3
Tags: membership, memberships, member, members, ecommerce, e-commerce, paypal, stripe, braintree, authorize.net, payflow, restrict access, restrict content, directory
4
Requires at least: 4
5
Tested up to: 5.2.1
6
- Stable tag: 2.0.6
7
8
Get Paid with Paid Memberships Pro: The most complete member management and membership subscriptions plugin for your WordPress site.
9
@@ -11,7 +11,7 @@ Get Paid with Paid Memberships Pro: The most complete member management and memb
11
= The most complete member management and membership subscriptions plugin for WordPress =
12
Paid Memberships Pro is designed for premium content sites, clubs/associations, subscription products, newsletters and more! The plugin adds a new revenue source to your site and is flexible enough to fit the needs of almost all online and offline businesses.
13
14
- [youtube http://www.youtube.com/watch?v=RC04q0hvQb4]
15
16
= Simple to install and get running – deeply customizable! =
17
* Unlimited Levels with Flexible Membership Pricing
@@ -129,6 +129,13 @@ Not sure? You can find out by doing a bit a research.
129
130
== Changelog ==
131
132
= 2.0.6 - 2019-05-30 =
133
* SECURITY: Now using wp_safe_redirect when possible, especially in includes/login.php where the user-provided redirect_to URL parameter is used. (Thanks PluginVulnerabilities.com)
134
@@ -146,6 +153,7 @@ Not sure? You can find out by doing a bit a research.
146
* BUG FIX/ENHANCEMENT: Added pmpro_checkout_preheader_before_get_level_at_checkout and pmpro_checkout_preheader_after_get_level_at_checkout action hooks. Using pmpro_checkout_preheader_before_get_level_at_checkout to start the session earlier now.
147
* BUG FIX/ENHANCEMENT: Removed the "membership_code_id" and "membership_code" as field options for the member shortcode. These weren't working and it's unclear what would be meant to ask for a user's discount code since a user could have several orders with or without discount codes. Added "membership_description" and "membership_confirmation" instead.
148
* BUG FIX/ENHANCEMENT: Filtering the password reset message to make sure the link still works in all cases when we convert emails to HTML.
149
* REFACTOR: Now running the pmpro_billing_preheader hook after the jquery.creditCardValidator script is enqueued in preheader/billing.php to match how we do it in preheader/checkout.php. (Thanks, Rafe Colton)
150
151
= 2.0.4 - 2019-01-14 =
3
Tags: membership, memberships, member, members, ecommerce, e-commerce, paypal, stripe, braintree, authorize.net, payflow, restrict access, restrict content, directory
4
Requires at least: 4
5
Tested up to: 5.2.1
6
+ Stable tag: 2.0.7
7
8
Get Paid with Paid Memberships Pro: The most complete member management and membership subscriptions plugin for your WordPress site.
9
11
= The most complete member management and membership subscriptions plugin for WordPress =
12
Paid Memberships Pro is designed for premium content sites, clubs/associations, subscription products, newsletters and more! The plugin adds a new revenue source to your site and is flexible enough to fit the needs of almost all online and offline businesses.
13
14
+ [youtube https://www.youtube.com/watch?v=-M3aoEHvGZ4]
15
16
= Simple to install and get running – deeply customizable! =
17
* Unlimited Levels with Flexible Membership Pricing
129
130
== Changelog ==
131
132
+ = 2.0.7 - 2019-05-30 =
133
+ * BUG FIX: Fixed issue where the profile start date would sometimes be set incorrectly on the Stripe subscription.
134
+ * BUG FIX: Fixed issue where the membership shortcode would not work properly if more than one level name was given.
135
+ * BUG FIX: Fixed issue where an incorrect email address was sometimes set in the confirm email field on the update billing page. (Thanks, Jessica Thomas)
136
+ * BUG FIX/ENHANCEMENT: Fixed placement of the hr tag above the user fields at checkout for consistency.
137
+ * ENHANCEMENT: Set the priority on the Require Membership meta box to "high" so it appears higher in the right sidebar.
138
+
139
= 2.0.6 - 2019-05-30 =
140
* SECURITY: Now using wp_safe_redirect when possible, especially in includes/login.php where the user-provided redirect_to URL parameter is used. (Thanks PluginVulnerabilities.com)
141
153
* BUG FIX/ENHANCEMENT: Added pmpro_checkout_preheader_before_get_level_at_checkout and pmpro_checkout_preheader_after_get_level_at_checkout action hooks. Using pmpro_checkout_preheader_before_get_level_at_checkout to start the session earlier now.
154
* BUG FIX/ENHANCEMENT: Removed the "membership_code_id" and "membership_code" as field options for the member shortcode. These weren't working and it's unclear what would be meant to ask for a user's discount code since a user could have several orders with or without discount codes. Added "membership_description" and "membership_confirmation" instead.
155
* BUG FIX/ENHANCEMENT: Filtering the password reset message to make sure the link still works in all cases when we convert emails to HTML.
156
+ * BUG FIX/ENHANCEMENT: Added reCAPTCHA v3 and invisible reCAPTCHA support. It is recommended sites using Stripe or Braintree update to the reCAPTCHA v3 option. Read more here: https://www.paidmembershipspro.com/pmpro-update-2-0-5/
157
* REFACTOR: Now running the pmpro_billing_preheader hook after the jquery.creditCardValidator script is enqueued in preheader/billing.php to match how we do it in preheader/checkout.php. (Thanks, Rafe Colton)
158
159
= 2.0.4 - 2019-01-14 =