1. Documentation /
  2. Import and Export of WooCommerce Subscriptions

Import and Export of WooCommerce Subscriptions

Import export Suite for WooCommerce helps you to import and export all your WooCommerce subscriptions from one store to another in an efficient and quick manner.

Mapping of WooCommerce Subscriptions

↑ Back to top
Column HeadingExplanationAccepted value or format
subscription_idIdentification Number of the subscription.Numerical
subscription_statusStatus of the subscriptionText. eg: Pending, On-hold
customer_idIdentification Number of the customer.Numerical
customer_usernameUsername of the customerAlpha-numeric characters.
customer_emailEmail address of the customerAlpha-numeric characters.
date_createdDate on which the subscription is createdMM/DD/YYYY H:i:se.g  9/6/2016  6:29:00
trial_end_dateDate on which the trial will end.

MM/DD/YYYY H:i:se.g  9/6/2016  6:29:00
next_payment_dateDate on which the next payment is to be made.MM/DD/YYYY H:i:se.g  9/6/2016  6:29:00
last_order_date_createdDate on which the last order was createdMM/DD/YYYY H:i:se.g  9/6/2016  6:29:00
end_dateEnd date of subscription MM/DD/YYYY H:i:se.g  9/6/2016  6:29:00
post_parentOrder id of the subscriptionNumerical
billing_periodLength of the subscription cycle. Example: 5 year renewalMM/DD/YYYY H:i:se.g  9/6/2016  6:29:00
billing_intervalLength of time between the last statement closing date and the next. Interval can be in day, week,month and year.MM/DD/YYYY H:i:se.g  9/6/2016  6:29:00
order_shippingShipping details of the order.Alpha-numeric characters.
order_shipping_taxThe total order shipping taxNumerical
fee_totalThe total fees amountNumerical
fee_tax_totalThe total tax on feesNumerical
order_taxThe total order taxNumerical
cart_discountThe sum of all cart discounts appliedNumerical
cart_discount_taxThe tax on the sum of all the cart discounts appliedNumerical
order_totalthe overall order totalNumerical
order_currencythe order currencyText
payment_methodDetails of the payment method. Text
payment_method_titleName of the payment method. Eg: Cash on delivery, PayPalText
shipping_methodName of the shipping method name as seen in the Order admin. Eg: “free_shippingAlpha-numeric characters. 
billing_first_nameFirst name of the billing companyText
billing_last_nameLast name of the billing companyText
billing_emailEmail address of the billing companyText
billing_phonePhone number of the billing companyNumerical
billing_address_1First address of the billing companyAlpha-numeric characters. 
billing_address_2Second address of the billing companyAlpha-numeric characters. 
billing_postcodePostcode of the billing companyNumerical
billing_cityCity of the billing companyText
billing_stateState of the billing companyText
billing_countryCountry of the billing companyText
billing_companyName of the billing companyText
shipping_first_nameFirst name in the shipping addressText
shipping_last_nameLast name in the shipping addressText
shipping_address_1First address of the shipping companyAlpha-numeric characters. 
shipping_address_2Second address of the shipping companyAlpha-numeric characters. 
shipping_postcodePostcode to which the order is shipped. Numerical
shipping_cityCity to which the order is shipped. Text
shipping_stateState to which the order is shipped. Text
shipping_countryCountry of the shipping address.Text
shipping_companyName of the shipping companyText
customer_noteAdditional note added by the customer at time of placing the orderText
order_itemsLine items purchased in the order, such as product, price, quantity, sku, idAlpha-numeric characters.
order_notesupdates in an order. Example: status change, payment info etc.Alpha-numeric characters.
renewal_ordersIdentify if the order is renewal or parent type.
Numerical
shipping_itemsData of each shipping method, just contain at least method ID, total costAlpha-numeric characters. Eg: items:Polo × 1|method_id:flat_rate|taxes:a:1:{s:5:”total”;a:0:{}}
coupon_itemsCoupon details of the product orderedAlpha-numeric characters. Eg: code:test|amount:10.00
fee_itemsall fee items for the orderNumer
tax_itemsall tax items for the orderAlpha-numeric characters.
download_permissionsdata that is used to grant download permission for a downloadable product order.
Set this to “1” to grant access to downloadable products in the order
Numerical
meta:is_vat_exemptIdentifies if the tax is paid or notText. Eg: Yes, No

