Our API to Posts plugin allows you to sync products from an API to WooCommerce products on your WordPress website. With the plugin, you can call virtually any REST API and import the data within that API and then create WooCommerce simple products from this API data.
How it worksÂ
The API to Posts plugin gets installed alongside our free WPGetAPI plugin. You set up your API within the free version and then set the endpoint to be imported. The endpoint will then appear within the API to Posts plugin where it can be configured to create the WooCommerce products from the API data. Compatible with WooCommerce Simple products only.
Create WooCommerce products from API
To create the actual WooCommerce products, there are a few simple steps to follow:
- configure how the API data will be imported
- select ‘Products’ as the post type
- run the ‘API Importer’
- map the API data to the WooCommerce product fields
- run the ‘Post Creator’
That’s it, you will now have WooCommerce products created from API data. You can map API data to custom fields and all standard WooCommerce fields, meaning it is a breeze to set the price, SKU, categories, tags, featured image, gallery images, dimensions, weight and more.
Sync API to WooCommerce products
We’ve manually ran the ‘Post Creator’ which creates the products initially. Within the settings there is an option to run the syncing process in the background at your chosen interval, which keeps your WooCommerce products in sync with the API.
Simply set the interval such as 5 Minutes up to Once Weekly and the whole import and product creation process will run at that interval in the background, keeping your products perfectly synced. This is perfect for keeping stock levels and pricing up to date.
Going further
Check out the full tutorial with a step-by-step guide here. This article runs through the exact process of creating WooCommerce products from an API.