Importing and Exporting product reviews as shown in the documentation below requires the Import export Suite for WooCommerce extension. Importing and exporting product reviews and star ratings is not a feature of the free Core WooCommerce Plugin.
Mapping of WooCommerce Product Reviews
↑ Back to topThe plugin maps each field of a CSV/XML file to the field of a particular product review that otherwise is done manually by the Admin.
For example, the Comment id field gets mapped to the comment_ID of the CSV file and the Comment Author Name field gets mapped to the comment_author of your product review. If you want the plugin to work correctly, you must map headers of all of the columns correctly and you must ensure that all of the fields you enter must be in the correct format.
Note: If there is any mistake in your import file, your product review import may not work as expected.
You must enter the product review details in CSV file in the structured format as given below:
- The first row must contain the column headers which are used for mapping the fields. The details about WooCommerce mapping field is given as below:
Column Heading | Explanation | Accepted value or format |
---|---|---|
comment_ID | Identification Number of the review | Numerical |
product_SKU | Stock Keeping Unit of Product | Alphanumeric. Eg: AD35 |
comment_post_ID | Identification number of the Product | Numerical |
comment_author | Name of the review’s author | Text. Eg:John |
comment_author_email | Email ID of review’s author | Text e.g. test1@gmail.com |
comment_author_url | Website URL of the user | URL. Eg: https://www.example.com/ |
comment_author_IP | IP of the review’s author | Numerical. Eg: 201.73.89.201 |
comment_date | Date on which the comment is posted | MM/DD/YYYY H:i:se.g 9/6/2016 6:29:00 |
comment_date_gmt | Date on which the review is posted with Greenwich Mean Time | MM/DD/YYYY H:i e.g. 9/6/2016 6:29 |
comment_content | Content of review | Text. Eg: Nice product. |
comment_approved | Indicates whether the review is approved by the authorized person. 1 means the review is approved and 0 means the review is not approved. | 0, 1, yes, no, YES, NO |
comment_parent | The parent review’s ID. And it will be empty for the normal review. | Numerical |
user_id | The review author’s ID if he is registered (0 otherwise) | Numerical |
rating | Indicates the star rating of the product. | Numerical Range is 1 to 5 |
verified | Indicates whether a reviewer is a registered customer who has bought the product or not. 1 means verified user and 0 means not a verified user. | Numerical |
title | Title of the review | Text |
product_title | Name of the product | Text |
comment_alter_id | During import, if an id conflict arises, the review may get imported as a new item. In such cases, the comment_alter_id value is used to match the comment_id of that particular review. In case of reviews having replies, this column identifies the parent review. | Numerical |
Steps to import product reviews
↑ Back to topFor a complete store migration, we recommend you to import the data in the following order: User/Customer > Product > Product reviews.
To import WooCommerce product reviews:
- Navigate through the menu: WooCommerce > Import Export Suite and click on the tab: Import.
Step 1: Select post type
↑ Back to topAs a first step, you need to choose the post type as Product Review.
Step 2: Select import method
↑ Back to topChoose from the below options to continue with your import:
- Quick import
- Pre-saved template
- Advanced import
Let us have a look at each of these export methods:
Quick Import
- Imports the basic/standard fields of the respective post type.
- Primarily used when your input file was exported using the same plugin.
- One can import file from:
- Local
- URL
- FTP
- Click the Import button to complete the action or proceed to Step 3 for advanced options.
Pre-saved template
- imported data using the Advanced import method in any of your previous imports.
- saved the selections as a template for future use.
This method retains the previous filter criteria and other column specifications as per the chosen file and imports data accordingly. By selecting this option, one can choose a previously saved template from the Import template drop-down.
Note: The template will be listed in the drop down only if you have saved it in previous imports.
If you go through the Advanced import, at Step 4 you will get an option to save the template. Once you save that, next time when you want to import a pre-saved template, it will be populated within the drop down.
- Click the Import button to complete the action or proceed to Step 3 to map the import columns.
Advanced import
This option will take you through a detailed process of filtering/column selection/advanced options that may be required for your import.
Note: You can also save this file as a template for future use.
Step 3: Map import columns
↑ Back to topHere, one can map the import columns under the following 3 fields:
- Default fields: The column names appearing in this section can be edited if required. The preferred names and choices that were last saved can be viewed on choosing a pre-saved template.
- Meta(custom fields)
Evaluate field
Evaluate field can be used to append a value/expression to an existing item while importing. It basically selects/maps any column from the input file and compute the values with expressions and creates output.
- Expression: Any of the operators +*/-()&@ or string constants can be used along with the attributes to manipulate the respective value.
- Input: Select the column from the drop down which has to be modified.
- Output: Sample value will be created based on the first record from input file.
Note: Columns that have no values in the input file may cause syntax errors if used in an expression.
- Click on Step 4 to proceed.
Step 4: Advanced Options/Batch Import/Scheduling
↑ Back to topOn reaching Step 4, the following window will appear, from where one can:
- Update Only: On selecting “Yes”, the store is updated with the data from the input file only for matching/existing records from the file. On selecting “No”, the entire data from the input file is processed for an update or insert as the case maybe.
- If the review exists in the store: One can either Skip or Update the entry.
- Associate product reviews by SKU: Links with product reviews on the basis of product ID.
Note: On expanding Advanced options, one can set the number of records that the server will process for every iteration within the configured timeout interval.
If the import fails due to timeout you can lower this number accordingly and try again.
- Save the template file for future (if needed).
- Click on Import/Schedule to finish.
You can either import the product reviews directly into your store or schedule the import using FTP.
To schedule the import:
- Hit the Schedule option, and you will be taken to the cron schedule window as shown below:
The plugin supports two different schedule types:
- WordPress Cron: Upon a visit, WordPress Cron will check to see if the time/date is later than the scheduled event/s, and if it is– it will fire those events.
- schedules your job at the specified time.
- is dependent on your website visitors.
- Server Cron: You may need to trigger the URL every minute depending on the volume of data to be processed.You can use this option :
- to generate a unique URL that can be added to your system in order to trigger the events.
- if you have a separate system to trigger the scheduled events.
Configure the time at which the import is to be scheduled and click on Schedule now.
To directly import:
- Hit on the Import option.
Once the import is completed, a pop-up will be displayed showing import status which contains the number of successful imports and failed imports (if any).
Steps to export product reviews
↑ Back to topTo export WooCommerce product reviews:
- Navigate through the menu: WooCommerce > Import Export Suite and click on the tab: Export.
Step 1: Select a post type
↑ Back to topAs a first step, you need to choose the post type as Product Review.
Step 2: Select an export method
↑ Back to topChoose from the below options to continue with your export:
- Quick export from DB
- Based on a pre-saved template
- Advanced export
Let us have a look at each of these export methods:
Quick Export
- Exports the basic/standard fields of the respective post type.
- To include fields from Meta(custom fields), select the respective group’s checkboxes.
- Click the Export button to complete the action or proceed to Step3 for advanced options.
Pre-saved template
- exported data using the Advanced export method in any of your previous exports.
- saved the selections as a template for future use.
Exports data as per the specifications(filters, selective column, mapping.. etc) from the previously saved file. By selecting this option, one can choose a previously saved template from the Export template drop-down.
Note: The template will be listed in the drop down only if you have saved it in previous exports.
If you go through the Advanced export, at Step 5 you will get an option to save the template. Once you save that, next time when you want to export a pre-saved template, it will be populated within the drop down.
- Click the Export button to complete the action or proceed to Step 3 to filter data.
Advanced Export
Takes you through a detailed process of filtering/column selection/advanced options that may be required for your export.
Note: You can also save this file as a template for future use.
- Click on Step3 to filter data.
Step 3: Filter data
↑ Back to topFilter data that needs to be exported as per the below criteria.
- Total number of reviews to export : The actual number of reviews you want to export. e.g. Entering 500 with a skip count of 10 will export reviews from 11th to 510th position.
- Skip first n reviews : Specify the number of reviews to be skipped from the beginning. e.g. Enter 10 to skip the first 10 reviews from export.
- Date From : Date on which the review was received. Export products reviews received on and after the specified date.
- Date To: Date on which the review was received. Export products reviews received upto the specified date.
- Products: Input the product name to export respective reviews.
- Stars: Export reviews of a specific star rating.
- Customer/Guest Review : Export reviews by customer, guest or both.
- Review with replies: Includes the replies along with the respective reviews.
- Status: Here, you can export the reviews based on specific post status.
- Sort Columns: Sort the exported data based on the selected columns in the order specified. Defaulted to ascending order
- Sort By: Defaulted to ascending. Applicable to above-selected columns in the order specified.
Step 4: Map and reorder export columns
↑ Back to topThe column names appearing in this section can be edited if required. The preferred names and choices that were last saved can be viewed by choosing a pre-saved template. One can also move the columns to reorder the arrangement.
- Here, one can map and reorder the export columns under the following 2 fields:
- Default fields
- Meta(custom fields)
- Click on Step 5 to proceed.
Step 5: Advanced Options/Batch Export/Scheduling
↑ Back to topOn reaching Step 5, the following window will appear, from where one can:
- Export file name: To specify a filename for the exported file. If left blank the system generates a default name.
- Export File Format: Both CSV and XML file formats are available.
- Delimiter: Separator for differentiating the columns in the CSV file. Assumes ‘,’ by default.
- Enable FTP export: On opting ‘Yes’, choose an FTP profile and specify the export path.
Note: On expanding Advanced options, one can set the number of records that the server will process for every iteration within the configured timeout interval.
If the export fails due to timeout you can lower this number accordingly and try again.
- Save the template file for future export as shown below(if needed).
- Click on Export to export or schedule the export to finish.