| @@ -45,9 +45,9 @@ | ||
| 45 | 45 | |
| 46 | 46 | // If Jetpack is currently connected, and is not in Safe Mode already, kick off a sync of the current |
| 47 | 47 | // functions/callables so that we can test if this site is in IDC. |
| 48 | 48 | if ( Jetpack::is_connection_ready() && ! Identity_Crisis::validate_sync_error_idc_option() && Actions::sync_allowed() ) { |
| 49 | - Actions::do_full_sync( array( 'functions' => true ) ); | |
| 49 | + Actions::do_full_sync( array( 'functions' => true ), 'provision' ); | |
| 50 | 50 | Actions::$sender->do_full_sync(); |
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | if ( Identity_Crisis::validate_sync_error_idc_option() ) { |
| @@ -52,9 +52,9 @@ | ||
| 52 | 52 | |
| 53 | 53 | if ( Identity_Crisis::validate_sync_error_idc_option() ) { |
| 54 | 54 | return new WP_Error( |
| 55 | 55 | 'site_in_safe_mode', |
| 56 | - __( 'Can not provision a plan while in safe mode. See: https://jetpack.com/support/safe-mode/', 'jetpack' ) | |
| 56 | + __( 'Cannot provision a plan while in safe mode. See: https://jetpack.com/support/safe-mode/', 'jetpack' ) | |
| 57 | 57 | ); |
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | if ( ! Jetpack::connection()->is_connected() || ( isset( $named_args['force_register'] ) && (int) $named_args['force_register'] ) ) { |
| @@ -169,9 +169,9 @@ | ||
| 169 | 169 | 'Host' => 'public-api.wordpress.com', |
| 170 | 170 | ), |
| 171 | 171 | 'timeout' => 60, |
| 172 | 172 | 'method' => 'POST', |
| 173 | - 'body' => wp_json_encode( $request_body ), | |
| 173 | + 'body' => wp_json_encode( $request_body, JSON_UNESCAPED_SLASHES ), | |
| 174 | 174 | ); |
| 175 | 175 | |
| 176 | 176 | $blog_id = Jetpack_Options::get_option( 'id' ); |
| 177 | 177 | $url = esc_url_raw( |
| @@ -190,8 +190,9 @@ | ||
| 190 | 190 | if ( ! empty( $calypso_env ) ) { |
| 191 | 191 | $url = add_query_arg( array( 'calypso_env' => $calypso_env ), $url ); |
| 192 | 192 | } |
| 193 | 193 | |
| 194 | + // @phan-suppress-next-line PhanAccessMethodInternal -- Phan is correct, but the usage is intentional. | |
| 194 | 195 | $result = Client::_wp_remote_request( $url, $request ); |
| 195 | 196 | |
| 196 | 197 | if ( is_wp_error( $result ) ) { |
| 197 | 198 | return $result; |
| @@ -271,9 +272,10 @@ | ||
| 271 | 272 | 'method' => 'POST', |
| 272 | 273 | 'body' => '', |
| 273 | 274 | ); |
| 274 | 275 | |
| 275 | - $url = sprintf( '%s/rest/v1.3/jpphp/partner-keys/verify', self::get_api_host() ); | |
| 276 | + $url = sprintf( '%s/rest/v1.3/jpphp/partner-keys/verify', self::get_api_host() ); | |
| 277 | + // @phan-suppress-next-line PhanAccessMethodInternal -- Phan is correct, but the usage is intentional. | |
| 276 | 278 | $result = Client::_wp_remote_request( $url, $request ); |
| 277 | 279 | |
| 278 | 280 | if ( is_wp_error( $result ) ) { |
| 279 | 281 | return $result; |