ACSD-50794: Cannot remove gift wrapping from customer order via GraphQL
The ACSD-50794 patch fixes the issue where users cannot remove gift wrapping from the customer order via GraphQL. This patch is available when the Quality Patches Tool (QPT) 1.1.32 is installed. The patch ID is ACSD-50794. Please note that the issue is scheduled to be fixed in Adobe Commerce 2.4.7.
Affected products and versions
The patch is created for Adobe Commerce version:
- Adobe Commerce (all deployment methods) 2.4.5-p1
Compatible with Adobe Commerce versions:
- Adobe Commerce (all deployment methods) 2.4.1 - 2.4.6-p1
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
Users cannot remove gift wrapping from the customer order via GraphQL.
Steps to reproduce:
-
Create a customer from the frontend.
-
Create a simple product.
-
Enable Gift Messages by going to Stores > Configuration > Sales > Gift Options and set Allow Gift Messages = Yes.
-
Create Gift Wrapping by going to Stores > Other Settings > Gift Wrapping.
-
Get customer token.
-
Create an empty cart, customerCart.
- Add products to the cart:
addProductsToCart
mutation - Set billing address:
setBillingAddressOnCart
mutation - Set shipping address:
setShippingAddressesOnCart
mutation - Set shipping method:
setShippingMethodsOnCart
mutation (flatrate) - Set payment method:
setPaymentMethodOnCart
mutation (checkmo)
- Add products to the cart:
-
Now check the gift wrapping Uid with this cart query:
code language-graphql { cart(cart_id: "{{CART_ID}}") { available_gift_wrappings{ uid } } }
-
Set gift wrap using
setGiftOptionsOnCart
. -
Check the cart: cart query.
-
Unset gift wrap using
setGiftOptionsOnCart
(set value to null). -
Again, check the cart: cart query.
-
Place order:
placeOrder
mutation. -
Run customer query: customer.
code language-graphql query { customer { firstname middlename lastname suffix email orders { items { order_date gift_wrapping { design uid } } } addresses { firstname middlename lastname street city region { region_code region } postcode country_code telephone } } }
Expected results:
Once a user sets a gift wrap and unsets it, the customer query returns null.
Actual results:
Customer query still returns gift wrapping as applied.
Apply the patch
To apply individual patches, use the following links depending on your deployment method:
- Adobe Commerce or Magento Open Source on-premises: Quality Patches Tool > Usage in the Quality Patches Tool guide.
- Adobe Commerce on cloud infrastructure: Upgrades and Patches > Apply Patches in the Commerce on Cloud Infrastructure guide.
Related reading
To learn more about Quality Patches Tool, refer to:
- Quality Patches Tool released: a new tool to self-serve quality patches in the support knowledge base.
- Check if patch is available for your Adobe Commerce issue using Quality Patches Tool in the Quality Patches Tool guide.
For info about other patches available in QPT, refer to Quality Patches Tool: Search for patches in the Quality Patches Tool guide.