Description
acf_remove_local_field_group() (includes/local-fields.php:283) removes only the group from the local-groups store; the fields registered under it remain in the local-fields store as orphans — still discoverable by key/name lookups after their group is gone.
Reproduction
Repro test in #450: tests/php/includes/test-local-fields.php::test_remove_local_field_group_leaves_fields_registered.
Suggested fix
Cascade removal of child fields (recursively, covering sub-fields) when the group is removed — or document the asymmetry if it is intentional.
Found during the 2026-06 test campaign (see PR #450).
Description
acf_remove_local_field_group()(includes/local-fields.php:283) removes only the group from thelocal-groupsstore; the fields registered under it remain in thelocal-fieldsstore as orphans — still discoverable by key/name lookups after their group is gone.Reproduction
Repro test in #450:
tests/php/includes/test-local-fields.php::test_remove_local_field_group_leaves_fields_registered.Suggested fix
Cascade removal of child fields (recursively, covering sub-fields) when the group is removed — or document the asymmetry if it is intentional.
Found during the 2026-06 test campaign (see PR #450).