-
Notifications
You must be signed in to change notification settings - Fork 169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hard deleting products doesn't hard delete it's variant and purchasable #1186
Comments
The delete events should also transfer if an element is hard/soft-deleted. A related issue is with Neo: see https://github.com/spicywebau/craft-neo/blob/master/src/Field.php#L678-L690 |
👀 |
To get around this i'm just additionally hard deleting variants before I delete their products. Craft version: 3.4.9 Craft::$app->getElements()->deleteElement($variant, true) |
Yes this is our current approach as well |
cc @lukeholder |
Thanks, will get this fixed. |
This has been fixed for the next release. Thank you for bringing this to our attention. A fix has been pushed and will be included in the next release. To get this early, change your craftcms/commerce requirement in composer.json to:
Then run Thanks. |
Description
Hard deleting products only hard deletes the product itself and not the purchasable + variant.
This in turn leads to users not being able to use the same SKU after the product has been hard deleted.
Steps to reproduce
Additional info
The text was updated successfully, but these errors were encountered: