From 40cef32d161df392c76bd2bf9ddee38bb41e9ff6 Mon Sep 17 00:00:00 2001 From: Jitendra Purohit Date: Mon, 16 Sep 2019 15:38:52 +0530 Subject: [PATCH] dev/core#1255 - fix display of email address on pay later contribution --- CRM/Contribute/Form/ContributionBase.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/CRM/Contribute/Form/ContributionBase.php b/CRM/Contribute/Form/ContributionBase.php index 0399436fd8c1..a0992ef2ae3c 100644 --- a/CRM/Contribute/Form/ContributionBase.php +++ b/CRM/Contribute/Form/ContributionBase.php @@ -574,9 +574,16 @@ public function assignToTemplate() { } $this->assignPaymentFields(); - $this->assign('email', - $this->controller->exportValue('Main', "email-{$this->_bltID}") - ); + if ($this->_emailExists && empty($this->_params["email-{$this->_bltID}"])) { + foreach ($this->_params as $key => $val) { + if (substr($key, 0, 6) == 'email-') { + $this->assign('email', $this->_params[$key]); + } + } + } + else { + $this->assign('email', $this->_params["email-{$this->_bltID}"]); + } // also assign the receipt_text if (isset($this->_values['receipt_text'])) {