Don't freeze fields for auto-renew memberships
If a membership is linked to a recurring payment some of the fields are frozen, which means that a user is unable to edit them when they visit the edit membership screen.
This affects the following fields:
- Membership organisation
- Membership type
-
Membership end date[no longer frozen] - Membership status
This issue is split out from #1126 (closed) which looked specifically at the end_date field. This fix has now been merged into core (PR #15540).
I've created this ticket to look at the other fields that are also frozen following discussion in my original PR.
Issue
The ability to edit the membership type is an issue for our organisation because sometimes people sign up for the wrong membership type and we need to change this. For non-recurring payments this is no problem, we can just change it manually and if necessary take additional payment or make a refund. But for recurring payments we are unable to do this because the field is frozen. We are then stuck and have no way of changing the membership type in CiviCRM through the UI.
The ability to edit the membership organisation isn't an issue for us as we only have one membership organisation. However, other organisations may want to be able to do this for the same reason as above.
The ability to edit the membership status also isn't an issue for us, but I don't really understand the logic of freezing it for auto-renew memberships and so I'm also including it here for consistency.
Proposal
My proposal is that CiviCRM core shouldn't freeze any of these fields. If required they can be frozen by an individual payment processor or other extension.
My feeling was that the logic about whether the fields should be editable or not will vary from organisation to organisation depending on the business processes of the organisation and the payment processor that they use. So, I don't feel that CiviCRM core should be imposing this. It should be down to each organisation to make their own customisations as required. If and where appropriate it could be included in the logic for an individual payment processor.
This involves removing the relevant code as per PR #15505.
Summary of changes
This summary is for the benefit of those who don't want to read the lengthy discussions below. It can also be used in the release notes.
This change fixes an issue which meant that it wasn't possible to edit some membership fields when a membership was set to auto-renew. Following the change it is now possible to edit all of the fields on the edit membership form.
- These fields are no longer frozen:
- Membership Organisation
- Membership Type
- Membership Status
- A warning is displayed to alert users that any changes they make to the membership may not be reflected in the payment processor
- The Membership Organisation/Type field is initially uneditable but there is a link to make it editable
If the membership is not set to auto-renew there is no change to the edit membership form. So this change will have no effect on organisations that don't offer recurring payments for membership.
If your organisation does offer recurring payments for membership you should make staff aware of these changes. In particular you should make them aware that changes they make to the membership may not be reflected in the payment processor. This means that if you make a change you may also need to update the corresponding record in the payment processor. This depends on the particular payment processor that your organisation uses so you will need to check the functionality that your payment processor supports.
If you would like to restore the previous functionality so that these fields are frozen and uneditable you can install this extension: Freeze Membership Fields.
The change will be included in CiviCRM version 5.25 which is due for release in May 2020. See PR #16609 for more details on the change.