oauth-signature-js icon indicating copy to clipboard operation
oauth-signature-js copied to clipboard

Using with woocommerce

Open steffanhalv opened this issue 8 years ago • 2 comments

Please see this stackoverflow post.

steffanhalv avatar Dec 22 '16 19:12 steffanhalv

hi, I have some problem. https://woocommerce.github.io/woocommerce-rest-api-docs/?shell#list-all-products in woocommerce, there are parameter filter. that executed like this for example: filter[orderby]=meta_value_num

how can I input that parameter? var parameter = { filter[orderby]: 'meta_value_num', order: 'asc', oauth_consumer_key: 'ck_key', oauth_signature_method: 'HMAC-SHA1', oauth_timestamp: timestamp, oauth_nonce: nonce, oauth_version : '1.0' }; that can't be possible right? So how to do that? Thanks

DeLonge avatar Feb 13 '17 08:02 DeLonge

@DeLonge This is not a valid syntax:

{
  filter[orderby]: 'meta_value_num',
}

I cannot help you with specific examples for woocommerce.

You need to consider that the parameter object needs to be serialisable to a query string (?foo=bar&baz=qux), so you will need to understand what kind of encoding you need to get woocommerce to handle complex object encoding.

bettiolo avatar Feb 13 '17 11:02 bettiolo