Skip to content

Conversation

@woocommercebot
Copy link
Collaborator

This PR is a cherry-pick of #61205 to release/10.3.

Original PR Description

Submission Review Guidelines:

Changes proposed in this Pull Request:

(For Bug Fixes) Bug introduced in PR #60223

Since #60223, We always load legacy single product assets when using the Classic Template block. This is our effort to improve the frontend performance of the single product page for block themes (by not loading legacy assets by default).

However, this poses an issue for users of the Classic Template block, as they can not opt out of legacy gallery assets anymore using remove_theme_support. To resolve this, this PR follows the @Aljullu brilliant suggestion to let us respect theme supports on block themes.

How to test the changes in this Pull Request:

Using the WooCommerce Testing Instructions Guide, include your detailed testing instructions:

  1. Add this snippet to the test site:
remove_theme_support( 'wc-product-gallery-zoom' );
remove_theme_support( 'wc-product-gallery-lightbox' );
remove_theme_support( 'wc-product-gallery-slider' );
  1. Ensure the single product template use Classic Template block.
<!-- wp:template-part {"slug":"header","tagName":"header"} /-->
<!-- wp:group {"tagName":"main","layout":{"inherit":true}} -->
<main class="wp-block-group"><!-- wp:woocommerce/legacy-template {"template":"single-product"} /--></main>
<!-- /wp:group -->
<!-- wp:template-part {"slug":"footer","tagName":"footer"} /-->
  1. Visit a product on the frontend, confirm the legacy gallery assets isn't loaded.

@github-actions github-actions bot added this to the 10.3.0 milestone Nov 6, 2025
@github-actions github-actions bot added the plugin: woocommerce Issues related to the WooCommerce Core plugin. label Nov 6, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 6, 2025

Test using WordPress Playground

The changes in this pull request can be previewed and tested using a WordPress Playground instance.
WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Test this pull request with WordPress Playground.

Note that this URL is valid for 30 days from when this comment was last updated. You can update it by closing/reopening the PR or pushing a new commit.

Copy link
Contributor

@Aljullu Aljullu left a comment

Choose a reason for hiding this comment

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

In addition to the original steps, I also tested this:

  1. Install WooCommerce Additional Variation Images.
  2. Enable a block theme.
  3. With Firefox or Safari, go to the frontend of a variable product and select one variation.
  4. Verify the variation image is not blurry.

Before:

Enregistrament.de.pantalla.a.2025-11-06.15-52-13.mp4

After:

Enregistrament.de.pantalla.a.2025-11-06.15-53-30.mp4

See STRPROD-648 for more details.

@dinhtungdu
Copy link
Member

Most E2E tests with 6.9 beta have failed, I'm investigating..

@Aljullu
Copy link
Contributor

Aljullu commented Nov 10, 2025

@dinhtungdu I believe that's expected because 10.3 doesn't have the updated tests for WP 6.9. You can see the same tests failing in this other unrelated PR: #61841. Also, beta 3 included template activation, which has been reverted in beta 4.

@jorgeatorres jorgeatorres merged commit 871a387 into release/10.3 Nov 10, 2025
86 of 102 checks passed
@jorgeatorres jorgeatorres deleted the cherry-pick-PR61205-to-release/10.3 branch November 10, 2025 13:45
@github-actions github-actions bot added the metric: feature freeze exception A tracking label for PRs that were merged after the feature freeze. label Nov 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

metric: feature freeze exception A tracking label for PRs that were merged after the feature freeze. plugin: woocommerce Issues related to the WooCommerce Core plugin.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants