Skip to content

Commit

Permalink
Merge pull request #22779 from eileenmcnaughton/pledgey
Browse files Browse the repository at this point in the history
dev/core#3066 - Check CiviPledge is enabled before disconnecting pledge payments
  • Loading branch information
eileenmcnaughton authored Feb 16, 2022
2 parents 2eddcf9 + f70d393 commit 175319b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions CRM/Contribute/BAO/Contribution.php
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,7 @@ public static function create(&$params) {
CRM_Contribute_BAO_ContributionSoft::processSoftContribution($params, $contribution);

if (!empty($params['id']) && !empty($params['contribution_status_id'])
&& CRM_Core_Component::isEnabled('CiviPledge')
) {
self::disconnectPledgePaymentsIfCancelled((int) $params['id'], CRM_Core_PseudoConstant::getName('CRM_Contribute_BAO_Contribution', 'contribution_status_id', $params['contribution_status_id']));
}
Expand Down

0 comments on commit 175319b

Please sign in to comment.