Skip to content

Commit 12e7920

Browse files
committed
Fixed errors not showing on order edit after saving
1 parent 8b0cc54 commit 12e7920

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Release Notes for Craft Commerce
22

3+
## Unreleased
4+
5+
- Fixed a bug where order errors weren't showing on the Edit Order page.
6+
37
## 4.7.1 - 2024-12-02
48

59
- Fixed an error that occurred on the Orders index page when running Craft CMS 4.13.4 or later. ([#3793](https://github.com/craftcms/commerce/issues/3793))

src/controllers/OrdersController.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1251,6 +1251,7 @@ private function _registerJavascript(array $variables): void
12511251

12521252
if ($variables['order']->hasErrors()) {
12531253
$response['order']['errors'] = $variables['order']->getErrors();
1254+
$response['errors'] = $variables['order']->getErrors();
12541255
$response['error'] = Craft::t('commerce', 'The order is not valid.');
12551256
}
12561257

0 commit comments

Comments
 (0)