Allow cancel order
When enabled, you can cancel an order directly from the customer’s account. Cancel is disabled by default.
Criteria for cancellation to be enabled for an order
-
The Allow Cancel Order configuration option must be enabled.
-
If order is in
Hold
,Canceled
,Complete
, orClosed
status, the cancel option is disabled on the storefront. -
If any of the items in the order have shipped, the cancel option is disabled on the storefront.
-
If there is some item paid, the cancel option is enabled and the refund is created for that item.
-
If order is in
Pending
orProcessing
status, the cancel option is enabled on the storefront.
Configure to allow customer cancellation and customize the cancellation reasons
-
On the Admin sidebar, go to Stores > Settings > Configuration.
-
In the left panel, expand Sales and select Sales.
-
Expand the Order cancellation section.
{width="600" modal="regular"}
-
Set Order cancellation through GraphQL to
Yes
.This setting enables cancel functionality from the customer account on the storefront.
-
In the Order Order cancellation reasons you can add, delete, or modify any cancellation reason.
With this setting, cancellation reasons are displayed on the storefront to the customer when they cancel an order.
Make sure you have specified at least one reason. -
Click Save Config.
Cancel from the storefront
A customer can initiate the cancel functionality for a specific order from three pages:
-
My Orders page
-
Order View page
-
My Account page
My Orders
The Cancel Order button is displayed in the My Orders page if the order can be canceled.
{width="700" modal="regular"}
Order view page
The Cancel Order button is displayed in the View Order page if the order can be canceled.
{width="700" modal="regular"}
My Account
The Cancel Order button is displayed in the Recent Orders section of the My Account page, if the order can be canceled.
{width="700" modal="regular"}