Version Description
- 2019-01-05 =
- BUG FIX: Once again loading JavaScript on the update billing page when using Braintree.
- BUG FIX: Loading Braintree JavaScript at checkout for free levels to support the variable pricing and donation add ons.
- BUG FIX: Fixed issues with PayPal orders when using the pmpro_paypal_level_description filter.
- BUG FIX/ENHANCEMENT: Responsive update for smaller device viewports for the Membership Levels table in the dashboard.
- ENHANCEMENT: Added filters: pmpro_is_level_free, pmpro_is_level_trial, and pmpro_is_level_expiring.
Download this release
Release Info
Developer | strangerstudios |
Plugin | Paid Memberships Pro |
Version | 2.2.5 |
Comparing to | |
See all releases |
Code changes from version 2.2.4 to 2.2.5
- CHANGELOG.txt +7 -0
- classes/gateways/class.pmprogateway_authorizenet.php +2 -2
- classes/gateways/class.pmprogateway_braintree.php +2 -1
- classes/gateways/class.pmprogateway_paypalexpress.php +1 -1
- classes/gateways/class.pmprogateway_paypalstandard.php +2 -2
- css/frontend.css +4 -0
- includes/functions.php +20 -8
- paid-memberships-pro.php +2 -2
- readme.txt +8 -1
CHANGELOG.txt
CHANGED
@@ -1,4 +1,11 @@
|
|
1 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
= 2.2.4 - 2019-12-20 =
|
3 |
* BUG FIX: Fixed issue with the update billing page when using the Stripe gateway.
|
4 |
|
1 |
== Changelog ==
|
2 |
+
= 2.2.5 - 2019-01-05 =
|
3 |
+
* BUG FIX: Once again loading JavaScript on the update billing page when using Braintree.
|
4 |
+
* BUG FIX: Loading Braintree JavaScript at checkout for free levels to support the variable pricing and donation add ons.
|
5 |
+
* BUG FIX: Fixed issues with PayPal orders when using the pmpro_paypal_level_description filter.
|
6 |
+
* BUG FIX/ENHANCEMENT: Responsive update for smaller device viewports for the Membership Levels table in the dashboard.
|
7 |
+
* ENHANCEMENT: Added filters: pmpro_is_level_free, pmpro_is_level_trial, and pmpro_is_level_expiring.
|
8 |
+
|
9 |
= 2.2.4 - 2019-12-20 =
|
10 |
* BUG FIX: Fixed issue with the update billing page when using the Stripe gateway.
|
11 |
|
classes/gateways/class.pmprogateway_authorizenet.php
CHANGED
@@ -302,7 +302,7 @@
|
|
302 |
"x_exp_date" => $order->ExpirationDate,
|
303 |
|
304 |
"x_amount" => $amount,
|
305 |
-
"x_description" => $order->membership_level->name . " " .
|
306 |
|
307 |
"x_first_name" => $order->FirstName,
|
308 |
"x_last_name" => $order->LastName,
|
@@ -490,7 +490,7 @@
|
|
490 |
|
491 |
"x_amount" => $amount,
|
492 |
"x_tax" => $tax,
|
493 |
-
"x_description" => $order->membership_level->name . "
|
494 |
|
495 |
"x_first_name" => $order->FirstName,
|
496 |
"x_last_name" => $order->LastName,
|
302 |
"x_exp_date" => $order->ExpirationDate,
|
303 |
|
304 |
"x_amount" => $amount,
|
305 |
+
"x_description" => apply_filters( 'pmpro_authorizenet_level_description', substr($order->membership_level->name . " at " . get_bloginfo("name"), 0, 127), $order->membership_level->name, $order, get_bloginfo("name")),
|
306 |
|
307 |
"x_first_name" => $order->FirstName,
|
308 |
"x_last_name" => $order->LastName,
|
490 |
|
491 |
"x_amount" => $amount,
|
492 |
"x_tax" => $tax,
|
493 |
+
"x_description" => apply_filters( 'pmpro_authorizenet_level_description', substr($order->membership_level->name . " at " . get_bloginfo("name"), 0, 127), $order->membership_level->name, $order, get_bloginfo("name")),
|
494 |
|
495 |
"x_first_name" => $order->FirstName,
|
496 |
"x_last_name" => $order->LastName,
|
classes/gateways/class.pmprogateway_braintree.php
CHANGED
@@ -229,6 +229,7 @@ use Braintree\WebhookNotification as Braintree_WebhookNotification;
|
|
229 |
if( ( $default_gateway == "braintree" || $current_gateway == "braintree" && empty($_REQUEST['review']))) //$_REQUEST['review'] means the PayPal Express review page
|
230 |
{
|
231 |
add_action('pmpro_checkout_preheader', array('PMProGateway_braintree', 'pmpro_checkout_preheader'));
|
|
|
232 |
add_action( 'pmpro_save_membership_level', array( 'PMProGateway_braintree', 'pmpro_save_level_action') );
|
233 |
add_action('pmpro_checkout_before_submit_button', array('PMProGateway_braintree', 'pmpro_checkout_before_submit_button'));
|
234 |
add_action('pmpro_billing_before_submit_button', array('PMProGateway_braintree', 'pmpro_checkout_before_submit_button'));
|
@@ -364,7 +365,7 @@ use Braintree\WebhookNotification as Braintree_WebhookNotification;
|
|
364 |
|
365 |
$default_gateway = pmpro_getOption("gateway");
|
366 |
|
367 |
-
if(($gateway == "braintree" || $default_gateway == "braintree")
|
368 |
wp_enqueue_script("stripe", "https://js.braintreegateway.com/v1/braintree.js", array(), NULL);
|
369 |
wp_register_script( 'pmpro_braintree',
|
370 |
plugins_url( 'js/pmpro-braintree.js', PMPRO_BASE_FILE ),
|
229 |
if( ( $default_gateway == "braintree" || $current_gateway == "braintree" && empty($_REQUEST['review']))) //$_REQUEST['review'] means the PayPal Express review page
|
230 |
{
|
231 |
add_action('pmpro_checkout_preheader', array('PMProGateway_braintree', 'pmpro_checkout_preheader'));
|
232 |
+
add_action( 'pmpro_billing_preheader', array( 'PMProGateway_braintree', 'pmpro_checkout_preheader' ) );
|
233 |
add_action( 'pmpro_save_membership_level', array( 'PMProGateway_braintree', 'pmpro_save_level_action') );
|
234 |
add_action('pmpro_checkout_before_submit_button', array('PMProGateway_braintree', 'pmpro_checkout_before_submit_button'));
|
235 |
add_action('pmpro_billing_before_submit_button', array('PMProGateway_braintree', 'pmpro_checkout_before_submit_button'));
|
365 |
|
366 |
$default_gateway = pmpro_getOption("gateway");
|
367 |
|
368 |
+
if(($gateway == "braintree" || $default_gateway == "braintree")) {
|
369 |
wp_enqueue_script("stripe", "https://js.braintreegateway.com/v1/braintree.js", array(), NULL);
|
370 |
wp_register_script( 'pmpro_braintree',
|
371 |
plugins_url( 'js/pmpro-braintree.js', PMPRO_BASE_FILE ),
|
classes/gateways/class.pmprogateway_paypalexpress.php
CHANGED
@@ -518,7 +518,7 @@
|
|
518 |
$nvpStr .= "&BILLINGPERIOD=" . $order->BillingPeriod . "&BILLINGFREQUENCY=" . $order->BillingFrequency . "&AUTOBILLOUTAMT=AddToNextBilling&L_BILLINGTYPE0=RecurringPayments";
|
519 |
$nvpStr .= "&DESC=" . urlencode( apply_filters( 'pmpro_paypal_level_description', substr($order->membership_level->name . " at " . get_bloginfo("name"), 0, 127), $order->membership_level->name, $order, get_bloginfo("name")) );
|
520 |
$nvpStr .= "&NOTIFYURL=" . urlencode( add_query_arg( 'action', 'ipnhandler', admin_url('admin-ajax.php') ) );
|
521 |
-
$nvpStr .= "&NOSHIPPING=1&L_BILLINGAGREEMENTDESCRIPTION0=" . urlencode(substr($order->membership_level->name . " at " . get_bloginfo("name"), 0, 127)) . "&L_PAYMENTTYPE0=Any";
|
522 |
|
523 |
//if billing cycles are defined
|
524 |
if(!empty($order->TotalBillingCycles))
|
518 |
$nvpStr .= "&BILLINGPERIOD=" . $order->BillingPeriod . "&BILLINGFREQUENCY=" . $order->BillingFrequency . "&AUTOBILLOUTAMT=AddToNextBilling&L_BILLINGTYPE0=RecurringPayments";
|
519 |
$nvpStr .= "&DESC=" . urlencode( apply_filters( 'pmpro_paypal_level_description', substr($order->membership_level->name . " at " . get_bloginfo("name"), 0, 127), $order->membership_level->name, $order, get_bloginfo("name")) );
|
520 |
$nvpStr .= "&NOTIFYURL=" . urlencode( add_query_arg( 'action', 'ipnhandler', admin_url('admin-ajax.php') ) );
|
521 |
+
$nvpStr .= "&NOSHIPPING=1&L_BILLINGAGREEMENTDESCRIPTION0=" . urlencode( apply_filters( 'pmpro_paypal_level_description', substr($order->membership_level->name . " at " . get_bloginfo("name"), 0, 127), $order->membership_level->name, $order, get_bloginfo("name") ) ) . "&L_PAYMENTTYPE0=Any";
|
522 |
|
523 |
//if billing cycles are defined
|
524 |
if(!empty($order->TotalBillingCycles))
|
classes/gateways/class.pmprogateway_paypalstandard.php
CHANGED
@@ -359,7 +359,7 @@
|
|
359 |
'a3' => number_format($amount, 2, '.', ''),
|
360 |
'p3' => $order->BillingFrequency,
|
361 |
't3' => $period,
|
362 |
-
'item_name' => substr($order->membership_level->name . " at " . get_bloginfo("name"), 0, 127),
|
363 |
'email' => $order->Email,
|
364 |
'no_shipping' => '1',
|
365 |
'shipping' => '0',
|
@@ -469,7 +469,7 @@
|
|
469 |
'business' => pmpro_getOption("gateway_email"),
|
470 |
'cmd' => '_xclick',
|
471 |
'amount' => number_format($initial_payment, 2, '.', ''),
|
472 |
-
'item_name' => substr(
|
473 |
'email' => $order->Email,
|
474 |
'no_shipping' => '1',
|
475 |
'shipping' => '0',
|
359 |
'a3' => number_format($amount, 2, '.', ''),
|
360 |
'p3' => $order->BillingFrequency,
|
361 |
't3' => $period,
|
362 |
+
'item_name' => apply_filters( 'pmpro_paypal_level_description', substr($order->membership_level->name . " at " . get_bloginfo("name"), 0, 127), $order->membership_level->name, $order, get_bloginfo("name") ),
|
363 |
'email' => $order->Email,
|
364 |
'no_shipping' => '1',
|
365 |
'shipping' => '0',
|
469 |
'business' => pmpro_getOption("gateway_email"),
|
470 |
'cmd' => '_xclick',
|
471 |
'amount' => number_format($initial_payment, 2, '.', ''),
|
472 |
+
'item_name' => apply_filters( 'pmpro_paypal_level_description', substr($order->membership_level->name . " at " . get_bloginfo("name"), 0, 127), $order->membership_level->name, $order, get_bloginfo("name") ),
|
473 |
'email' => $order->Email,
|
474 |
'no_shipping' => '1',
|
475 |
'shipping' => '0',
|
css/frontend.css
CHANGED
@@ -469,6 +469,10 @@ li.pmpro_more {
|
|
469 |
Responsive Styles
|
470 |
---------------------------------------*/
|
471 |
@media (max-width:768px) {
|
|
|
|
|
|
|
|
|
472 |
.pmpro_checkout h3 span.pmpro_checkout-h3-name {
|
473 |
display: block;
|
474 |
}
|
469 |
Responsive Styles
|
470 |
---------------------------------------*/
|
471 |
@media (max-width:768px) {
|
472 |
+
#pmpro_account #pmpro_account-membership .pmpro_table td:nth-child(1),
|
473 |
+
#pmpro_levels_table td:nth-child(1) {
|
474 |
+
min-width: unset;
|
475 |
+
}
|
476 |
.pmpro_checkout h3 span.pmpro_checkout-h3-name {
|
477 |
display: block;
|
478 |
}
|
includes/functions.php
CHANGED
@@ -171,10 +171,13 @@ function pmpro_url( $page = null, $querystring = '', $scheme = null ) {
|
|
171 |
|
172 |
function pmpro_isLevelFree( &$level ) {
|
173 |
if ( ! empty( $level ) && $level->initial_payment <= 0 && $level->billing_amount <= 0 && $level->trial_amount <= 0 ) {
|
174 |
-
|
175 |
} else {
|
176 |
-
|
177 |
}
|
|
|
|
|
|
|
178 |
}
|
179 |
|
180 |
// Given an array of levels, will return true if all of them are free.
|
@@ -204,26 +207,35 @@ function pmpro_onlyFreeLevels() {
|
|
204 |
|
205 |
function pmpro_isLevelRecurring( &$level ) {
|
206 |
if ( ! empty( $level ) && ( $level->billing_amount > 0 || $level->trial_amount > 0 ) ) {
|
207 |
-
|
208 |
} else {
|
209 |
-
|
210 |
}
|
|
|
|
|
|
|
211 |
}
|
212 |
|
213 |
function pmpro_isLevelTrial( &$level ) {
|
214 |
if ( ! empty( $level ) && ! empty( $level->trial_limit ) && $level->trial_limit > 0 ) {
|
215 |
-
|
216 |
} else {
|
217 |
-
|
218 |
}
|
|
|
|
|
|
|
219 |
}
|
220 |
|
221 |
function pmpro_isLevelExpiring( &$level ) {
|
222 |
if ( ! empty( $level ) && ( ! empty( $level->expiration_number ) && $level->expiration_number > 0 ) || ! empty( $level->enddate ) ) {
|
223 |
-
|
224 |
} else {
|
225 |
-
|
226 |
}
|
|
|
|
|
|
|
227 |
}
|
228 |
|
229 |
/**
|
171 |
|
172 |
function pmpro_isLevelFree( &$level ) {
|
173 |
if ( ! empty( $level ) && $level->initial_payment <= 0 && $level->billing_amount <= 0 && $level->trial_amount <= 0 ) {
|
174 |
+
$r = true;
|
175 |
} else {
|
176 |
+
$r = false;
|
177 |
}
|
178 |
+
|
179 |
+
$r = apply_filters( 'pmpro_is_level_free', $r, $level );
|
180 |
+
return $r;
|
181 |
}
|
182 |
|
183 |
// Given an array of levels, will return true if all of them are free.
|
207 |
|
208 |
function pmpro_isLevelRecurring( &$level ) {
|
209 |
if ( ! empty( $level ) && ( $level->billing_amount > 0 || $level->trial_amount > 0 ) ) {
|
210 |
+
$r = true;
|
211 |
} else {
|
212 |
+
$r = false;
|
213 |
}
|
214 |
+
|
215 |
+
$r = apply_filters( 'pmpro_is_level_recurring', $r, $level );
|
216 |
+
return $r;
|
217 |
}
|
218 |
|
219 |
function pmpro_isLevelTrial( &$level ) {
|
220 |
if ( ! empty( $level ) && ! empty( $level->trial_limit ) && $level->trial_limit > 0 ) {
|
221 |
+
$r = true;
|
222 |
} else {
|
223 |
+
$r = false;
|
224 |
}
|
225 |
+
|
226 |
+
$r = apply_filters( 'pmpro_is_level_trial', $r, $level );
|
227 |
+
return $r;
|
228 |
}
|
229 |
|
230 |
function pmpro_isLevelExpiring( &$level ) {
|
231 |
if ( ! empty( $level ) && ( ! empty( $level->expiration_number ) && $level->expiration_number > 0 ) || ! empty( $level->enddate ) ) {
|
232 |
+
$r = true;
|
233 |
} else {
|
234 |
+
$r = false;
|
235 |
}
|
236 |
+
|
237 |
+
$r = apply_filters( 'pmpro_is_level_expiring', $r, $level );
|
238 |
+
return $r;
|
239 |
}
|
240 |
|
241 |
/**
|
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.2.
|
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.2.
|
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.2.5
|
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.2.5' );
|
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
@@ -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.3
|
6 |
-
Stable tag: 2.2.
|
7 |
|
8 |
Get Paid with Paid Memberships Pro: The most complete member management and membership subscriptions plugin for your WordPress site.
|
9 |
|
@@ -128,6 +128,13 @@ Not sure? You can find out by doing a bit a research.
|
|
128 |
[View All Screenshots](http://www.paidmembershipspro.com/features/screenshots/)
|
129 |
|
130 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
131 |
= 2.2.4 - 2019-12-20 =
|
132 |
* BUG FIX: Fixed issue with the update billing page when using the Stripe gateway.
|
133 |
|
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.3
|
6 |
+
Stable tag: 2.2.5
|
7 |
|
8 |
Get Paid with Paid Memberships Pro: The most complete member management and membership subscriptions plugin for your WordPress site.
|
9 |
|
128 |
[View All Screenshots](http://www.paidmembershipspro.com/features/screenshots/)
|
129 |
|
130 |
== Changelog ==
|
131 |
+
= 2.2.5 - 2019-01-05 =
|
132 |
+
* BUG FIX: Once again loading JavaScript on the update billing page when using Braintree.
|
133 |
+
* BUG FIX: Loading Braintree JavaScript at checkout for free levels to support the variable pricing and donation add ons.
|
134 |
+
* BUG FIX: Fixed issues with PayPal orders when using the pmpro_paypal_level_description filter.
|
135 |
+
* BUG FIX/ENHANCEMENT: Responsive update for smaller device viewports for the Membership Levels table in the dashboard.
|
136 |
+
* ENHANCEMENT: Added filters: pmpro_is_level_free, pmpro_is_level_trial, and pmpro_is_level_expiring.
|
137 |
+
|
138 |
= 2.2.4 - 2019-12-20 =
|
139 |
* BUG FIX: Fixed issue with the update billing page when using the Stripe gateway.
|
140 |
|