CRM-17862: Source field - in backend - one-time credit card contribution defaults...
authorMathieu Lutfy <mathieu@bidon.ca>
Mon, 21 Mar 2016 20:08:33 +0000 (16:08 -0400)
committerMathieu Lutfy <mathieu@bidon.ca>
Mon, 21 Mar 2016 20:08:33 +0000 (16:08 -0400)
CRM/Contribute/BAO/Contribution.php

index 263963f0b4fd6e4da49146a91332d6fdd7c6aed8..7cf379ea14b4b125574c7bdade3d4407d3a666aa 100644 (file)
@@ -4763,7 +4763,10 @@ LIMIT 1;";
    * @throws \CiviCRM_API3_Exception
    */
   protected static function getRecurringContributionDescription($contribution, $event) {
-    if (!empty($contribution->contribution_page_id)) {
+    if (! empty($contribution->source)) {
+      return $contribution->source;
+    }
+    elseif (!empty($contribution->contribution_page_id)) {
       $contributionPageTitle = civicrm_api3('ContributionPage', 'getvalue', array(
         'id' => $contribution->contribution_page_id,
         'return' => 'title',