I am trying to find a way to automatically import products into Woocommerce. I was wondering if someone had any experience with this, whether using a CSV or directly writing to the database.
To import variable products, go to WP All Import › New Import, upload or choose your import file, and then select WooCommerce Products from the dropdown list. Use the drag and drop interface to configure your import template and import the variable WooCommerce products.
You can easily import CSV files into WooCommerce using the CSV Import Extension: http://www.woothemes.com/extension/product-csv-import-suite/
Or you can use the more flexible WP All In One Import: http://www.wpallimport.com/woocommerce-product-import/
There is also a free solution via this plugin: https://wordpress.org/plugins/product-import-export-for-woo/
Woocommerce Products are regular WordPress posts, with a custom post type of product
. This means that each product is stored in the wp_posts
table (or replace wp
with your table prefix). There are many post_type values here. The ones for WordPress have a post_type="product"
All additional product info is stored in the table wp_postmeta
and connected by the post_id
column to the wp_posts
table. There are many meta key/values used, but the most common ones for WooCommerce are fairly intuitive, such as: _visibiilty, _price, _sku, _stock, _length, _width, _height, etc...
I suggest you manually input several products into the WP Admin and then study the data in the tables to make sure you have all the data you need... then you can write your own custom import suite.
Doing it yourself probably will not work as well as some of the pre-made solutions which provide you with good error checking of the input data, and additional fields and preprocessing functions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With