WooCommerce Api bulk update
-
I have a job that runs during night for our WooCommerce site which updates all product variation stock quantities with data from our ERP.
We have two problems with this process that i’m hoping to resolve.
1. Get the “SKU” of each product variation
/wp-json/wc/v2/products
When i request all site products from the API the result only contains the variation ID. Thus we have to make a new request for each product variations to get the “SKU”.
How can we include the variation “SKU” directly when requesting all products?2.Batch update all product variations in a single API request
/wp-json/wc/v2/products/<product_id>/variations/batch
The current job has to make around 300 calls to update all variations. Each call is a batch update of all variations in a single product.
I want to update multiple products and their variants in a single call. Can this be done using the standard API?
- The topic ‘WooCommerce Api bulk update’ is closed to new replies.