ACSD-47292: out-of-stock bundled products are not available in GraphQL response

The ACSD-47292 patch fixes the issue where the out-of-stock bundled products are not available in the GraphQL response even if the Display Out-of-Stock Products is set to Yes. This patch is available when the Quality Patches Tool (QPT) 1.1.25 is installed. The patch ID is ACSD-47292. Please note that the issue is scheduled to be fixed in Adobe Commerce 2.4.6.

Affected products and versions

The patch is created for Adobe Commerce version:

  • Adobe Commerce (all deployment methods) 2.4.4

Compatible with Adobe Commerce versions:

  • Adobe Commerce (all deployment methods) 2.4.4 - 2.4.5-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

The out-of-stock bundled products are not available in the GraphQL response even if the Display Out-of-Stock Products is set to Yes.

Steps to reproduce:

  1. Go to the Adobe Commerce Admin > System > Configuration > Catalog > Inventory and set the Display Out-of-Stock Products to Yes.
  2. Create two simple products, s1 and s2.
  3. Make s1 out-of-stock and not visible individually and s2 in-stock and not visible individually, and assign them to a category.
  4. Create a bundled product with at least one option product and assign s1 and s2 to this option (input type “RadioButton”).
  5. Save the bundled product and assign it to a category.
  6. Go to the storefront and open this bundled product. You will see the out-of-stock option s1 is greyed but visible.
  7. Send a GraphQL request:
{
  categoryList(filters: { ids: { in: ["3"] } }) {
    id
    name
    products(pageSize: 8, sort: { position: ASC }) {
      total_count
      items {
        id
        sku
        name
        ... on BundleProduct {
          url_key
          items {
            title
            sku
            options {
              quantity
              position
              is_default
              product {
                id
                name
                sku
              }
            }
          }
        }
      }
    }
  }
}

Expected results:

s1 bundle option is listed in the GraphQL response since Display Out-of-Stock Products is set to Yes, and it is visible on the storefront.

Actual results:

s1 bundle option is not listed in the GraphQL response.

"items": [
                                {
                                    "title": "oo1",
                                    "sku": "bundle2",
                                    "options": [
                                        {
                                            "quantity": 1,
                                            "position": 2,
                                            "is_default": false,
                                            "product": {
                                                "id": 2,
                                                "name": "s2",
                                                "sku": "s2"
                                            }
                                        }
                                    ]
                                }
                            ]

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