You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**OCAPI/SCAPI hooks that return ANY value will SKIP the system implementation and all subsequent registered hooks for that extension point.**
134
+
135
+
This is a common source of bugs. For example, if a hook returns `Status.OK`, the system's `dw.order.calculate` implementation won't run, causing cart totals to be incorrect.
136
+
137
+
### When to Return a Value
138
+
139
+
Return a `Status` object **only** when you want to:
140
+
-**Stop processing** with an error (`Status.ERROR`)
141
+
-**Skip the system implementation** intentionally
142
+
143
+
### When NOT to Return a Value
144
+
145
+
To ensure system implementations run (like cart calculation), **return nothing**:
146
+
147
+
```javascript
148
+
// Returning Status.OK skips system implementation
0 commit comments