Automattic / jetpack

Security, performance, marketing, and design tools — Jetpack is made by WordPress experts to make WP sites safer and faster, and help you grow your traffic.
https://jetpack.com/
Other
1.59k stars 799 forks source link

Cron job 'jetpack_v2_heartbeat' not removed after Jetpack is deactivated #30382

Open lakellie opened 1 year ago

lakellie commented 1 year ago

Impacted plugin

Jetpack

Quick summary

A Jetpack user in the forums has reported that the cron job jetpack_v2_heartbeat is not removed after deactivation: https://wordpress.org/support/topic/wp-cron-jetpack_v2_heartbeat-not-being-removed/

Can y'all confirm whether this needs to be added to the list of things that are removed upon plugin deactivation/deletion (or if it already is included and there's perhaps something else going on here?)

Thanks!

jeherve commented 1 year ago

Can y'all confirm whether this needs to be added to the list of things that are removed upon plugin deactivation/deletion (or if it already is included and there's perhaps something else going on here?)

Yes, that's something we could add to the uninstall routine for sure, or / and to the disconnection method:

https://github.com/Automattic/jetpack/blob/210e75345653abee7954a11d3669cd56175b9ea5/projects/packages/connection/src/class-manager.php#L2000-L2007

cc @Automattic/jetpack-kernel, who may have more ideas there.

jeherve commented 1 year ago

Somewhat related:

It may be nice to do an audit of what needs to happen when Jetpack is deactivated when other Jetpack plugins are still vs. not, and ensure that we only leave what's necessary based on the situation.

bjoernzosel commented 1 year ago

I have also 2 cron jobs that I can not delete, although I deinstalled the plugin and cleaned the database:

jetpack_clean_nonces jetpack_v2_heartbeat

superbmario commented 8 months ago

I have the same issue, two cron jobs still active after Jetpack was uninstalled:

jetpack_clean_nonces jetpack_v2_heartbeat

Update: It looks like they're both present in WooCommerce. e.g. 'jetpack_v2_heartbeat' is identified in woocommerce/vendor/automattic/jetpack-connection/src/class-heartbeat.php file.

Does anyone know it can be safely removed?