REST API OAuth signature issue fix when using filter params
This commit is contained in:
parent
8a2a5b06c6
commit
30c1486aa7
|
@ -184,6 +184,15 @@ class WC_API_Authentication {
|
||||||
$consumer_signature = rawurldecode( $params['oauth_signature'] );
|
$consumer_signature = rawurldecode( $params['oauth_signature'] );
|
||||||
unset( $params['oauth_signature'] );
|
unset( $params['oauth_signature'] );
|
||||||
|
|
||||||
|
// remove filters and convert them from array to strings to void normalize issues
|
||||||
|
if ( isset( $params['filter'] ) ) {
|
||||||
|
$filters = $params['filter'];
|
||||||
|
unset( $params['filter'] );
|
||||||
|
foreach ( $filters as $filter => $filter_value ) {
|
||||||
|
$params['filter[' . $filter . ']'] = $filter_value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// normalize parameter key/values
|
// normalize parameter key/values
|
||||||
array_walk( $params, array( $this, 'normalize_parameters' ) );
|
array_walk( $params, array( $this, 'normalize_parameters' ) );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue