From 503e2cc89571fad3869eec09b39e217b95092ba7 Mon Sep 17 00:00:00 2001 From: Jitendra Purohit Date: Tue, 26 Mar 2024 09:33:01 +0530 Subject: [PATCH] ensure price from url is set as default --- CRM/Contribute/Form/Contribution/Main.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Contribute/Form/Contribution/Main.php b/CRM/Contribute/Form/Contribution/Main.php index 87e3694541a5..5a2a6c727ce6 100644 --- a/CRM/Contribute/Form/Contribution/Main.php +++ b/CRM/Contribute/Form/Contribution/Main.php @@ -250,7 +250,7 @@ public function setDefaultValues() { $opMemTypeId = $priceFieldOption['membership_type_id'] ?? NULL; $priceFieldName = 'price_' . $priceFieldOption['price_field_id']; $priceFieldValue = CRM_Price_BAO_PriceSet::getPriceFieldValueFromURL($this, $priceFieldName); - if (!empty($priceFieldValue) && !$existingMembershipTypeID) { + if (!empty($priceFieldValue)) { CRM_Price_BAO_PriceSet::setDefaultPriceSetField($priceFieldName, $priceFieldValue, $val['html_type'], $this->_defaults); // break here to prevent overwriting of default due to 'is_default' // option configuration or setting of current membership or