Fix test get request

During test Remote GET Request,
in the error checking area used $post_response instead of using $get_response.
This commit is contained in:
Prince Ahmed 2019-01-24 21:59:09 +06:00 committed by GitHub
parent 00a93ae8f0
commit 78e4ef5f38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -602,7 +602,7 @@ class WC_REST_System_Status_V2_Controller extends WC_REST_Controller {
// Test GET requests.
$get_response = wp_safe_remote_get( 'https://woocommerce.com/wc-api/product-key-api?request=ping&network=' . ( is_multisite() ? '1' : '0' ) );
$get_response_successful = false;
if ( ! is_wp_error( $post_response ) && $post_response['response']['code'] >= 200 && $post_response['response']['code'] < 300 ) {
if ( ! is_wp_error( $get_response ) && $get_response['response']['code'] >= 200 && $get_response['response']['code'] < 300 ) {
$get_response_successful = true;
}