$this->_params['is_recur'] = $this->_values['is_recur'] = 1;
// check if price set is not quick config
if (CRM_Utils_Array::value('priceSetId', $this->_params) && !$isQuickConfig) {
- list($this->_params['frequency_interval'], $this->_params['frequency_unit']) = CRM_Price_BAO_PriceSet::getRecurDetails($this->_params['priceSetId']);
+ // Extract the ids for all of the line items that have been
+ // chosen.
+ $priceFieldValueIds = array_keys($this->_lineItem[$this->_params['priceSetId']]);
+ watchdog('foobar', json_encode($priceFieldValueIds));
+
+ list($this->_params['frequency_interval'], $this->_params['frequency_unit']) =
+ CRM_Price_BAO_PriceSet::getRecurDetails($this->_params['priceSetId'], $priceFieldValueIds);
}
else {
// FIXME: set interval and unit based on selected membership type