Skip to content

Commit e14e51a

Browse files
Merge pull request #19645 from wordpress-mobile/task/19308-override-values
Remote Feature Flags: Add the ability to override remote feature flag values
2 parents 2ce7fe9 + bdd200f commit e14e51a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

WordPress/Classes/Stores/RemoteFeatureFlagStore.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ class RemoteFeatureFlagStore {
5151
/// - Parameters:
5252
/// - flag: The `FeatureFlag` object associated with a remote feature flag
5353
public func value(for flag: OverrideableFlag) -> Bool {
54+
if let overriddenValue = FeatureFlagOverrideStore().overriddenValue(for: flag) {
55+
return overriddenValue
56+
}
5457
guard
5558
let remoteKey = flag.remoteKey, // Not all flags contain a remote key, since they may not use remote feature flagging
5659
let value = cache[remoteKey] // The value may not be in the cache if this is the first run

0 commit comments

Comments
 (0)