From b0cb64b93d158bd000d1470ae2a70341725b8fb4 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Thu, 7 Sep 2017 15:32:29 +0100 Subject: [PATCH] API - use current scheme This caused issues for me locally forcing http to test requests. Ok to change @claudiosanches ? --- includes/api/class-wc-rest-authentication.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/api/class-wc-rest-authentication.php b/includes/api/class-wc-rest-authentication.php index 0fbcbc5bf5e..5ad9a53ca4a 100644 --- a/includes/api/class-wc-rest-authentication.php +++ b/includes/api/class-wc-rest-authentication.php @@ -354,7 +354,7 @@ class WC_REST_Authentication { if ( substr( $request_path, 0, strlen( $wp_base ) ) === $wp_base ) { $request_path = substr( $request_path, strlen( $wp_base ) ); } - $base_request_uri = rawurlencode( get_home_url( null, $request_path ) ); + $base_request_uri = rawurlencode( get_home_url( null, $request_path, is_ssl() ? 'https' : 'http' ) ); // Get the signature provided by the consumer and remove it from the parameters prior to checking the signature. $consumer_signature = rawurldecode( str_replace( ' ', '+', $params['oauth_signature'] ) );