CRM-18077 pledge receipting dependent on page config
authoreileenmcnaugton <eileen@fuzion.co.nz>
Mon, 22 Feb 2016 01:51:58 +0000 (14:51 +1300)
committereileenmcnaugton <eileen@fuzion.co.nz>
Mon, 22 Feb 2016 01:51:58 +0000 (14:51 +1300)
CRM/Contribute/Form/Contribution/Confirm.php

index 9856174e4c578bed4758fb166842e7c2ea74cf00..5c733a583dff8d0c306de19bb64a32429d35929f 100644 (file)
@@ -945,7 +945,7 @@ class CRM_Contribute_Form_Contribution_Confirm extends CRM_Contribute_Form_Contr
         $form->_params['pledge_id'] = $pledge->id;
 
         //send acknowledgment email. only when pledge is created
-        if ($pledge->id) {
+        if ($pledge->id && $isEmailReceipt) {
           //build params to send acknowledgment.
           $pledgeParams['id'] = $pledge->id;
           $pledgeParams['receipt_from_name'] = $form->_values['receipt_from_name'];