| @@ -903,13 +903,16 @@ | ||
| 903 | 903 | if ( doing_action( 'jetpack_user_authorized' ) || Jetpack::is_active() ) { |
| 904 | 904 | WP_CLI::error( __( 'Jetpack sync is not currently allowed for this site. Jetpack is not connected.', 'jetpack' ) ); |
| 905 | 905 | return; |
| 906 | 906 | } |
| 907 | - if ( ( new Status() )->is_development_mode() ) { | |
| 907 | + | |
| 908 | + $status = new Status(); | |
| 909 | + | |
| 910 | + if ( $status->is_development_mode() ) { | |
| 908 | 911 | WP_CLI::error( __( 'Jetpack sync is not currently allowed for this site. The site is in development mode.', 'jetpack' ) ); |
| 909 | 912 | return; |
| 910 | 913 | } |
| 911 | - if ( Jetpack::is_staging_site() ) { | |
| 914 | + if ( $status->is_staging_site() ) { | |
| 912 | 915 | WP_CLI::error( __( 'Jetpack sync is not currently allowed for this site. The site is in staging mode.', 'jetpack' ) ); |
| 913 | 916 | return; |
| 914 | 917 | } |
| 915 | 918 | } |