Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Disallow refunding cancelled orders

dominik-zeglen2fcdb18a6c31
diff --git a/saleor/static/dashboard-next/orders/components/OrderPayment/OrderPayment.tsx b/saleor/static/dashboard-next/orders/components/OrderPayment/OrderPayment.tsx
index e14bfec7f5..72f76cda34 100644
--- a/saleor/static/dashboard-next/orders/components/OrderPayment/OrderPayment.tsx
+++ b/saleor/static/dashboard-next/orders/components/OrderPayment/OrderPayment.tsx
@@ -46,7 +46,8 @@ const OrderPayment = decorate<OrderPaymentProps>(
? order.paymentStatus === PaymentStatusEnum.PREAUTH
: false;
const canRefund = maybe(() => order.paymentStatus)
- ? order.paymentStatus === PaymentStatusEnum.CONFIRMED
+ ? order.paymentStatus === PaymentStatusEnum.CONFIRMED &&
+ order.status !== OrderStatus.CANCELED
: false;
const payment = transformPaymentStatus(maybe(() => order.paymentStatus));
return (