Open steffanhalv opened 7 years ago
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 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.
Please see this stackoverflow post.