Skip to content

Commit

Permalink
dev/core#1823 Fix building the Price Field visibility options
Browse files Browse the repository at this point in the history
  • Loading branch information
seamuslee001 committed Jun 15, 2020
1 parent c7550c0 commit 519c496
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions CRM/Price/BAO/PriceField.php
Original file line number Diff line number Diff line change
Expand Up @@ -865,14 +865,10 @@ public static function getTaxLabel($opt, $valueFieldName, $displayOpt, $taxTerm)
public static function getVisibilityOptionID($visibilityName) {

if (!isset(self::$visibilityOptionsKeys)) {
self::$visibilityOptionsKeys = CRM_Price_BAO_PriceField::buildOptions(
'visibility_id',
NULL,
[
'labelColumn' => 'name',
'flip' => TRUE,
]
);
self::$visibilityOptionsKeys = CRM_Core_PseudoConstant::get('CRM_Price_BAO_PriceFieldValue', 'visibility_id', [
'labelColumn' => 'name',
'flip' => TRUE,
]);
}

if (isset(self::$visibilityOptionsKeys[$visibilityName])) {
Expand Down

0 comments on commit 519c496

Please sign in to comment.