Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to set "Cancel Membership" field for non-recurring memberships #48

Open
dparker1005 opened this issue Dec 4, 2019 · 0 comments
Milestone

Comments

@dparker1005
Copy link
Member

Non-recurring memberships give a grace period here for members with a prior successful order but a current order that is pending (

if(pmpro_isLevelRecurring($membership_level)) {
$cutoff = strtotime("- " . $membership_level->cycle_number . " " . $membership_level->cycle_period, current_time("timestamp")) - ($options['cancel_days']*3600*24);
} else {
$cutoff = strtotime("- " . $membership_level->expiration_number . " " . $membership_level->expiration_period, current_time("timestamp")) - ($options['cancel_days']*3600*24);
}
), but it is not intuitive how to set this field.

Here is the field that should get that information when editing a membership level:

<tr class="pbc_recurring_field">
<th scope="row" valign="top"><label for="pbc_cancel_days"><?php _e('Cancel Membership:', 'pmpro-pay-by-check');?></label></th>
<td>
<input type="text" id="pbc_cancel_days" name="pbc_cancel_days" size="5" value="<?php echo esc_attr($options['cancel_days']);?>" /> <?php _e('days after a missed payment.', 'pmpro-pay-by-check');?>
</td>
</tr>

And the JS that hides that field for non-recurring memberships: https://github.com/strangerstudios/pmpro-pay-by-check/blob/dev/js/pmpro-pay-by-check-admin.js

It is currently possible to set these field by checking the recurring payment button, setting the fields, saving the membership level, unchecking the recurring payment button, and saving again, but this is not intuitive for users.

Possible fixes include making that field always visible or simply not giving a grace period for non-recurring levels.

@andrewlimaza andrewlimaza added this to the V1.0 milestone Sep 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants