Skip to content

Commit f099d5d

Browse files
committed
try to force the boost page not load the getting started route
1 parent e58469e commit f099d5d

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php return array('dependencies' => array('lodash', 'react', 'wp-api-fetch', 'wp-data', 'wp-dom-ready', 'wp-element', 'wp-i18n'), 'version' => '396767b273542e5a63e3');
1+
<?php return array('dependencies' => array('lodash', 'react', 'wp-api-fetch', 'wp-data', 'wp-dom-ready', 'wp-element', 'wp-i18n'), 'version' => '8e1e2ff366b61bd4fa5f');

build/performance/performance.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

includes/JetpackBoost/JetpackBoost.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,10 @@ public function __construct( Container $container ) {
4343
*/
4444
public function add_to_runtime( $sdk ) {
4545
$is_jetpack_boost_enabled = is_plugin_active( 'jetpack-boost/jetpack-boost.php' );
46-
$jetpack_options = get_option( 'jetpack_options', false );
47-
$is_jetpack_boost_connected = is_array( $jetpack_options ) && isset( $jetpack_options['id'] ) ? true : false;
46+
47+
if ( isset( $_GET['page'] ) && 'nfd-performance' === $_GET['page'] ) {
48+
delete_option('jb_get_started');
49+
}
4850

4951
$values = array(
5052
'is_active' => $is_jetpack_boost_enabled,
@@ -56,7 +58,6 @@ public function add_to_runtime( $sdk ) {
5658
'minify_css' => $is_jetpack_boost_enabled ? get_option( 'jetpack_boost_status_minify-css', false ) : false,
5759
'minify_css_excludes' => implode( ',', get_option( 'jetpack_boost_ds_minify_css_excludes', array( 'admin-bar', 'dashicons', 'elementor-app' ) ) ),
5860
'install_token' => PluginInstaller::rest_get_plugin_install_hash(),
59-
'jetpack_boost_connected' => $is_jetpack_boost_connected,
6061
);
6162

6263
return array_merge( $sdk, array( 'jetpackboost' => $values ) );

src/sections/JetpackBoost/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,15 @@ const JetpackBoost = () => {
137137
} );
138138

139139
if ( ! response?.connected ) {
140+
console.log( 'Not connected, connecting...' );
140141
await apiFetch( {
141142
url: NewfoldRuntime.createApiUrl(
142143
'/jetpack-boost/v1/connection'
143144
),
144145
method: 'POST',
145146
} );
146147
}
148+
147149
let iframe;
148150
try {
149151
await new Promise( ( resolve ) => setTimeout( resolve, 1000 ) );

0 commit comments

Comments
 (0)