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

Fix: Thumbnails are not removed from indexed WooCommerce Products whe… #3267

Merged
merged 4 commits into from
Jan 20, 2023

Conversation

burhandodhy
Copy link
Contributor

Description of the Change

This PR fixes the issue where removing the thumbnails doesn't update the indexed WooCommerce Product. The issue was that query only look for the post where it should look for all the indexable posts.

Closes #3254

How to test the Change

  1. Upload an image attachment.
  2. Create two Products, set the uploaded attachment as the featured image for both.
  3. Check the indexed Products, they should include metadata containing the thumbnail ID.
  4. Delete the attachment.
  5. Check the indexed Products, they should not have the thumnail meta

Changelog Entry

Fixed - Thumbnails are not removed from indexed WooCommerce Products when the attachments are deleted

Credits

Props @burhandodhy @JakePT

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.5.0 milestone Jan 20, 2023
@felipeelia felipeelia merged commit 9404270 into develop Jan 20, 2023
@felipeelia felipeelia deleted the fix/3254 branch January 20, 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.

BUG: Thumbnails are not removed from indexed WooCommerce Products when the attachments are deleted
2 participants