REST API OAuth signature issue fix when using filter params
This commit is contained in:
parent
a1f12b0382
commit
5c22b36cb7
|
@ -184,6 +184,15 @@ class WC_API_Authentication {
|
|||
$consumer_signature = rawurldecode( $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
|
||||
array_walk( $params, array( $this, 'normalize_parameters' ) );
|
||||
|
||||
|
|
Loading…
Reference in New Issue