Version Description
- 2022-01-17 =
- BUG FIX/ENHANCEMENT: Improved error messages when creating subscriptions with Stripe. (@dparker1005)
- BUG FIX: Fixed issue where certain Stripe trial periods would be sent to the Stripe subscription as longer than intended. #1912 (@dparker1005)
- BUG FIX: Fixed visual issues with dropdowns in our blocks when using Full Site Editing in WP 5.9+. #1909 (@sc0ttkclark)
Download this release
Release Info
Developer | strangerstudios |
Plugin | Paid Memberships Pro |
Version | 2.7.2 |
Comparing to | |
See all releases |
Code changes from version 2.7 to 2.7.2
- CHANGELOG.txt +8 -0
- classes/gateways/class.pmprogateway_stripe.php +6 -8
- css/blocks.editor.css +3 -0
- includes/upgradecheck.php +6 -6
- paid-memberships-pro.php +3 -3
- readme.txt +10 -2
CHANGELOG.txt
CHANGED
@@ -1,4 +1,12 @@
|
|
1 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
= 2.7 - 2022-01-13 =
|
3 |
* FEATURE: Added a "Spam Protection" option to the advanced settings page. When used, IP addresses are blocked from checkout if there are more than 10 failsures within 15 minutes. (@ideadude)
|
4 |
* ENHANCEMENT: Checkouts with Stripe will now reuse Stripe Products and Prices. (@dparker1005)
|
1 |
== Changelog ==
|
2 |
+
= 2.7.2 - 2022-01-17 =
|
3 |
+
* BUG FIX/ENHANCEMENT: Improved error messages when creating subscriptions with Stripe. (@dparker1005)
|
4 |
+
* BUG FIX: Fixed issue where certain Stripe trial periods would be sent to the Stripe subscription as longer than intended. #1912 (@dparker1005)
|
5 |
+
* BUG FIX: Fixed visual issues with dropdowns in our blocks when using Full Site Editing in WP 5.9+. #1909 (@sc0ttkclark)
|
6 |
+
|
7 |
+
= 2.7.1 - 2022-01-13 =
|
8 |
+
* BUG FIX: Fixed issue on some MySQL setups that would throw an error about the primary key in the pmpro_memberships_pages and pmpro_memberships_categories tables.
|
9 |
+
|
10 |
= 2.7 - 2022-01-13 =
|
11 |
* FEATURE: Added a "Spam Protection" option to the advanced settings page. When used, IP addresses are blocked from checkout if there are more than 10 failsures within 15 minutes. (@ideadude)
|
12 |
* ENHANCEMENT: Checkouts with Stripe will now reuse Stripe Products and Prices. (@dparker1005)
|
classes/gateways/class.pmprogateway_stripe.php
CHANGED
@@ -1456,8 +1456,8 @@ class PMProGateway_stripe extends PMProGateway {
|
|
1456 |
if ( pmpro_isLevelRecurring( $order->membership_level ) ) {
|
1457 |
$subscription = $this->create_subscription_for_customer_from_order( $customer->id, $order );
|
1458 |
if ( empty( $subscription ) ) {
|
1459 |
-
// There was an issue creating the subscription.
|
1460 |
-
$order->error = __( 'Error creating subscription for customer.', 'paid-memberships-pro' );
|
1461 |
$order->shorterror = $order->error;
|
1462 |
return false;
|
1463 |
}
|
@@ -2377,19 +2377,17 @@ class PMProGateway_stripe extends PMProGateway {
|
|
2377 |
private function calculate_trial_period_days( $order ) {
|
2378 |
// Use a trial period to set the first recurring payment date.
|
2379 |
if ( $order->BillingPeriod == "Year" ) {
|
2380 |
-
$
|
2381 |
} elseif ( $order->BillingPeriod == "Day" ) {
|
2382 |
-
$
|
2383 |
} elseif ( $order->BillingPeriod == "Week" ) {
|
2384 |
-
$
|
2385 |
} else {
|
2386 |
-
$
|
2387 |
}
|
2388 |
-
$trial_period_days = $order->BillingFrequency * $days_in_billing_period;
|
2389 |
|
2390 |
// For free trials, multiply the trial period for each additional free period.
|
2391 |
if ( ! empty( $order->TrialBillingCycles ) && $order->TrialAmount == 0 ) {
|
2392 |
-
$trialOccurrences = (int) $order->TrialBillingCycles;
|
2393 |
$trial_period_days = $trial_period_days * ( $order->TrialBillingCycles + 1 );
|
2394 |
}
|
2395 |
|
1456 |
if ( pmpro_isLevelRecurring( $order->membership_level ) ) {
|
1457 |
$subscription = $this->create_subscription_for_customer_from_order( $customer->id, $order );
|
1458 |
if ( empty( $subscription ) ) {
|
1459 |
+
// There was an issue creating the subscription. Order will have error message.
|
1460 |
+
$order->error = __( 'Error creating subscription for customer.', 'paid-memberships-pro' ) . ' ' . $order->error;
|
1461 |
$order->shorterror = $order->error;
|
1462 |
return false;
|
1463 |
}
|
2377 |
private function calculate_trial_period_days( $order ) {
|
2378 |
// Use a trial period to set the first recurring payment date.
|
2379 |
if ( $order->BillingPeriod == "Year" ) {
|
2380 |
+
$trial_period_days = $order->BillingFrequency * 365; //annual
|
2381 |
} elseif ( $order->BillingPeriod == "Day" ) {
|
2382 |
+
$trial_period_days = $order->BillingFrequency * 1; //daily
|
2383 |
} elseif ( $order->BillingPeriod == "Week" ) {
|
2384 |
+
$trial_period_days = $order->BillingFrequency * 7; //weekly
|
2385 |
} else {
|
2386 |
+
$trial_period_days = $order->BillingFrequency * 30; //assume monthly
|
2387 |
}
|
|
|
2388 |
|
2389 |
// For free trials, multiply the trial period for each additional free period.
|
2390 |
if ( ! empty( $order->TrialBillingCycles ) && $order->TrialAmount == 0 ) {
|
|
|
2391 |
$trial_period_days = $trial_period_days * ( $order->TrialBillingCycles + 1 );
|
2392 |
}
|
2393 |
|
css/blocks.editor.css
CHANGED
@@ -24,6 +24,9 @@
|
|
24 |
.pmpro-block-element .components-base-control {
|
25 |
margin-bottom: 16px;
|
26 |
}
|
|
|
|
|
|
|
27 |
.pmpro-block-element .components-base-control .components-base-control__label {
|
28 |
display: block;
|
29 |
}
|
24 |
.pmpro-block-element .components-base-control {
|
25 |
margin-bottom: 16px;
|
26 |
}
|
27 |
+
.pmpro-block-element .components-base-control .components-select-control {
|
28 |
+
height: auto;
|
29 |
+
}
|
30 |
.pmpro-block-element .components-base-control .components-base-control__label {
|
31 |
display: block;
|
32 |
}
|
includes/upgradecheck.php
CHANGED
@@ -267,15 +267,15 @@ function pmpro_checkForUpgrades()
|
|
267 |
pmpro_db_delta();
|
268 |
$pmpro_db_version = pmpro_upgrade_2_6();
|
269 |
pmpro_setOption( 'db_version', '2.6' );
|
270 |
-
}
|
271 |
-
|
272 |
/**
|
273 |
-
* Version 2.7.
|
274 |
-
* Running pmpro_db_delta to
|
275 |
*/
|
276 |
-
if( $pmpro_db_version < 2.
|
277 |
pmpro_db_delta();
|
278 |
-
pmpro_setOption( 'db_version', '2.
|
279 |
}
|
280 |
}
|
281 |
|
267 |
pmpro_db_delta();
|
268 |
$pmpro_db_version = pmpro_upgrade_2_6();
|
269 |
pmpro_setOption( 'db_version', '2.6' );
|
270 |
+
}
|
271 |
+
|
272 |
/**
|
273 |
+
* Version 2.7.1
|
274 |
+
* Running pmpro_db_delta to fix the primary key in a couple tables.
|
275 |
*/
|
276 |
+
if( $pmpro_db_version < 2.71 ) {
|
277 |
pmpro_db_delta();
|
278 |
+
pmpro_setOption( 'db_version', '2.71' );
|
279 |
}
|
280 |
}
|
281 |
|
paid-memberships-pro.php
CHANGED
@@ -3,20 +3,20 @@
|
|
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.7
|
7 |
* Author: Stranger Studios
|
8 |
* Author URI: https://www.strangerstudios.com
|
9 |
* Text Domain: paid-memberships-pro
|
10 |
* Domain Path: /languages
|
11 |
*/
|
12 |
/**
|
13 |
-
* Copyright 2011-
|
14 |
* (email : info@paidmembershipspro.com)
|
15 |
* GPLv2 Full license details in license.txt
|
16 |
*/
|
17 |
|
18 |
// version constant
|
19 |
-
define( 'PMPRO_VERSION', '2.7' );
|
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.7.2
|
7 |
* Author: Stranger Studios
|
8 |
* Author URI: https://www.strangerstudios.com
|
9 |
* Text Domain: paid-memberships-pro
|
10 |
* Domain Path: /languages
|
11 |
*/
|
12 |
/**
|
13 |
+
* Copyright 2011-2022 Stranger Studios
|
14 |
* (email : info@paidmembershipspro.com)
|
15 |
* GPLv2 Full license details in license.txt
|
16 |
*/
|
17 |
|
18 |
// version constant
|
19 |
+
define( 'PMPRO_VERSION', '2.7.2' );
|
20 |
define( 'PMPRO_USER_AGENT', 'Paid Memberships Pro v' . PMPRO_VERSION . '; ' . site_url() );
|
21 |
define( 'PMPRO_MIN_PHP_VERSION', '5.6' );
|
22 |
|
readme.txt
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
Contributors: strangerstudios, kimannwall, andrewza, dlparker1005, paidmembershipspro
|
3 |
Tags: memberships, members, subscriptions, ecommerce, user registration, member, membership, e-commerce, paypal, stripe, braintree, authorize.net, payflow, restrict access, restrict content, directory
|
4 |
Requires at least: 5.2
|
5 |
-
Tested up to: 5.
|
6 |
Requires PHP: 5.6
|
7 |
-
Stable tag: 2.7
|
8 |
|
9 |
Get Paid with Paid Memberships Pro: The most complete member management and membership subscriptions plugin for your WordPress site.
|
10 |
|
@@ -156,6 +156,14 @@ Not sure? You can find out by doing a bit a research.
|
|
156 |
9. Membership Account page, display all sections or show specific sections using shortcode attributes.
|
157 |
|
158 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
159 |
= 2.7 - 2022-01-13 =
|
160 |
* FEATURE: Added a "Spam Protection" option to the advanced settings page. When used, IP addresses are blocked from checkout if there are more than 10 failsures within 15 minutes. (@ideadude)
|
161 |
* ENHANCEMENT: Checkouts with Stripe will now reuse Stripe Products and Prices. (@dparker1005)
|
2 |
Contributors: strangerstudios, kimannwall, andrewza, dlparker1005, paidmembershipspro
|
3 |
Tags: memberships, members, subscriptions, ecommerce, user registration, member, membership, e-commerce, paypal, stripe, braintree, authorize.net, payflow, restrict access, restrict content, directory
|
4 |
Requires at least: 5.2
|
5 |
+
Tested up to: 5.9
|
6 |
Requires PHP: 5.6
|
7 |
+
Stable tag: 2.7.2
|
8 |
|
9 |
Get Paid with Paid Memberships Pro: The most complete member management and membership subscriptions plugin for your WordPress site.
|
10 |
|
156 |
9. Membership Account page, display all sections or show specific sections using shortcode attributes.
|
157 |
|
158 |
== Changelog ==
|
159 |
+
= 2.7.2 - 2022-01-17 =
|
160 |
+
* BUG FIX/ENHANCEMENT: Improved error messages when creating subscriptions with Stripe. (@dparker1005)
|
161 |
+
* BUG FIX: Fixed issue where certain Stripe trial periods would be sent to the Stripe subscription as longer than intended. #1912 (@dparker1005)
|
162 |
+
* BUG FIX: Fixed visual issues with dropdowns in our blocks when using Full Site Editing in WP 5.9+. #1909 (@sc0ttkclark)
|
163 |
+
|
164 |
+
= 2.7.1 - 2022-01-13 =
|
165 |
+
* BUG FIX: Fixed issue on some MySQL setups that would throw an error about the primary key in the pmpro_memberships_pages and pmpro_memberships_categories tables.
|
166 |
+
|
167 |
= 2.7 - 2022-01-13 =
|
168 |
* FEATURE: Added a "Spam Protection" option to the advanced settings page. When used, IP addresses are blocked from checkout if there are more than 10 failsures within 15 minutes. (@ideadude)
|
169 |
* ENHANCEMENT: Checkouts with Stripe will now reuse Stripe Products and Prices. (@dparker1005)
|