ACP2E-4456: An issue occurs where canceling an order through a GraphQL mutation doesn't transition…
An issue occurs where canceling an order through a GraphQL mutation doesn't transition gift card–paid orders to the Closed status. Quality patch ACP2E-4456 for magento/module-order-cancellation applies to Magento Open Source and Adobe Commerce 2.4.8 to 2.4.8-p5.
- Categories
- Order/Checkout, GraphQL
- Components
- magento/module-order-cancellation
- Origin
- adobe-commerce-support
- Since QPT
- 1.1.78
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. 1. Create a simple product. 1. Enable Free Shipping. 1. Enable GraphQL order cancellation by navigating to Stores > Configuration > Sales > Order cancellation, and set Order cancellation through GraphQL to Yes. 1. Sign in to the storefront account. 1. Purchase a gift card, generate an invoice for the order, and note the gift card number. 1. Add the simple product to the cart. 1. Select Free Shipping during checkout. 1. Complete the payment using the gift card. 1. Invoice the order. 1. Cancel the order using the following GraphQL mutation: 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 } } }
Adobe's page lists 2.4.8 - 2.4.8-p4 as compatible; the versions below are resolved from the current QPT constraints and are the ones the tool will offer.
Adobe scheduled the permanent fix for 2.4.9.
Install
Install the Quality Patches Tool with composer require magento/quality-patches, apply the prerequisites listed for all files applicable to your distribution and version first, then run vendor/bin/magento-patches apply ACP2E-4456. On Cloud, add ACP2E-4456 under stage.build.QUALITY_PATCHES in .magento.env.yaml.
For cweagans/composer-patches, choose a compatible version below and download the bundle. Copy its ACP2E-4456/ folder into patches/composer/, merge composer.patches.json into composer.json, then run composer install. Bundle prerequisites the same way and list them first. Paths are relative to each package root, using the default -p1 level. Prefer local files when configuring composer-patches; a remote URL can change.
Patch files and compatible versions
magento/magento2-base >=2.4.8 <2.4.9
- Patch file
- patches/os/ACP2E-4456_2.4.8-p3.patch
- vendor/magento/module-order-cancellation/Model/CancelOrder.php
