Membership end date is being updated to next period after doing contribution bulk action 'Updating Pending Contribution Status'.
Before
When updating contributions in bulk, CiviCRM will set the num_terms parameter which, in their own words, is used as a "special sauce" to cause the memberships related to the contributions to be extended. Furthermore, this extension is calculated in the membership API call, before hitting the BAO.
Neutralized CiviCRM API's special sauce, by implementing a pre hook on the membership entity that will unset the end date if it detects a bulk contribution status update is being done.
Overview
Membership end date is being updated to next period after doing contribution bulk action 'Updating Pending Contribution Status'.
Before
When updating contributions in bulk, CiviCRM will set the num_terms parameter which, in their own words, is used as a "special sauce" to cause the memberships related to the contributions to be extended. Furthermore, this extension is calculated in the membership API call, before hitting the BAO.
https://github.com/civicrm/civicrm-core/blob/master/api/v3/Membership.php#L106-L108
After
Neutralized CiviCRM API's special sauce, by implementing a pre hook on the membership entity that will unset the end date if it detects a bulk contribution status update is being done.