Title: Error &#8211; Import List
Last modified: March 17, 2024

---

# Error – Import List

 *  Resolved [nzfade](https://wordpress.org/support/users/nzfade/)
 * (@nzfade)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/error-import-list/)
 * Everything works, until i get to the Import List. The product is there where 
   I can edit categories, tags etc, the data is all in it, images etc as well
   When
   I click Import Nowit comes up with a red box above the product saying ‘error’Have
   I done something wrong? The imported list is empty, and nothing in woocommerce
   products etc …… it’s like this is the step that we have to do to make sure everythings
   right before importing the product, and all I get is error.

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

 *  Thread Starter [nzfade](https://wordpress.org/support/users/nzfade/)
 * (@nzfade)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/error-import-list/#post-17507012)
 * I’ve encountered a PHP fatal error related to the woo-alidropship plugin on my
   WordPress site. The issue arises when attempting to use a function tied to freight
   data handling within the plugin. Below is the relevant error message:
 * vbnetCopy code
 * `PHP Fatal error: Uncaught Error: Cannot use object of type WP_Error as array
   in wp-content/plugins/woo-alidropship/includes/data.php on line 2655`
 * This error is triggered during an operation in the admin area, specifically when
   trying to access freight information through the plugin’s import list functionality.
 * Could you provide guidance on resolving this issue or inform me if a patch is
   available? The error significantly impacts the plugin’s functionality and my 
   site’s operations.
 * Thank you for your assistance.
 *  [angelagrey](https://wordpress.org/support/users/angelagrey/)
 * (@angelagrey)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/error-import-list/#post-17507428)
 * Hi,
 * Thank you for reaching out to us.
 * I’ve checked on my site and didn’t encounter this problem: [https://prnt.sc/WOQ_OJ9_vnAF](https://prnt.sc/WOQ_OJ9_vnAF)
 * I think it may be a conflict. You might consider conducting a full test following
   these instructions: [https://docs.woocommerce.com/document/how-to-test-for-conflicts/](https://docs.woocommerce.com/document/how-to-test-for-conflicts/)
 * Best regards.
 *  [angelagrey](https://wordpress.org/support/users/angelagrey/)
 * (@angelagrey)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/error-import-list/#post-17507435)
 * And, there’s an article that might offer some insights: [https://villatheme.com/knowledge-base/handle-the-error-notification-when-importing-on-import-list-page/](https://villatheme.com/knowledge-base/handle-the-error-notification-when-importing-on-import-list-page/)
 *  Thread Starter [nzfade](https://wordpress.org/support/users/nzfade/)
 * (@nzfade)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/error-import-list/#post-17530452)
 * Here’s the fix, in the data.php file this fixed the importing of the file.
   public
   static function new_get_freight( $args, $freight_ext ) {$response = array(‘status’
   => ‘error’,‘freight’ => array(),‘code’ => ”,‘from’ => ”,);
 *     ```wp-block-code
       try {
           $_m_h5_tk     = get_option( 'ald_token_m_h5_tk', 'xxxxxxxxxxxxxxxxxxxxxxxxxx' );
           $_m_h5_tk_enc = get_option( 'ald_token_m_h5_tk_enc', 'xxxxxxxxxxxxxxxxxxxx' );
   
           $args['ext']        = $freight_ext;
           $args['quantity']   = $args['count'];
           $args['clientType'] = 'pc';
           $args['userScene'] = 'PC_DETAIL';
   
           $freight = [];
   
           $token = explode( '_', $_m_h5_tk )[0] ?? '';
           $data  = wp_json_encode( $args );
   
           $sign_response = wp_remote_post( 'https://ald.villatheme.com/villatheme-ald-get-signature', [
               'body' => [
                   'data'  => $data,
                   'token' => $token,
               ]
           ] );
   
           if ( is_wp_error( $sign_response ) ) {
               error_log( 'Sign response error: ' . $sign_response->get_error_message() );
               return $response;
           }
   
           $sign_response_body = wp_remote_retrieve_body( $sign_response );
           $sign_response = json_decode( $sign_response_body, true );
   
           if ( !is_array( $sign_response ) || empty( $sign_response['sign'] ) || empty( $sign_response['time'] ) ) {
               error_log( 'Invalid sign response format or missing data.' );
               return $response;
           }
   
           $sign = $sign_response['sign'];
           $time = $sign_response['time'];
   
           $url = "https://acs.aliexpress.com/h5/mtop.aliexpress.itemdetail.queryexpression/1.0/?jsv=2.5.1&appKey=12574478&t={$time}&sign={$sign}&api=mtop.aliexpress.itemdetail.queryExpression&v=1.0&type=originaljson&dataType=jsonp";
   
           $cookies = [new WP_Http_Cookie( array( 'name' => '_m_h5_tk', 'value' => $_m_h5_tk ) ),
                       new WP_Http_Cookie( array( 'name' => '_m_h5_tk_enc', 'value' => $_m_h5_tk_enc ) )];
   
           $request = wp_remote_post( $url, [
               'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36',
               'headers'    => array(
                   'Content-Type' => 'application/x-www-form-urlencoded',
                   "Accept"       => 'application/json',
               ),
               'body'       => [ 'data' => $data ],
               'cookies'    => $cookies,
           ] );
   
           if ( is_wp_error( $request ) ) {
               error_log( 'Request error: ' . $request->get_error_message() );
               return $response;
           }
   
           $body = wp_remote_retrieve_body( $request );
           if ( is_wp_error( $body ) ) {
               error_log( 'Body retrieval error: ' . $body->get_error_message() );
               return $response;
           }
   
           $body = json_decode( $body, true );
           if ( !is_array( $body ) || empty( $body['data'] ) ) {
               error_log( 'Invalid response body format or missing data.' );
               return $response;
           }
   
           $data = $body['data'] ?? [];
           // Continue with your logic after ensuring $data is properly set...
   
           // Your existing logic for processing $data...
   
       } catch ( \Exception $e ) {
           error_log( print_r( $e->getMessage(), true ) );
       }
   
       return $response;
       ```
   
 * }
    -  This reply was modified 2 years, 2 months ago by [nzfade](https://wordpress.org/support/users/nzfade/).
 *  [angelagrey](https://wordpress.org/support/users/angelagrey/)
 * (@angelagrey)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/error-import-list/#post-17549938)
 * Thank you for sharing your insights.
 *  [serome](https://wordpress.org/support/users/serome/)
 * (@serome)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/error-import-list/#post-17857903)
 * I’m having the same issue. How were you able to fix it please?
 *  [angelagrey](https://wordpress.org/support/users/angelagrey/)
 * (@angelagrey)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/error-import-list/#post-17859589)
 * I received your ticket. Please keep me updated there instead

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

The topic ‘Error – Import List’ is closed to new replies.

 * ![](https://ps.w.org/woo-alidropship/assets/icon-128x128.gif?rev=3080898)
 * [ALD - Dropshipping and Fulfillment for AliExpress and WooCommerce](https://wordpress.org/plugins/woo-alidropship/)
 * [Support Threads](https://wordpress.org/support/plugin/woo-alidropship/)
 * [Active Topics](https://wordpress.org/support/plugin/woo-alidropship/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woo-alidropship/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woo-alidropship/reviews/)

 * 7 replies
 * 3 participants
 * Last reply from: [angelagrey](https://wordpress.org/support/users/angelagrey/)
 * Last activity: [1 year, 11 months ago](https://wordpress.org/support/topic/error-import-list/#post-17859589)
 * Status: resolved