Jetpack activation fatals with Heartbeat::get_active_plugins() undefined when WooCommerce's older bundled connection package is already loaded
Maintainers usually reply within 1 day
@jamesckemp is already working on this.
Since Sep 29, 2026.
Assessment
This issue has not been assessed yet.
Description
Impacted plugin
Jetpack (plugin build 16.3-a.1 as served by Pressable's platform channel; the connection package involved is automattic/jetpack-connection 8.7.9 or later)
Quick summary
wp plugin activate jetpack on a site where WooCommerce 10.9.4 is already active dies inside the activation hook with:
Call to undefined method Automattic\Jetpack\Heartbeat::get_active_plugins()
Heartbeat::get_active_plugins() was added to the connection package in 8.7.9 (2026-07-20, #50006) and is called from class.jetpack.php. WooCommerce 10.9.4 (2026-07-07) bundles automattic/jetpack-connection v6.19.2 and automattic/jetpack-autoloader v5.0.0, which predate it. When Jetpack's activation hook runs, the Heartbeat class that is already loaded in the request is WooCommerce's 6.19.2 copy, and PHP cannot swap it for Jetpack's own newer package. On the next normal page load the autoloader selects Jetpack's package and everything works, so this only bites during activation.
Steps to reproduce
- Site with WooCommerce 10.9.4 active and Jetpack installed but inactive. Seen on a Pressable staging site, WordPress 7.1, PHP 8.5.10, Jetpack 16.3-a.1 installed by the platform.
wp plugin activate jetpack- Observe the fatal above and the activation aborting.
wp --skip-plugins=woocommerce plugin activate jetpacksucceeds. Subsequent loads with both plugins active are fine.
Honest caveat: an earlier activation on the same site with the same WooCommerce and Jetpack versions did not fatal. I have one reproduction and one non-reproduction and did not establish the difference. A plausible one is whether WooCommerce had already instantiated Heartbeat earlier in that request, since the failure needs the old class to be loaded before Jetpack's hook runs.
Site owner impact
Activating Jetpack from WP-CLI, or from any code path that activates it while WooCommerce is already active, fails with a fatal until the operator knows to skip WooCommerce for that one command. The site keeps serving; the activation is what aborts. This is the common order of operations after any full-database push that resets active_plugins.
Severity
Medium
What other impact(s) does this issue have?
Any other plugin that bundles a connection package older than 8.7.9 can produce the same result. Admin-UI activation was not tested; the autoloader has request-action detection for that path that WP-CLI does not trigger, so the two may differ.
If a workaround is available, please outline it here.
wp --skip-plugins=woocommerce plugin activate jetpack, then load the site normally.
Suggested fix on the Jetpack side: guard the activation-time call with method_exists( Heartbeat::class, 'get_active_plugins' ), or defer the environment-stats work out of the activation hook to the next load, when the autoloader has selected Jetpack's own package.
Platform (Simple and/or Atomic)
Neither. Pressable-hosted site (self-hosted-style install with the platform-provided Jetpack build). Site identifiers available privately on request.
- Dominant language
- PHP
- Stars
- 1.9k
- Forks
- 913
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 809
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Automattic/jetpack
-
Bug Needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Automattic/jetpack#55870 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Automattic/jetpack#55385 · 1 comment ·
Maintainers usually reply within 1 day
-
WAF: jetpack_waf_blocklog is created without the site's charset and collationPossibly taken @jwebbdev claimed this 3 days ago. Open[Plugin] Protect Bug Customer Report
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Automattic/jetpack#55365 · 1 assignee ·
Maintainers usually reply within 1 day
-
[Package] Stats Admin [Type] Bug
Difficulty 1/5 Under an hour Newbie friendliness 86/100
Automattic/jetpack#54188 ·
Maintainers usually reply within 1 day
-
Bug Needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Automattic/jetpack#53467 ·
Maintainers usually reply within 1 day
All issues in Automattic/jetpack
Similar issues
-
follow-up
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Invoice reminders more than a month after the due date, and bill reminders more than a month before it, are not sentPossibly taken @officialasishkumar claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Automattic/blocks-engine#7881 ·
Maintainers usually reply within 1 day
-
[FrameworkBundle] MicroKernelTrait lists BundleAdapter instead of the bundle class in kernel.bundlesPossibly taken A pull request linked to this issue is open or already merged. OpenBug FrameworkBundle Status: Needs Review
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
[Flaky Test] testMonitorCallbackReturnExitsPossibly taken @uintaam claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
valkey-io/valkey-glide-php#515 ·
Maintainers usually reply within 4 days