ACP2E-4456: Canceling an order with a GraphQL mutation does not move orders paid entirely with gift cards to the Closed status

The ACP2E-4456 patch fixes the issue where GraphQL order cancellation doesn’t transition gift card–paid orders to the Closed status. This patch is available when the Quality Patches Tool (QPT) 1.1.78 is installed. The patch ID is ACP2E-4456. Please note that this issue is scheduled to be fixed in Adobe Commerce 2.4.9.

Affected products and versions

The patch is created for Adobe Commerce version:

  • Adobe Commerce (all deployment methods) 2.4.8-p3

Compatible with Adobe Commerce versions:

  • Adobe Commerce (all deployment methods) 2.4.8 - 2.4.8-p4
NOTE
The patch might become applicable to other versions with new Quality Patches Tool releases. To check if the patch is compatible with your Adobe Commerce version, update the magento/quality-patches package to the latest version and check the compatibility on the Quality Patches Tool: Search for patches page. Use the patch ID as a search keyword to locate the patch.

Issue

An issue occurs where canceling an order through a GraphQL mutation doesn’t transition gift card–paid orders to the Closed status.

Steps to reproduce:

  1. Create a gift card of any type.

  2. Create a simple product.

  3. Enable Free Shipping.

  4. Enable GraphQL order cancellation by navigating to Stores > Configuration > Sales > Order cancellation, and set Order cancellation through GraphQL to Yes.

  5. Sign in to the storefront account.

  6. Purchase a gift card, generate an invoice for the order, and note the gift card number.

  7. Add the simple product to the cart.

  8. Select Free Shipping during checkout.

  9. Complete the payment using the gift card.

  10. Invoice the order.

  11. Cancel the order using the following GraphQL mutation:

    code language-none
    mutation {
     cancelOrder(input: { order_id: "Nw==", reason: "Other" }) {
            error
            order {
                carrier
                created_at
                email
                gift_receipt_included
                grand_total
                id
                increment_id
                number
                order_date
                shipping_method
                status
            }
        }
    }
    

Expected results:

The order status changes to Canceled.

Actual results:

The order is not canceled.

Apply the patch

To apply individual patches, use the following links depending on your deployment method:

To learn more about Quality Patches Tool, refer to:

recommendation-more-help
commerce-operations-help-tools