From 6fcd001e9a44dbdc8f64be1bdf695126866d471e Mon Sep 17 00:00:00 2001 From: adixon Date: Mon, 24 Apr 2017 16:46:57 -0400 Subject: [PATCH] CRM-20469 Event form currency is in a slightly different spot --- CRM/Core/Payment/ProcessorForm.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CRM/Core/Payment/ProcessorForm.php b/CRM/Core/Payment/ProcessorForm.php index 1cab78655c2a..720dae52253b 100644 --- a/CRM/Core/Payment/ProcessorForm.php +++ b/CRM/Core/Payment/ProcessorForm.php @@ -72,7 +72,12 @@ public static function preProcess(&$form, $type = NULL, $mode = NULL) { $form->assign('suppressSubmitButton', $form->_paymentObject->isSuppressSubmitButtons()); - $form->assign('currency', CRM_Utils_Array::value('currency', $form->_values)); + $currency = CRM_Utils_Array::value('currency', $form->_values); + // For event forms, currency is in a different spot + if (empty($currency)) { + $currency = CRM_Utils_Array::value('currency', $form->_values['event']); + } + $form->assign('currency', $currency); // also set cancel subscription url if (!empty($form->_paymentProcessor['is_recur']) && !empty($form->_values['is_recur'])) {