Woocommerce Order API Line Item ID changes on update Woocommerce Order API Line Item ID changes on update wordpress wordpress

Woocommerce Order API Line Item ID changes on update


This is definitely an issue with the personalization plugins you mentioned, because woocommerce on its own does not create a new line item on update as evident from the code belowhttps://github.com/woocommerce/woocommerce/blob/master/includes/api/legacy/v2/class-wc-api-orders.php#L867

protected function set_line_item( $order, $item, $action ) {$creating  = ( 'create' === $action );

//

   if ( $creating ) {      $line_item = new WC_Order_Item_Product();    } else {      $line_item = new WC_Order_Item_Product( $item['id'] );    }

I would strongly recommend you to disable the customisation plugin and try.