Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
When deleting tax type, its children (tax rates) will get orphaned.
Same thing with tax rates. When tax rate gets deleted, its children (tax rate amounts) will get orphaned.
Proposed resolution
On \Drupal\commerce_tax\Entity\TaxType::postDelete()
and \Drupal\commerce_tax\Entity\TaxRate::postDelete()
call its children and delete them.
Comments
Comment #2
iMiksuPull request: https://github.com/commerceguys/commerce/pull/254
Comment #3
bojanz CreditAttribution: bojanz at Centarro commentedMerged, thanks!