Skip to content
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

If delete all meta is set, make sure to delete associated post meta f… #2483

Merged
merged 4 commits into from
Dec 4, 2021

Conversation

oscarssanchez
Copy link
Contributor

…rom other posts

Description of the Change

Fixes #2461

There's a special case where if $delete_all is set (and it should be set if deleting an attachment for example) associated meta from other posts with the deleted post should be deleted as well.

Currently there's no action to know if this took place, but there's a filter which can be used to know the value of $delete_all to set a new property of the sync manager to later be used. As we will not be deleting post meta from a specific post, but all meta that's on a post and in the ES index, the PR retrieves the ES post that should not be updated yet, and simply reindexes it.

Alternate Designs

Benefits

Possible Drawbacks

Verification Process

Checklist:

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests passed.

Applicable Issues

Changelog Entry

@mckdemps mckdemps added this to the 4.0.0 (beta 1) milestone Dec 2, 2021
@felipeelia felipeelia changed the base branch from develop to 4.x.x December 3, 2021 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: Calling wp_delete_attachment will break action_queue_meta_sync
3 participants