webdna / commerce-bundles

Other
3 stars 4 forks source link

Trying to get property 'id' of non-object, if bundle member product is deleted #9

Closed sebschaefer closed 1 year ago

sebschaefer commented 3 years ago

kuriousagency\commerce\bundles\elements\Bundle->getStock() raises PHP Error, if a bundle member product is soft-deleted.

https://github.com/KuriousAgency/commerce-bundles/blob/bd3094930e2e65234ae38dde01f9604a9b1df3bb/src/elements/Bundle.php#L505

getPurchasables() should only return valid purchasable elements (or extend query in _getBundlePurchasables to exclude deleted elements)

Version: 1.2