Importing subscription orders and associating it with corresponding parent/renewal orders
The bulk import and export of subscription orders is an important feature of Order / Coupon / Subscription Export Import Plugin for WooCommerce plugin. Under the Subscription Import / Export tab, you can import/export/merge (update existing subscription order) several subscription orders using one file which saves your time and effort of manually adding information of subscription orders.
Steps for importing subscription orders:
- Import orders: Every subscription has a corresponding parent and/or renewal order listed under the Woocommerce orders. 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 a post. Our plugin overrides this default behavior via our mapping sections as explained below:
- Map with the order_id column: Here 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 _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 renewal order in the _wt_import_key of the order CSV should also be 345.
Subscription v/s Parent/Renewal order
The association of subscription order with its corresponding parent/renewal order are briefed below:
|Association||Column in Subscription order CSV||Column 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, esp Paypal IPN transactions.