Title: Export Functionality not working.
Last modified: August 1, 2023

---

# Export Functionality not working.

 *  [Skynet Solutions, Inc.](https://wordpress.org/support/users/skynetsolutions/)
 * (@skynetsolutions)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/export-functionality-not-working/)
 * Hello,
 * I had an issue with the export not working trying to export 5 orders. Since I
   am a developer, I looked at the error. In your file /wc-customer-source/includes/
   wccs-admin-export.php where you are calling the get_billing_first_name() on the
   order. It errors on a refunded or failed order. This is because a refunded order
   is not a WC_Order. I added a check to make sure that the order you are exporting
   is a WC_Order and if not to get the parent order.
 * I added four lines to your code after the foreach begins: Line 64 or so.
 *     ```wp-block-code
                   //In cases where the order is actually a refund or failed then the billing last name is not set. You must get the parent order.
                   if ( ! is_a( $order, 'WC_Order' ) ) {
                       $order = new WC_Order(  $order->get_parent_id() );
                   }
       ```
   
 * This will get the parent order if the order is not a valid WC Order. Please implement
   this fix in the next version. We were able to export over 100 orders after this
   fix.
 * Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [wooassist](https://wordpress.org/support/users/wooassist/)
 * (@wooassist)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/export-functionality-not-working/#post-16961428)
 * [@skynetsolutions](https://wordpress.org/support/users/skynetsolutions/) thanks
   for this fix we will run our tests and integrate this in the next release.
 *  Plugin Author [wooassist](https://wordpress.org/support/users/wooassist/)
 * (@wooassist)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/export-functionality-not-working/#post-16999758)
 * [@skynetsolutions](https://wordpress.org/support/users/skynetsolutions/) we have
   released a new version with the fix from above. please have a look. THanks!
 *  [Najm](https://wordpress.org/support/users/gcsaudi/)
 * (@gcsaudi)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/export-functionality-not-working/#post-17313545)
 * Hi there,
 * Am having the same issue as [@skynetsolutions](https://wordpress.org/support/users/skynetsolutions/),
   however, am not a developer, and am not sure how to fix it.
 * I see you mentioned that you released a new update, but the latest update was
   8 months ago. Is there any possible way to share the newer version, or share 
   the fixed “wccs-admin-export.php” file so I can replace it.
 * Thanks

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Export Functionality not working.’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wc-customer-source.svg)
 * [Where Did You Hear About Us Checkout Field for WooCommerce](https://wordpress.org/plugins/wc-customer-source/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wc-customer-source/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wc-customer-source/)
 * [Active Topics](https://wordpress.org/support/plugin/wc-customer-source/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wc-customer-source/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wc-customer-source/reviews/)

## Tags

 * [errors](https://wordpress.org/support/topic-tag/errors/)
 * [export](https://wordpress.org/support/topic-tag/export/)

 * 3 replies
 * 3 participants
 * Last reply from: [Najm](https://wordpress.org/support/users/gcsaudi/)
 * Last activity: [2 years, 4 months ago](https://wordpress.org/support/topic/export-functionality-not-working/#post-17313545)
 * Status: not resolved