Skip to content

Conversation

@adekbadek
Copy link
Member

@adekbadek adekbadek commented Aug 20, 2025

All Submissions:

Changes proposed in this Pull Request:

Fixes an issue where images in a WooCommerce block with pagination ("Hand-picked Products") had images not loaded when updating the page. This was caused by Perfmatters' optimisation, which was not handled by WC.

How to test the changes in this Pull Request:

  1. On trunk, make sure you have Perfmatters and WooCommerce active
  2. Add a Campaigns' prompt containing a paginated "Hand-picked Products" block. The pages of the pagination should all include at least two products with images
  3. Visit the front-end, observe that on pages other than the one loaded on page load, the images are empty (or only the first one is loaded)
  4. Switch to this branch, observe images loading fine when progressing in pagination

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully ran tests with your changes locally?

@adekbadek adekbadek added the [Status] Needs Review The issue or pull request needs to be reviewed label Aug 20, 2025
@adekbadek adekbadek requested a review from a team as a code owner August 20, 2025 09:27
Copy link
Member

@miguelpeixe miguelpeixe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm unsure if this change is having the intended effect.

In this branch or in trunk with Perfmatters, I can retrieve the thumbnail when changing pages, as long as I don't have a cached version before adding a thumbnail to the product.

If I navigate to a page with a product without a thumbnail, and set a thumbnail, it won't fetch it after navigating to the page again. There's no xhr/fetch request either, so I'm assuming there's some frontend cache at the WC block level.

@adekbadek
Copy link
Member Author

adekbadek commented Sep 2, 2025

I've re-tested locally and the setup is a bit more complicated. I've edited the testing steps.

@github-actions github-actions bot added [Status] Approved The pull request has been reviewed and is ready to merge and removed [Status] Needs Review The issue or pull request needs to be reviewed labels Oct 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Status] Approved The pull request has been reviewed and is ready to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants