3
votes

I am trying to add a WooCommerce product from one Wordpress site to another using WooCommerce Rest API with NodeJS module.

https://www.npmjs.com/package/woocommerce-api

It takes more than 2 minutes to add only 10 products

I need a solution for this I think it should take just 1,2 second at most to add 50 product

WC.put('products/batch', data, function(err, data, res) { console.log(res); });

and i tried to call the api from postman and take long time too

Any help will be appreciate

1
What have you done to debug so far? - Charlie Fish
@CharlieFish thanks for your reply, i used the woocommerce-api nodejs module and try to add products in products/batch but it takes more than 2 minutes to save 10 products and used the woocommerce api in postman and it's take long time to save products too - Abdelrhman Elgreatly
That's not really debugging. That is describing your problem. - Charlie Fish
i checked the WooCommerce api code in Woocommerce wordpress plugin and i found they connect to the database to save each product in foreach - Abdelrhman Elgreatly

1 Answers

0
votes

i tried to add it directly on the database and it works very quickly i think the problem is in the woocommerce Rest API because it add it internally to the database one by one not as a batch

for me it seems that there is a performance issue in the woocommerce Rest API