From 7a8fb1483a7b3dd1cd938643f01ccbcd0fdc3c27 Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Sun, 22 Jan 2017 09:39:04 +1100 Subject: [PATCH] CRM-19871 CRM-19898 Fix issue where changing weight of a membership type changes the default membership type for contribution pages --- CRM/Price/BAO/PriceField.php | 1 + 1 file changed, 1 insertion(+) diff --git a/CRM/Price/BAO/PriceField.php b/CRM/Price/BAO/PriceField.php index 5b56b2eeaabb..87c215b58648 100644 --- a/CRM/Price/BAO/PriceField.php +++ b/CRM/Price/BAO/PriceField.php @@ -143,6 +143,7 @@ public static function create(&$params) { if ($options['membership_type_id']) { $options['membership_num_terms'] = CRM_Utils_Array::value($index, CRM_Utils_Array::value('membership_num_terms', $params), 1); + $options['is_default'] = CRM_Utils_Array::value($params['membership_type_id'][$index], $defaultArray) ? $defaultArray[$params['membership_type_id'][$index]] : 0, } if (CRM_Utils_Array::value($index, CRM_Utils_Array::value('option_financial_type_id', $params))) {