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.
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, Paypal IPN transactions.
Anthony Akin
March 16, 2024
Is it possible to update the subscription renewal date to a future date, without triggering an order?
Hema
May 15, 2024
Hello Anthony,
Thanks for reaching out. An order won’t be triggered until a renewal is completed. So the plugin won’t trigger an order during an update to a future date.
Richard Crouse
April 3, 2023
Hi. I have an unusual technical issue that I wonder if your plugin can help with. We have designed some code to migrate subscription orders from a Drupal eCommerce platform to a WordPress WooCommerce platform. We are having difficulty migrating the parent orders from the Drupal site. Can your plugin somehow be used to create parent orders for subscription orders that we want to migrate? Thank you.
Vineetha
April 25, 2023
Hi Richard,
Thanks for reaching out! The subscription auto renewal wont work when migrating from a different platform. However, you can use our plugin to import both parent orders(Sample CSV) and sub orders(Sample CSV).
For more details, refer Importing subscription orders and associating with their parent/renewal orders.