Skip to content

Commit

Permalink
Merge pull request #17619 from seamuslee001/dev_core_1823_alt
Browse files Browse the repository at this point in the history
dev/core#1823 Fix building the Price Field visibility options
  • Loading branch information
seamuslee001 authored Jun 15, 2020
2 parents c7550c0 + e8580f4 commit 4b60f42
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_PriceField', 'visibility_id', [
'labelColumn' => 'name',
'flip' => TRUE,
]);
}

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

0 comments on commit 4b60f42

Please sign in to comment.