Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
remove feature flags
  • Loading branch information
escapemanuele committed Mar 10, 2026
commit 8ec32d50199373bfebcfe78e13ecd612cb5fc80b
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

Fix helpCenterFeatureFlags and helpCenterData redeclaration error in CIAB admin.
Original file line number Diff line number Diff line change
Expand Up @@ -176,18 +176,6 @@ public static function init() {
}
}

/**
* Acts as a feature flag, returning a boolean for whether we should show the next steps tutorial UI.
*
* @return boolean
*/
public static function is_next_steps_tutorial_enabled() {
return apply_filters(
'help_center_should_enable_next_steps_tutorial',
false
);
}

/**
* Enqueue Help Center assets.
*
Expand Down Expand Up @@ -270,18 +258,6 @@ function ( $wp_admin_bar ) {

// This information is only needed for the connected version of the help center.
if ( $variant !== 'wp-admin-disconnected' && $variant !== 'gutenberg-disconnected' ) {
// Adds feature flags for development.
wp_add_inline_script(
'help-center',
'const helpCenterFeatureFlags = ' . wp_json_encode(
array(
'loadNextStepsTutorial' => self::is_next_steps_tutorial_enabled(),
),
JSON_UNESCAPED_SLASHES | JSON_HEX_TAG | JSON_HEX_AMP
),
'before'
);

$user_id = get_current_user_id();
$user_data = get_userdata( $user_id );
$username = $user_data ? $user_data->user_login : null;
Expand All @@ -300,7 +276,7 @@ function ( $wp_admin_bar ) {

wp_add_inline_script(
'help-center',
'const helpCenterData = ' . wp_json_encode(
'if ( typeof helpCenterData === "undefined" ) { var helpCenterData = ' . wp_json_encode(
array(
'isProxied' => boolval( self::is_proxied() ),
'isSU' => defined( 'WPCOM_SUPPORT_SESSION' ) && WPCOM_SUPPORT_SESSION,
Expand All @@ -318,7 +294,7 @@ function ( $wp_admin_bar ) {
'locale' => self::determine_iso_639_locale(),
),
JSON_UNESCAPED_SLASHES | JSON_HEX_TAG | JSON_HEX_AMP
),
) . '; }',
'before'
);
}
Expand Down
Loading