Skip to content

Launch SFR Phase 4 by force-enabling the feature flag in the plugin #13159

Description

@techanvil

Feature Description

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


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

Acceptance criteria

  • The setupFlowRefreshPhase4 feature flag is overridden to true in the plugin.
  • The Setup Flow Refresh Phase 4 features are enabled by default and continue to work as expected.

Implementation Brief

  • In includes/Plugin.php:

    • Add/extend a plugin-level googlesitekit_is_feature_enabled filter callback to force setupFlowRefreshPhase4 to true. We can use existing force_setup_flow_refresh_feature_enabled callback.
    • Keep the callback scoped to rollout flags only (setupFlowRefreshPhase4, and setupFlowRefresh); return the incoming $feature_enabled value unchanged for all other flags.
    • Register the callback in register() only when GOOGLESITEKIT_TESTS is not defined, matching the existing production-only force-enable pattern. It's already in place if we use existing callback.
    • Keep hook ordering aligned with the SFR rollout pattern: remote-features activation at priority 5, plugin force-enable at priority 10, so the forced value wins over remote defaults but can still be overridden by Site Kit Tester (11) for QA.
    • Add/update the temporary TODO note for later cleanup when forced SFR flags are removed.
  • Follow the same minimal-change strategy used for setupFlowRefresh in Launch SFR by force-enabling the feature flag in the plugin #12966

Test Coverage

  • No tests are required.

QA Brief

  • Keep the setupFlowRefreshPhase4 feature flag disabled in the tester plugin, with "Do not override" selected for the "Force enabled feature flags" setting.

  • Setup the SK plugin.

  • Run following command in the browser console from SK dashboard. It should output list of enabled feature flags, which should also contains setupFlowRefreshPhase4.

      _googlesitekitBaseData.enabledFeatures

Changelog entry

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions