Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save goodwoor/10c81393a131913d0c2ad4e2b295d939 to your computer and use it in GitHub Desktop.
Save goodwoor/10c81393a131913d0c2ad4e2b295d939 to your computer and use it in GitHub Desktop.
diff --git a/app/addons/product_bundles/src/Services/ProductBundleService.php b/app/addons/product_bundles/src/Services/ProductBundleService.php
index 48d86c718e..11994b86ef 100644
--- a/app/addons/product_bundles/src/Services/ProductBundleService.php
+++ b/app/addons/product_bundles/src/Services/ProductBundleService.php
@@ -313,9 +313,10 @@ class ProductBundleService
'get_discounts' => true
]);
+ $is_warehouse_active = Registry::get('addons.warehouses.status') === ObjectStatuses::ACTIVE;
if (!empty($bundle_product['product_options'])) {
$product['amount'] = isset($product['inventory_amount']) ? $product['inventory_amount'] : $product['amount'];
- } else {
+ } elseif(!$is_warehouse_active) {
$product['amount'] = fn_get_product_amount($bundle_product['product_id']);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment