$params['option_group_id'], 'name', 'id'
);
+ $op = $id ? 'edit' : 'create';
+ CRM_Utils_Hook::pre($op, 'OptionValue', $id, $params);
+
// action is taken depending upon the mode
$optionValue = new CRM_Core_DAO_OptionValue();
$optionValue->copyValues($params);
$optionValue->save();
CRM_Core_PseudoConstant::flush();
+ CRM_Utils_Hook::post($op, 'OptionValue', $id, $optionValue);
+
// Create relationship for payment instrument options
if (!empty($params['financial_account_id'])) {
$optionName = civicrm_api3('OptionGroup', 'getvalue', [