Reputation: 29
I tried to get product_details of a selected list of sku's out my woocommerce webshop by setting a list of sku's in the params of the call. When I use:
lst_of_skus = ['sku_1','sku_2']
response =wcapi.get("products", params={'sku':lst_of_skus}).json()
response
I only get a list with a dict of the last sku in the list. How can I get a list of dicts of all products in lst_of_skus
Upvotes: 0
Views: 753
Reputation: 661
You can try this
skus =",".join(skus)
productlist=wcapi.get("products/?sku="+skus).json()
print(productlist)
Upvotes: 2