Orders synchronization error – id: cannot be empty
-
When I try to sync orders I get an error:
ERROR order_submit.error :: addStoreOrder :: #3695275 :: Error Code 400 ::
id: cannot be empty
on 2438 in wp-content/plugins/mailchimp-for-woocommerce/includes/api/class-mailchimp-api.php
The problem is in line items:[lines] => Array
(
[0] => Array
(
[id] => 0
[product_id] => 18853
[product_variant_id] => 18853
[quantity] => 1
[price] => 404.33
)
The id of line item can’t be “0”To solve this error I edited the file
wp-content/plugins/mailchimp-for-woocommerce/includes/api/class-mailchimp-woocommerce-transform-orders-wc3.php
And on line 188 I replaced$item = $this->transformLineItem( $key, $order_detail );
with$lineItemKey = $key + 1;$item = $this->transformLineItem( $lineItemKey, $order_detail );
The topic ‘Orders synchronization error – id: cannot be empty’ is closed to new replies.