Skip to content

Launch SFR by force-enabling the feature flag in the plugin #12966

Description

@techanvil

Feature Description

In order to launch Setup Flow Refresh, we need to override the setupFlowRefresh feature flag status to true in the plugin. We can use the googlesitekit_is_feature_enabled filter to achieve this.

We're unable to progressively roll out the feature because we can't enable the flag via the service for new users who haven't yet signed in.


Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

  • The setupFlowRefresh feature flag is overridden to true in the plugin.
  • The Setup Flow Refresh feature is enabled by default and continues to work as expected.

Implementation Brief

  • In includes/Plugin.php:
    • Add a plugin-level googlesitekit_is_feature_enabled filter callback that forces setupFlowRefresh to true.
    • Keep the callback scoped to setupFlowRefresh only; return the incoming $feature_enabled value unchanged for every other feature.
    • Register the callback with higher priority than the remote-features activation callback so the forced value is authoritative.
    • Keep the override active for all users (including signed-out/new users) so SFR is enabled by default without remote-feature dependency.

Test Coverage

  • Add/extend PHPUnit coverage in tests/phpunit/integration/PluginTest.php with respect to the above changes.
    • Assert apply_filters( 'googlesitekit_is_feature_enabled', false, 'setupFlowRefresh' ) returns true after plugin registration.
    • Assert non-target flags still follow normal behavior.
  • Fix any failing tests.

QA Brief

Changelog entry

Metadata

Metadata

Assignees

No one assigned

    Labels

    P0High priorityTeam MIssues for Squad 2Type: EnhancementImprovement of an existing feature

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions