Hello, I need to import data from 2 separate .xml files into the Woo Commerce website. There is a unique product identifier in both of the files that correspond to each other, so, you can find corresponding files.
Doc 1: The file contains info with: Description, pictures, features
Possible Plan: To use a command-line script to utilise the Woocommerce REST API to handle the creation of the products. For images, you'll need to use the standard Wordpress REST API, which isn't the best documented.
Using this route, you'll need to definitely write a script to parse your XML and then hand the data off to the REST API to perform the creation of the products in the store.
I'd recommend the following method of creating your products:
Do an initial first pass of your data to create your global attributes, taxonomies, categories, etc. You'll want to do this first, as a lot of the product data you'll need to send in your CRUD calls uses the ID of the post,taxonomy, etc.
Create products. You'll use the data set up in step 1 to do the assignment of your variations and categories. If you're dealing with variable products and product variations, make sure to create the parent first and assign the variation meta data.
Perform the image upload portion. You'll be able to create the media library entries with the WP REST API and then update the product posts with the WC REST API.
To set a start, stop, and offset point. For example, only run 200 product nodes starting with the 101st product node. This works nicely as you can then open up multiple prompts to do some poor-man's multi-threading.
Tell me what you think of this job description. Give me a quote for the project to be done. My price is approximate.