Merge pull request #4301 from kloon/fix_rest_api_oauth_subfolder_install
Fix issue where oAuth signature is wrong when running site from a subfolder
This commit is contained in:
commit
64c68b8c38
|
@ -178,7 +178,7 @@ class WC_API_Authentication {
|
|||
|
||||
$http_method = strtoupper( WC()->api->server->method );
|
||||
|
||||
$base_request_uri = rawurlencode( get_home_url( null, parse_url( $_SERVER['REQUEST_URI'], PHP_URL_PATH ), 'http' ) );
|
||||
$base_request_uri = rawurlencode( untrailingslashit( get_woocommerce_api_url( '' ) ) . WC()->api->server->path );
|
||||
|
||||
// get the signature provided by the consumer and remove it from the parameters prior to checking the signature
|
||||
$consumer_signature = rawurldecode( $params['oauth_signature'] );
|
||||
|
|
Loading…
Reference in New Issue