MDVA-30889: Can’t invoice bundle products virtual and simple

The MDVA-30889 patch solves the issue where an error occurs after invoicing a bundle product with both virtual and simple options. This patch is available when the Quality Patches Tool (QPT) 1.0.9 is installed. Please note that the issue was fixed in Adobe Commerce 2.4.2.

Affected products and versions

The patch is created for Adobe Commerce version:

  • Adobe Commerce (all deployment methods) 2.3.4

Compatible with Adobe Commerce versions:

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

Prerequisites:

Install Adobe Commerce with Inventory Management.

Steps to reproduce:

  1. Go to Admin.
  2. Create a simple product.
  3. Create a virtual product.
  4. Create a bundle product (Create two dropdown options for child products, and assign virtual and simple products.). Set Dynamic Price = No.
  5. Go to the storefront.
  6. Go to the product’s page.
  7. Add the product to the cart.
  8. Proceed to checkout, and order the product.
  9. Go to Admin > Orders.
  10. Open the created order, and invoice it.

Expected results:

The invoice of a bundle product (that contains both simple and virtual products) is created.

Actual results:

The invoice is not created, and you receive an error similar to this:

TypeError: Return value of Magento\InventorySourceSelection\Model\Request\InventoryRequest::getItems() must be of the type array, null returned in vendor/magento/module-inventory-source-selection/Model/Request/InventoryRequest.php:102

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 Patches available in QPT in our developer documentation.

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