Fix check for isSubscriptionCancelled in contribute
authorMatthew Wire (MJW Consulting) <mjw@mjwconsult.co.uk>
Sun, 6 Oct 2019 17:22:20 +0000 (19:22 +0200)
committerMatthew Wire (MJW Consulting) <mjw@mjwconsult.co.uk>
Sun, 6 Oct 2019 17:24:19 +0000 (19:24 +0200)
CRM/Contribute/BAO/Contribution.php

index 5159380fde1442d30eefbb48e7d4905043b06f92..58efcf8f3af3e954e8264b5ba74754f7a03d8b0d 100644 (file)
@@ -3348,7 +3348,7 @@ INNER JOIN civicrm_activity ON civicrm_activity_contact.activity_id = civicrm_ac
         WHERE con.id = %1 LIMIT 1";
     $params = [1 => [$contributionId, 'Integer']];
     $statusId = CRM_Core_DAO::singleValueQuery($sql, $params);
-    $status = CRM_Contribute_PseudoConstant::contributionStatus($statusId);
+    $status = CRM_Contribute_PseudoConstant::contributionStatus($statusId, 'name');
     if ($status == 'Cancelled') {
       return TRUE;
     }