raphiiwarren
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] Getting different anwers on REST API callThank you guys for the answers.
First of all, I had a really stupid mistake there, as I used “per-page” instead of “per_page”. Now I can get all products at the same time. So thank you for the heads up @rokmeglic and @ckadenge .
The warning message you’re seeing is likely unrelated to the REST API issue. It suggests that there’s a line of code in your theme’s functions.php file attempting to access a property on a null object. You might want to inspect line 410 of your functions.php file to see if you can identify the problem. If you’re not comfortable doing this, I would recommend reaching out to a developer or the theme’s author for assistance.
That’s good to know, but I can’t change anything on the shop code, as I am only a third party. The shop is administered by another person.
This could be due to changes in the product list between API calls. To avoid this, you could try fetching all products in a single API call by increasing the ‘per_page’ parameter.
That is a good idea, but unlikely in my case, as all other products are already set and only the ones in my category are getting changed frequently. As it turns out that there were products added manually into the category and these were the cause of the “wrong” answers, since I deleted them all and uploaded them via API the problem is not occuring anymore.
So thanks again, it all worked out and if someone has the problem in the future maybe this thread can help.