I manually update an order using the following code.

db_update('uc_orders') // Table name no longer needs {}
    'order_status' => 'payment_received',
  ->condition('order_id', $order->order_id)

Then I visit /admin/store/orders/view, but the value for the order still shows a Pending. If I clear the cache, the new status is Payment received, as it should be.

How do I clear the specific order cache so that it updates immediately?

The following code does what I want, but I would prefer clearing the cache for the specific order that is manually updated.

$orderEntity = Order::load($order_id);

1 Answer 1


This service which used in OrderReassignTest.php will help you to Reload the order based on Order ID.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.