diff --git a/library/Admin/Private/PrivateAcfFields.php b/library/Admin/Private/PrivateAcfFields.php index fc0fc0c3c..6b665477e 100644 --- a/library/Admin/Private/PrivateAcfFields.php +++ b/library/Admin/Private/PrivateAcfFields.php @@ -50,14 +50,19 @@ public function conditionallyShowBasedOnStatus($field) $field['conditional_logic'] = []; } - $field['conditional_logic'][] = - [ - [ - 'field' => $this->hiddenInputKey, - 'operator' => '==', - 'value' => 'private' - ] - ]; + $conditional = [ + 'field' => $this->hiddenInputKey, + 'operator' => '==', + 'value' => 'private' + ]; + + if (!empty($field['conditional_logic'])) { + foreach ($field['conditional_logic'] as &$logicGroup) { + $logicGroup[] = $conditional; + } + } else { + $field['conditional_logic'][] = [$conditional]; + } return $field; }