Zoho Deluge and Wordpress/WooCommerce API: Get All Products
- Joel Lipman
- Zoho
- Hits: 59
A quick article on retrieving all the products from a WooCommerce instance on a client's Wordpress website.
Why?
A client of ours wants the information entered against products in their WooCommerce to display on their estimates in Zoho Books; such as product image, product name, product description.
Granted that in some cases, the design should go in the other direction, as in enter the products in Zoho Inventory and this feeds the website. More than often, however, this request comes in when the customer has already been setting their Zoho environment up and the Wordpress site has the more information.
How?
So first, this article shows you how to setup an API connection, and then we'll include the code to count the total number of products, and then finallly show the code to loop through all the pages to retrieve every product from the WooCommerce system.