Repository navigation
[Backport to release/11.3] Fix Interactivity API directive IDs for WordPress 7.2 - #70087
Conversation
* Fix deprecated Interactivity API lifecycle directive IDs * Add changelog for Interactivity API compatibility fix
Testing GuidelinesHi @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:
|
Test using WordPress PlaygroundThe changes in this pull request can be previewed and tested using a WordPress Playground instance. 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. |
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--idanddata-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:
Ensure that the CI is green
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
Testing that has already taken place:
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.lint:php:changes,lint:changes:branch, and PHPStan for all seven PHP files passed. No PHPStan baseline changes.git diff --checkis clean.Milestone
Automatically assign milestone for the next WooCommerce versionChangelog 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
Type
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.