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 2a82b4d + 16c885e commit d5e0b15
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
7 changes: 5 additions & 2 deletions pmpro-subscription-delays.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Plugin Name: Paid Memberships Pro - Subscription Delays Add On
Plugin URI: https://www.paidmembershipspro.com/add-ons/subscription-delays/
Description: Adds a field to delay the start of a subscription for membership levels and discount codes for variable-length trials.
Version: .5.3
Version: .5.4
Author: Paid Memberships Pro
Author URI: https://www.paidmembershipspro.com
Text Domain: pmpro-subscription-delays
Expand Down Expand Up @@ -297,7 +297,10 @@ function pmprosd_convert_date( $date ) {
Add discount code and code id to the level object so we can use them later
*/
function pmprosd_pmpro_discount_code_level( $level, $code_id ) {
$level->code_id = $code_id;
// Favor the code_id that's already there (e.g. when using Group Discount Codes)
if ( empty( $level->code_id ) ) {
$level->code_id = $code_id;
}
return $level;
}
add_filter( 'pmpro_discount_code_level', 'pmprosd_pmpro_discount_code_level', 10, 2 );
Expand Down
10 changes: 7 additions & 3 deletions readme.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
=== Paid Memberships Pro - Subscription Delays Add On ===
Contributors: strangerstudios
Tags: paid memberships pro, pmpro, memberships, ecommerce
Requires at least: 3.5
Tested up to: 5.2.2
Stable tag: .5.3
Requires at least: 4
Tested up to: 5.6
Stable tag: .5.4

Adds a "delay" field to PMPro membership levels and discount codes, allowing you to set a variable-length period between your initial payment (if required) and recurring subscription payment.

Expand All @@ -24,6 +24,10 @@ Set "delay" to be:
1. That's it. No settings.

== Changelog ==
= .5.4 - 2020-01-19 =
* ENHANCEMENT: Prepared for localization.
* ENHANCEMENT: Added a pmprosd_current_date filter you can use in rare cases you want to apply subscription delays based on a day in the past.

= .5.3 =
* BUG FIX: Fixed issue where specific dates like 2019-07-29 would be converted to 2019-07-31 when used.
* BUG FIX/ENHANCEMENT: If the profile start date is in the past, we reset it to the current date to avoid issues with the gateways. In general, make sure you don't set your subscription delays to dates in the past.
Expand Down

0 comments on commit d5e0b15

Please sign in to comment.