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

Avoid empty meta fields #3521

Merged
merged 3 commits into from
Jul 4, 2023
Merged

Avoid empty meta fields #3521

merged 3 commits into from
Jul 4, 2023

Conversation

MARQAS
Copy link
Contributor

@MARQAS MARQAS commented Jun 30, 2023

Description of the Change

This PR will delete the meta fields when it is not set instead of updating the meta with false or empty value

Closes #3490

How to test the Change

  • Create a post without setting the Exclude from search option in the post
  • Check the post meta and notice that it should be empty if it is not set

Changelog Entry

Changed - Update post metas only if they are set or have some value

Credits

Props @MARQAS

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

@felipeelia felipeelia added this to the 4.6.1 milestone Jul 4, 2023
@felipeelia felipeelia merged commit 6ae5246 into develop Jul 4, 2023
@felipeelia felipeelia deleted the fix/3490-empty-meta-fields branch July 4, 2023 14:30
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.

avoid empty meta fields that bloat post_meta table
2 participants