diff --git a/CRM/Price/BAO/PriceFieldValue.php b/CRM/Price/BAO/PriceFieldValue.php index ae00626f9f03..dd614637cd20 100644 --- a/CRM/Price/BAO/PriceFieldValue.php +++ b/CRM/Price/BAO/PriceFieldValue.php @@ -223,6 +223,7 @@ public static function deleteValues($fieldId) { * @return bool */ public static function del($id) { + CRM_Core_Error::deprecatedFunctionWarning('deleteRecord'); return (bool) self::deleteRecord(['id' => $id]); } diff --git a/CRM/Price/Form/Option.php b/CRM/Price/Form/Option.php index 5aa3b3687b14..a007681e3aa5 100644 --- a/CRM/Price/Form/Option.php +++ b/CRM/Price/Form/Option.php @@ -320,14 +320,12 @@ public function postProcess() { 'label', 'id' ); - if (CRM_Price_BAO_PriceFieldValue::del($this->_oid)) { - CRM_Core_Session::setStatus(ts('%1 option has been deleted.', [1 => $label]), ts('Record Deleted'), 'success'); - } + CRM_Price_BAO_PriceFieldValue::deleteRecord(['id' => $this->_oid]); + CRM_Core_Session::setStatus(ts('%1 option has been deleted.', [1 => $label]), ts('Record Deleted'), 'success'); return NULL; } else { $params = $this->controller->exportValues('Option'); - $fieldLabel = CRM_Core_DAO::getFieldValue('CRM_Price_DAO_PriceField', $this->_fid, 'label'); foreach ($this->_moneyFields as $field) { $params[$field] = CRM_Utils_Rule::cleanMoney(trim($params[$field]));