-
-
Notifications
You must be signed in to change notification settings - Fork 825
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
Show recurring contribution links based on payment processor capabilities #12821
Show recurring contribution links based on payment processor capabilities #12821
Conversation
…t processor capabilities
@@ -251,13 +260,6 @@ private function buildRecurringContributionsArray($recurContributions) { | |||
} | |||
|
|||
if ($recurContributions[$recurId]['is_active']) { | |||
$details = CRM_Contribute_BAO_ContributionRecur::getSubscriptionDetails($recurContributions[$recurId]['id'], 'recur'); | |||
$hideUpdate = $details->membership_id & $details->auto_renew; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mattwire this PR makes sense to me with an exception about the doubts of this one line. It seems the intention of this line was to suppress the editing in the case where auto_renew is set (although the use of a bitwise operator is confusing!).
This is described as.
'Some systems allow contributor to set a number of installments - but then auto-renew the subscription or commitment if they do not cancel.'
TBH I can barely understand what that means & the code rarely helps! However it seems the issue is not that it is being suppressed for memberships per se but that it is being suppressed for auto_renew memberships. So we need to try to figure out what the impact of auto_renew is....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, this is kind of a "change" but it was already agreed and implemented in https://issues.civicrm.org/jira/browse/CRM-21512 ... It's just we missed this bit. You have been able to navigate directly to the "Edit recurring contribution" page since CRM-21512 was implemented (4.7.30) but the link was not being displayed next to the recurring contribution because of this bit of code.
What it actually means is:
- BEFORE: Core did not allow editing a recurring contribution if linked to a membership.
- AFTER: Core does not restrict editing a recurring contribution if linked to a membership.
The "auto_renew" really just means the membership has an associated recurring contribution.
OK - I can't find any evidence of auto-renew usage which is more complicated than is_recurring & I agree this just increases consistency. Does what it says it does. Merging after re-running tests |
test this please |
Overview
In CRM-21512 / #11366 we removed the restriction on editing recurring contributions based on whether they were linked to a membership. However, the "edit" link was still being shown/hidden based on that criteria.
What we should be doing is showing/hiding links based on whether the payment processor actually supports those functions and this PR makes that happen.
Before
After
Technical Details
Recent changes to payment processor supportsX methods have made this cleaner and easier to implement.
Comments
@KarinG @eileenmcnaughton @bhahumanists I think you're likely to have an interest