Skip to content

Commit

Permalink
Merge pull request #29822 from jitendrapurohit/price_default
Browse files Browse the repository at this point in the history
Ensure price from url is set as default
  • Loading branch information
eileenmcnaughton authored Mar 28, 2024
2 parents 00d77c6 + 503e2cc commit 34bcf46
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CRM/Contribute/Form/Contribution/Main.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 34bcf46

Please sign in to comment.