Home > Docs > Order / Coupon / Subscription Export Import Plugin for WooCommerce > Import Subscription Orders With Their Parent/Renewal Orders In A WooCommerce Store

Import Subscription Orders With Their Parent/Renewal Orders In A WooCommerce Store

Last updated on September 12, 2023

The bulk import and export of subscription orders is an important feature of the  Order, Coupon, Subscription Export Import for WooCommerce plugin. You can migrate several subscription orders from one store to another using a single file, saving you the time and effort of manually adding subscription order information.

Importing subscription orders

Import orders

Under WooCommerce orders, each subscription has a corresponding parent and/or renewal order. Hence it is essential to migrate these orders prior to importing the subscriptions to your new site. By default, WooCommerce assigns post_id on imports irrespective of its post type. Likewise, orders and subscriptions are also treated as respective posts. Our plugin overrides this default behaviour via our mapping sections as explained below:

  • Map with the order_id column: Here, the plugin assigns the original order_ids as is if they are available within the new site and skips the duplicate.
  • Map with Do not import value: In this case, the plugin assigns a new order_id for all the imported orders irrespective of their original order ids. 
    When new ids are assigned to the orders, it will not cause any ambiguity and facilitates successful import without skipping any order. By doing so, original order ids will be replaced resulting in the disassociation of the corresponding subscription order ids. But, our plugin ensures that the original ids are preserved internally(via the _wt_import_key) whenever new ids are assigned. 

Import subscription orders

It is advised to check the wt_import key to ensure that the subscriptions are correctly mapped to their corresponding parent/renewal orders. Hence you need to enable the _wt_import_key while importing the subscriptions to establish this correspondence as shown below: 

While importing, the subscription orders and their corresponding parent orders are linked using the post_parent column of the subscription order CSV and _wt_import_key column of the order CSV. Ensure that the values contained in both of these columns are the same for successful linking of subscription order and parent order. For example, if the value in the post_parent column of the subscription order CSV is 12345 then the value of the parent order in the _wt_import_key of the order CSV should also be 12345.

Likewise, the subscription orders and renewal orders are linked using the renewal order column of the subscription order CSV and the _wt_import_key column of the order CSV. For example, if the value in the renewal order column of the subscription order CSV is 345 then the value of the renewal order in the _wt_import_key of the order CSV should also be 345.

link related orders
Linking related orders using _wt_import_key

Subscription v/s Parent/Renewal order

The association of subscription order with its corresponding parent/renewal order are briefed below:

AssociationColumn in Subscription order CSVColumn in Order CSV
Parent order and Subscription order
post_parent_wt_import_key
Renewal order and Subscription order
renewal_order_wt_import_key

Also while importing subscription orders, the subscription plugin behaves as below:

  • If the Subscription_id conflicts with an existing order id, the corresponding subscription record will be skipped.
  • If the Subscription_id conflicts with an existing post id, the corresponding subscription record will be imported with a new id.

All active subscriptions will continue with their pre-scheduled recurrence as in the original site, subjectively depending on the payment gateway. Some payment gateways may have to be reconfigured depending on the site URL change or their support for the subscription model, Paypal IPN transactions.