Modifying Order Number is breaking revisions
I have created an API using Drupal Services to allow an external system to create Drupal Commerce orders.
The orders received via the external system need the order_number prefixed. E.g.
EXT100424
I can easily add the prefix like this
$order_wrapper->order_number->set('EXT' . $order_wrapper->order_number->value());
The order saves OK but when you view the order in the CMS there is no payment and revision data. So the reference to revisions and payment data is broken by modifying the order_number.
I have tried modifying the order_number in hook_commerce_order_presave() but with the same result.
I would have expected order_id to be used to reference the order so that order_number could be modified like this.