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
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

Users cannot remove gift wrapping from the customer order via GraphQL.

Steps to reproduce:

  1. Create a customer from the frontend.

  2. Create a simple product.

  3. Enable Gift Messages by going to Stores > Configuration > Sales > Gift Options and set Allow Gift Messages = Yes.

  4. Create Gift Wrapping by going to Stores > Other Settings > Gift Wrapping.

  5. Get customer token.

  6. 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)
  7. Now check the gift wrapping Uid with this cart query:

    code language-graphql
    
     {
       cart(cart_id: "{{CART_ID}}") {
         available_gift_wrappings{
             uid
         }
     }
     }
    
    
  8. Set gift wrap using setGiftOptionsOnCart.

  9. Check the cart: cart query.

  10. Unset gift wrap using setGiftOptionsOnCart (set value to null).

  11. Again, check the cart: cart query.

  12. Place order: placeOrder mutation.

  13. 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:

To learn more about Quality Patches Tool, refer to:

For info about other patches available in QPT, refer to Quality Patches Tool: Search for patches in the Quality Patches Tool guide.

recommendation-more-help
8bd06ef0-b3d5-4137-b74e-d7b00485808a