From 039134ba91079c4b8fb5a8e2ae0cf1f86fad71b0 Mon Sep 17 00:00:00 2001 From: mgbdev Date: Wed, 27 Nov 2013 18:16:44 +0530 Subject: [PATCH] Cc: and Bcc: for receipts on contribution pages do not work with recurring contributions --- CRM/Contribute/BAO/ContributionPage.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/CRM/Contribute/BAO/ContributionPage.php b/CRM/Contribute/BAO/ContributionPage.php index 8a37c39308..8eb88577b8 100644 --- a/CRM/Contribute/BAO/ContributionPage.php +++ b/CRM/Contribute/BAO/ContributionPage.php @@ -55,7 +55,7 @@ class CRM_Contribute_BAO_ContributionPage extends CRM_Contribute_DAO_Contributio $dao = new CRM_Contribute_DAO_ContributionPage(); $dao->copyValues($params); $dao->save(); - if ($financialTypeId && CRM_Utils_Array::value('financial_type_id', $params) + if ($financialTypeId && CRM_Utils_Array::value('financial_type_id', $params) && $financialTypeId != $params['financial_type_id']) { CRM_Price_BAO_PriceFieldValue::updateFinancialType($params['id'], 'civicrm_contribution_page', $params['financial_type_id']); } @@ -491,7 +491,11 @@ class CRM_Contribute_BAO_ContributionPage extends CRM_Contribute_DAO_Contributio 'toName' => $displayName, 'toEmail' => $email, ); - + //CRM-13811 + if ($pageID) { + $templatesParams['cc'] = CRM_Utils_Array::value('cc_receipt', $value[$pageID]); + $templatesParams['bcc'] = CRM_Utils_Array::value('bcc_receipt', $value[$pageID]); + } if ($recur->id) { // in some cases its just recurringNotify() thats called for the first time and these urls don't get set. // like in PaypalPro, & therefore we set it here additionally. -- 2.25.1