BUG: Thumbnails are not removed from indexed WooCommerce Products when the attachments are deleted #3254
Closed
Description
Describe the bug
When deleting an attachment the _thumbnail_id
meta is removed from any posts that used the image as a featured image. Indexed posts should be updated to reflect this change, but when deleting an attachment that is used as the featured image of a WooCommerce Product the indexed Product is not updated. Posts are updating as expected.
Steps to Reproduce
- Upload an image attachment.
- Create two Products, set the uploaded attachment as the featured image for both.
- Check the indexed Products, they should include metadata containing the thumbnail ID.
- Delete the attachment.
- Check the indexed Products, they will still include metadata containing the thumbnail ID.
Screenshots, screen recording, code snippet
No response
Environment information
No response
WordPress and ElasticPress information
No response
Code of Conduct
- I agree to follow this project's Code of Conduct