Skip to content

Commit

Permalink
Move check inside publicize active check
Browse files Browse the repository at this point in the history
  • Loading branch information
gmjuhasz committed Jul 17, 2024
1 parent a625f41 commit c5623fc
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,10 @@ public function get_initial_state() {

$settings['is_publicize_enabled'] = true;
$settings['hasPaidFeatures'] = $publicize->has_paid_features();

foreach ( self::FEATURE_FLAGS as $feature_flag ) {
$settings['featureFlags'][ $feature_flag['variable_name'] ] = $publicize->use_feature_flag( $feature_flag['flag_name'], $feature_flag['plan_name'] );
}
} else {
$settings['connectionData'] = array(
'connections' => array(),
Expand All @@ -223,10 +227,6 @@ public function get_initial_state() {

$settings['connectionRefreshPath'] = ! empty( $settings['useAdminUiV1'] ) ? 'jetpack/v4/publicize/connections?test_connections=1' : '/jetpack/v4/publicize/connection-test-results';

foreach ( self::FEATURE_FLAGS as $feature_flag ) {
$settings['featureFlags'][ $feature_flag['variable_name'] ] = $publicize->use_feature_flag( $feature_flag['flag_name'], $feature_flag['plan_name'] );
}

return $settings;
}

Expand Down

0 comments on commit c5623fc

Please sign in to comment.