MAE-494: Fix payment batch submission after CiviCRM 5.35 upgrade #230
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Fixing payment batch submission after CiviCRM 5.35 upgrade
Technical Details
Manual direct debit is using the core method "transitionComponentWithReturnMessage" that is in the Contribution BAO class, though this method is now removed in CiviCRM core (see civicrm/civicrm-core#18961 for more info), and thus it results in failure when submitting the payment batch.
Here I replaced the calls for this method with "transitionComponents" method, given that the former is basically calling it but just with returning some extra feedback messages, and that these feedback messages are not even used or showed back to the user in this extension, so it is safe to just call "transitionComponents" instead.