|
19 | 19 | use Automattic\Jetpack\My_Jetpack\Initializer as My_Jetpack_Initializer;
|
20 | 20 | use Automattic\Jetpack\My_Jetpack\Products as My_Jetpack_Products;
|
21 | 21 | use Automattic\Jetpack\Plugins_Installer;
|
| 22 | +use Automattic\Jetpack\Protect\Onboarding; |
22 | 23 | use Automattic\Jetpack\Protect\Plan;
|
23 | 24 | use Automattic\Jetpack\Protect\REST_Controller;
|
24 | 25 | use Automattic\Jetpack\Protect\Site_Health;
|
@@ -206,18 +207,19 @@ public function initial_state() {
|
206 | 207 | // phpcs:disable WordPress.Security.NonceVerification.Recommended
|
207 | 208 | $refresh_status_from_wpcom = isset( $_GET['checkPlan'] );
|
208 | 209 | $initial_state = array(
|
209 |
| - 'apiRoot' => esc_url_raw( rest_url() ), |
210 |
| - 'apiNonce' => wp_create_nonce( 'wp_rest' ), |
211 |
| - 'registrationNonce' => wp_create_nonce( 'jetpack-registration-nonce' ), |
212 |
| - 'status' => Status::get_status( $refresh_status_from_wpcom ), |
213 |
| - 'installedPlugins' => Plugins_Installer::get_plugins(), |
214 |
| - 'installedThemes' => Sync_Functions::get_themes(), |
215 |
| - 'wpVersion' => $wp_version, |
216 |
| - 'adminUrl' => 'admin.php?page=jetpack-protect', |
217 |
| - 'siteSuffix' => ( new Jetpack_Status() )->get_site_suffix(), |
218 |
| - 'jetpackScan' => My_Jetpack_Products::get_product( 'scan' ), |
219 |
| - 'hasRequiredPlan' => Plan::has_required_plan(), |
220 |
| - 'waf' => array( |
| 210 | + 'apiRoot' => esc_url_raw( rest_url() ), |
| 211 | + 'apiNonce' => wp_create_nonce( 'wp_rest' ), |
| 212 | + 'registrationNonce' => wp_create_nonce( 'jetpack-registration-nonce' ), |
| 213 | + 'status' => Status::get_status( $refresh_status_from_wpcom ), |
| 214 | + 'installedPlugins' => Plugins_Installer::get_plugins(), |
| 215 | + 'installedThemes' => Sync_Functions::get_themes(), |
| 216 | + 'wpVersion' => $wp_version, |
| 217 | + 'adminUrl' => 'admin.php?page=jetpack-protect', |
| 218 | + 'siteSuffix' => ( new Jetpack_Status() )->get_site_suffix(), |
| 219 | + 'jetpackScan' => My_Jetpack_Products::get_product( 'scan' ), |
| 220 | + 'hasRequiredPlan' => Plan::has_required_plan(), |
| 221 | + 'onboardingProgress' => Onboarding::get_current_user_progress(), |
| 222 | + 'waf' => array( |
221 | 223 | 'wafSupported' => Waf_Runner::is_supported_environment(),
|
222 | 224 | 'currentIp' => IP_Utils::get_ip(),
|
223 | 225 | 'isSeen' => self::get_waf_seen_status(),
|
|
0 commit comments