Skip to content

[Backport to release/11.3] Fix Interactivity API directive IDs for WordPress 7.2 - #70087

Merged
gigitux merged 1 commit into
release/11.3from
cherry-pick-PR70076-to-release/11.3
Oct 21, 2026
Merged

gigitux merged 1 commit into
release/11.3from
cherry-pick-PR70076-to-release/11.3

Conversation

@woocommercebot

Copy link
Copy Markdown
Collaborator

This PR is a cherry-pick of #70076 to release/11.3.

Original PR Description

Submission Review Guidelines:

Changes proposed in this Pull Request:

Gutenberg PR #84098 removes support for two-hyphen unique IDs on Interactivity API lifecycle directives, so WordPress 7.2 skips WooCommerce callbacks using data-wp-init--id and data-wp-watch--id. The syntax was announced in the WordPress 6.9 developer note.

I discovered this issue fixing E2E tests failure on this job: https://github.com/woocommerce/woocommerce/actions/runs/39537238981

Screenshots or screen recordings:

Restores existing storefront behavior; no visual design changes.

How to test the changes in this Pull Request:

  1. Ensure that the CI is green

  2. Run these five regression tests against WordPress 7.2:

WP_ENV_CORE=https://wordpress.org/wordpress-7.2-beta1.zip \
WP_ENV_PHP_VERSION=8.3
pnpm --filter=@woocommerce/plugin-woocommerce env:start:blocks

WP_ENV_CORE=https://wordpress.org/wordpress-7.2-beta1.zip \
WP_ENV_PHP_VERSION=8.3 \
pnpm --filter=@woocommerce/plugin-woocommerce test:e2e:blocks:serial \
  tests/e2e/tests/blocks/add-to-cart-with-options/add-to-cart-with-options.block_theme.spec.ts \
  tests/e2e/tests/blocks/product-filters/product-filters-frontend.block_theme.spec.ts \
  tests/e2e/tests/blocks/product-gallery/inner-blocks/product-gallery-large-image/product-gallery-large-image.block_theme.spec.ts \
  tests/e2e/tests/blocks/product-gallery/inner-blocks/product-gallery-thumbnails/product-gallery-thumbnails.block_theme.spec.ts 
```

Testing that has already taken place:

  • Docker wp-env, PHP 8.3, block theme, and WooCommerce sample products on WordPress 7.2 beta 1 and 7.1. The focused branch's seven PHP files were mounted into the test environment independently of the other changes in Restore block compatibility with WordPress 7.2 #70075.
  • Existing E2E regressions passed on both versions: variation validation/add-to-cart, synchronizing multiple Product Filters blocks, both variable-product gallery flows, thumbnail overflow, and Mini-Cart item counts (six test cases per version, plus setup).
  • lint:php:changes, lint:changes:branch, and PHPStan for all seven PHP files passed. No PHPStan baseline changes. git diff --check is clean.
  • Multisite, third-party extensions, and gallery video playback were not tested. No database, option, hook, or install-path changes.

Milestone

Note: Check the box above to have the milestone automatically assigned when merged.
Alternatively (e.g. for point releases), manually assign the appropriate milestone.

Changelog entry

  • Automatically create a changelog entry from the details below.
  • This Pull Request does not require a changelog entry. (Comment required below)
Changelog Entry Details

Significance

  • Patch
  • Minor
  • Major

Type

  • Fix - Fixes an existing bug
  • Add - Adds functionality
  • Update - Update existing functionality
  • Dev - Development related task
  • Tweak - A minor adjustment to the codebase
  • Performance - Address performance issues
  • Enhancement - Improvement to existing functionality

Message

Changelog Entry Comment

Comment

Created manually.

Use of AI Tools

Codex extracted the directive fixes from #70075 and assisted with the changelog, PR description, and local validation. Independent human review is pending.

* Fix deprecated Interactivity API lifecycle directive IDs

* Add changelog for Interactivity API compatibility fix
@woocommercebot
woocommercebot requested a review from a team as a code owner October 21, 2026 13:38
@woocommercebot
woocommercebot requested review from gigitux and tjcafferkey and removed request for a team October 21, 2026 13:38
@github-actions github-actions Bot added the plugin: woocommerce Issues related to the WooCommerce Core plugin. label Oct 21, 2026
@woocommercebot woocommercebot added this to the 11.3.0 milestone Oct 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Testing Guidelines

Hi @gigitux @tjcafferkey ,

Apart from reviewing the code changes, please make sure to review the testing instructions (Guide) and verify that relevant tests (E2E, Unit, Integration, etc.) have been added or updated as needed.

Reminder: PR reviewers are required to document testing performed. This includes:

  • 🖼️ Screenshots or screen recordings.
  • 📝 List of functionality tested / steps followed.
  • 🌐 Site details (environment attributes such as hosting type, plugins, theme, store size, store age, and relevant settings).
  • 🔍 Any analysis performed, such as assessing potential impacts on environment attributes and other plugins, conducting performance profiling, or using LLM/AI-based analysis.

⚠️ Within the testing details you provide, please ensure that no sensitive information (such as API keys, passwords, user data, etc.) is included in this public issue.

@github-actions

Copy link
Copy Markdown
Contributor

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 commit that changes plugin code.

@gigitux
gigitux merged commit 1f0992f into release/11.3 Oct 21, 2026
44 of 46 checks passed
@gigitux
gigitux deleted the cherry-pick-PR70076-to-release/11.3 branch October 21, 2026 14:00
@github-actions github-actions Bot added the metric: feature freeze exception A tracking label for PRs that were merged after the feature freeze. label Oct 21, 2026
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.

2 participants