Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When using the discount module, the order admin page will use the credentials of the current store admin, which may belong to groups that have discounts that the actual customer doesn't have. This causes the discount to be applied no matter what, which makes it impossible to edit an invoice.
Since uc_discounts_role_check doesn't pass in the $order variable, its not possible yet to get the user object into the check function. I'm working to figure out a way to do this, but it'll require some hook/api modifications.