Skip to content

Commit

Permalink
Merge branch 'master' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
ideadude committed Jan 19, 2021
2 parents 1e13b9b + 2fdcda3 commit 9cb9b3c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
9 changes: 7 additions & 2 deletions pmpro-auto-renewal-checkbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Plugin Name: Paid Memberships Pro - Auto-Renewal Checkbox
Plugin URI: https://www.paidmembershipspro.com/add-ons/auto-renewal-checkbox-membership-checkout/
Description: Make auto-renewal optional at checkout with a checkbox.
Version: .2.8
Version: .2.9
Author: Paid Memberships Pro
Author URI: https://www.paidmembershipspro.com
Text Domain: pmpro-auto-renewal-checkbox
Expand Down Expand Up @@ -186,6 +186,7 @@ function pmproarc_pmpro_paypalexpress_session_vars() {
$_SESSION['autorenew_present'] = 1;
}
add_action('pmpro_paypalexpress_session_vars', 'pmproarc_pmpro_paypalexpress_session_vars');
add_action('pmpro_before_send_to_twocheckout', 'pmprorh_rf_pmpro_paypalexpress_session_vars', 10, 0);

//update level based on selection
function pmproarc_checkout_level($level) {
Expand Down Expand Up @@ -231,7 +232,11 @@ function pmproarc_checkout_level($level) {
//remove recurring billing
$level->billing_amount = 0;
$level->cycle_number = 0;
}
} else {
// Disable Set Expiration Date
remove_filter( 'pmpro_checkout_level', 'pmprosed_pmpro_checkout_level' );
remove_filter( 'pmpro_discount_code_level', 'pmprosed_pmpro_checkout_level', 10, 2 );
}

return $level;
}
Expand Down
10 changes: 8 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
Contributors: strangerstudios
Tags: pmpro, paid memberships pro, members, memberships, auto-renewal, renewal, checkbox
Requires at least: 4
Tested up to: 5.2.4
Stable tag: .2.8
Tested up to: 5.6
Stable tag: 0.2.9

Make auto renewal optional at checkout with a checkbox.

Expand All @@ -21,6 +21,12 @@ This does not work with PMPro discount codes yet. If a customer uses a discount

== Changelog ==

= 0.2.9 =
* ENHANCEMENT: Prepared for localization.
* BUG FIX/ENHANCEMENT: If you are also using the Set Expiration Dates add on, we will no longer set the expiration date if you had the recurring checkbox checked.
* BUG FIX/ENHANCEMENT: Now settings session variables for 2Checkout gateway.
* BUG FIX: No longer trying to give a user their level back if they are being deleted.

= .2.8 =
* BUG FIX: Fixed issues with cancellation.

Expand Down

0 comments on commit 9cb9b3c

Please sign in to comment.