woocommerce / wc-api-node

This client is obsolete and will no longer receive updates, a new JavaScript library is available under the name of @woocommerce/woocommerce-rest-api
https://www.npmjs.com/package/woocommerce-api
MIT License
144 stars 63 forks source link

missing meta_data in the response #96

Closed paltanmoy closed 5 years ago

paltanmoy commented 5 years ago

I am not able to get the meta_data parameter in the JSON response while getting the product details. Though using python api (https://pypi.org/project/WooCommerce/) I am able to get the meta_data parameter as expected.

Any idea ?

hamedebrahimi commented 5 years ago

I'v the same problem with meta_data.. WooCommerce.putAsync(products/${item.id},{ name:"another", meta_data:[{ key:"isCustomImage", value:"true" }] })

but meta_data not appears in responded object

hamedebrahimi commented 5 years ago

Damn! I found out what's going on! meta_data is supported on v2 no v1 and npm documentation should be updated. var WooCommerce = new WooCommerceAPI({ url: 'http://example.com', consumerKey: 'ck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', consumerSecret: 'cs_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', wpAPI: true, version: 'wc/v2 }); `