acf-child-post-field icon indicating copy to clipboard operation
acf-child-post-field copied to clipboard

Fixed bugs / mishandling of redundant child rows

Open wuhhh opened this issue 6 years ago • 0 comments

The update_value function has been updated so that redundant children (those removed from the repeater) are handled and removed properly. Previously there were multiple issues with handling of post deletion and db update when repeater rows were removed. For example, adding two children then removing just the first would cause the second post to be deleted while retaining its record in the database.

Redundant meta data wasn't being deleted because acf_delete_value expects a field and a key was being passed. Updated to instead use two calls to acf_delete_metadata - one to delete the actual value and one to delete the hidden reference.

wuhhh avatar Jan 10 '19 16:01 wuhhh