}
}
- //set default membership for membershipship block
- if ($this->_membershipBlock) {
- $this->_defaults['selectMembership'] = $defaultMemType = $this->_defaultMemTypeId ? $this->_defaultMemTypeId : CRM_Utils_Array::value('membership_type_default', $this->_membershipBlock);
- }
-
// // hack to simplify credit card entry for testing
// $this->_defaults['credit_card_type'] = 'Visa';
// $this->_defaults['amount'] = 168;
CRM_Core_BAO_Address::fixAllStateSelects($this, $this->_defaults);
if ($this->_priceSetId) {
- if ($this->_useForMember && !empty($this->_currentMemberships)) {
+ if (($this->_useForMember && !empty($this->_currentMemberships)) || $this->_defaultMemTypeId) {
$selectedCurrentMemTypes = array();
foreach ($this->_priceSet['fields'] as $key => $val) {
foreach ($val['options'] as $keys => $values) {