After updating to CiviCRM 5.35, If we created a payment plan membership with pending status, we found out that the end date will increase each time we recorded a new payment.
Before
Recording a new payment will increase the membership end date.
After
Recording a new payment will not increase the membership end date.
The main point is to figure out if the submitted form is a record payment submission or refund submission and we can do that by checking the the variable _paymentType in the AdditionalPayment Form class and prepare it for MembershipEdit class.
Comments
Another potential solution is to alter the button attributes and inject the value "Record Payment" again like this
Overview
After updating to CiviCRM 5.35, If we created a payment plan membership with pending status, we found out that the end date will increase each time we recorded a new payment.
Before
Recording a new payment will increase the membership end date.
After
Recording a new payment will not increase the membership end date.
Technical Details
This PR https://github.com/civicrm/civicrm-core/pull/18410 to CiviCRM core has the following change :
Instead of creating a button with the value "Record Payment" like this
It will create a button with the value "1" like this
And the condition here will be false
The main point is to figure out if the submitted form is a record payment submission or refund submission and we can do that by checking the the variable
_paymentType
in theAdditionalPayment
Form class and prepare it forMembershipEdit
class.Comments
Another potential solution is to alter the button attributes and inject the value "Record Payment" again like this