Steps to import subscriptions

↑ Back to top

For a complete store migration, we recommend you to import the data in the following sequence : User/Customer > Product > Product reviews > Coupons > Order > Subscription.

To import WooCommerce subscriptions:

  • Navigate through the menu: WooCommerce > Import Export Suite and click on the tab: Import.

Step 1: Select post type

↑ Back to top

As a first step, you need to choose the post type as Subscription.

Step 2: Select import method

↑ Back to top

Choose from the below options to continue with your import:

  •  Quick import 
  •  Based on a 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:
    1. Local
    2. URL
    3. FTP
  • Click the Import button to complete the action or proceed to Step 3 for advanced options.

Pre-saved template

This import method will be visible only if you satisfy both of these:
  • 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 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 top

Here, 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.
  • Additional meta
  • Hidden meta
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 top

On reaching Step 4, the following window will appear, from where one can:

  1. 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.
  2. If the subscription exists in the store: One can either Skip or Update the entry.
  3. If conflict with an existing post ID: You can either Skip or Import as new item.
  4. Link orders using _wt_import_key:Link the underlying orders related to the imported subscriptions by the key _wt_import_key.
  5. Link products using SKU instead of Product ID: Choose ‘Yes’ to link the products associated with the imported subscriptions by their SKU.
  6. Delete non-matching coupons from store: Select ‘Yes’ to remove the subscriptions from your store which are not present in the input file.

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 subscriptions directly into your store or schedule the import.

To schedule the import:

  1. Hit the Schedule option, and you will be taken to the cron schedule window.

The plugin supports two different schedule types:

  1. 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.
  2. 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.

You can also configure the time at which the import is to be scheduled.

To directly import:

  1. 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 subscriptions

↑ Back to top

To export WooCommerce subscriptions:

  • Navigate through the menu: WooCommerce > Import Export Suite and click on the tab: Export.

Step 1: Select a post type

↑ Back to top

As a first step, you need to choose the post type as Subscription.

Step 2: Select an export method

↑ Back to top

Choose from the below options to continue with your export:

  •  Quick export
  •  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 Additional meta and Hidden meta, select the respective group’s checkboxes.
  • Click the Export button to complete the action or proceed to Step 3 for advanced options.

Pre-saved template

This export method will be visible only if you satisfy both of these:
  • 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 top

Filter data that needs to be exported as per the below criteria.

  • Total number of subscriptions to export: The actual number of subscriptions you want to export. e.g. Entering 500 with a skip count of 10 will export subscriptions from 11th to 510th position.
  • Skip first n subscriptions: Specify the number of subscriptions to be skipped from the beginning. e.g. Enter 10 to skip first 10 subscriptions from export.
  • Statuses: Export subscriptions by their status(pending, on hold, active, cancelled..etc). You can specify more than one status if required.
  • Order Date: From: Specify the date from which the subscription will be valid.
  • Order Date: To: Specify the date till which the subscription will remain valid.
  • Next Payment Date: Exports subscription orders based on Next Payment Date.
  • Payment methods: Include bank transfer, cash on delivery, check payments.
  • Email: Export subscription orders based on email.
  • Product:  Exports for the selected specific products.
  • Coupons: Exports based on the coupons applied.
  • 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 top

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. One can also move the columns to reorder the arrangement.

  • Here, one can map and reorder the export columns under the following 3 fields:
    1. Default fields
    2. Additional meta
    3. Hidden meta
  • Click on Step 5 to proceed.

Step 5: Advanced Options/Batch Export/Scheduling

↑ Back to top

On reaching Step 5, the following window will appear, from where one can:

  1. Export file name: To specify a filename for the exported file. If left blank the system generates a default name.
  2. Export File Format: Both CSV and XML file formats are available.
  3. Delimiter: Separator for differentiating the columns in the CSV file. Assumes ‘,’ by default.
  4. 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 and export or schedule the export to finish.

WooCommerce

The most customizable eCommerce platform for building your online business.

  • 30-day money-back guarantee
  • Support teams across the world
  • Safe and secure online payment