I have to create a service in order to publish products to a wordpress via woocommerce REST API.
We are creating products in site by using the batch update "function".
All nice and fine, but I cannot search if a product already exist in order to not multiply (or get error on insert) by anything else except the id.
Is there a way to search for a product by sku?
tks
Question posted in Woocommerce
The official Woocommerce documentation can be found here.
The official Woocommerce documentation can be found here.
2
Answers
You can by using the GET method.
'products' with param sku
very important to use "GET", if you use POST you add one empty product in word press.
its old question, but for future viewers here is solution
create your product
update product
$product is the information base on which you will create or update.am getting it from an api