How Do I Import Custom Fields to WooCommerce Products?
To import custom fields to WooCommerce products, you must first create a product import. For instructions on how to do this, see How to Import WooCommerce Products from CSV and XML.
If your product setup includes custom fields, those fields will fall into one of two categories:
- Custom fields that our plugin recognizes and treats like standard WooCommerce fields, meaning that the interface has already been designed to present and populate them.
- Custom fields that our plugin hasn't incorporated into its interface, in which case you'll need to follow the steps in this cheat sheet.
Steps to Import Custom Fields to WooCommerce Products
- Create a new WooCommerce product import.
- In the Drag & Drop screen, map your import data elements to the fields displayed in the various sections other than the Custom Fields section. These are fields that our plugin fully recognizes and supports, regardless of whether they are custom fields.
- Expand the Custom Fields section and click the See Detected Fields button. These are custom fields that our plugin can detect and populate, but they haven't been incorporated into the import interface.
- Map the relevant import data elements to their corresponding custom fields, if applicable.
- Complete your import.
Understanding the Custom Fields Section
When you first expand the Custom Fields section, you'll see this screen:
Click the See Detected Fields button.
The three fields inside the red box in the preceding image are custom fields. In order for WP All Import to detect these fields, they must exist at least once in a published post on your site, i.e., the status of that post must be Published.
For each custom field that is detected, WP All Import also detects its existing values, which it presents in edit/selection boxes in the Value column shown above (if you click one of the boxes, and the corresponding custom field has multiple values stored in its published posts, you will see a list of those values).
These edit boxes will accept any of the following:
- a typed literal value;
- a value from the selection list, if applicable;
- a field mapping from one of the import data elements;
Import WooCommerce Products from CSV, XML, Excel
- Product variations & attributes
- Price & stock
- Images & galleries
- Scheduled imports
Visual Steps to Import Custom Fields to WooCommerce Products
Import Custom Fields to WooCommerce Products — Frequently Asked Questions
How Do I Get WP All Import to Detect Custom Fields That Don't Yet Have Any Data in Them?
Just create a dummy post, enter values in the fields you want to import, and then publish it. Our plugin will then detect those custom fields and their values.
What If the Import Data Contains Different Values Than the Ones I Want to Store in My Custom Fields?
In this scenario, you'll need to map the incoming values to the desired values. Our plugin is already set up to let you do this through the interface. For more information, see How to Map Custom Fields.
What If a Single Import Data Element Contains Multiple Data Points?
No problem. These multi-value data elements are often referred to as serialized fields. Fortunately, WP All Import has a built-in feature that lets you break serialized fields into a set of key/value pairs during the import process.
Import Custom Fields to WooCommerce Products — Related Docs
Explains how to import WooCommerce products.
Teaches the basics of custom fields.
Shows how to translate incoming values to the values you want to store in your custom fields.
Describes how to handle situations where multiple values are stored in a single custom field.