Conditional operator OR not working with custom fields

The problem is that you used OR, specifically the human verbal colloquial understanding, not the logical definition. What you actually meant was AND.

Here’s a table demonstrating what happens to A and B for each comparison:

A B AND OR XOR ===
false false
true true
false true
true false
  • OR means if any of the values are true, e.g. if one is false and the other is true
  • XOR means if one of the values is true ( but not both at the same time )
  • AND means if all/both of the values are true, and none are false
  • ==means if both of the values are equivalent e.g. true and "true" are equivalent
  • ===/EQUAL means if both of the values are exactly the same