Commit 119f5ab1f98 for woocommerce

commit 119f5ab1f98507e7367595446570f8bb49cf83f7
Author: Vasily Belolapotkov <vasily.belolapotkov@automattic.com>
Date:   Tue Sep 15 14:39:55 2026 +0200

    Fix fetch_patterns action left scheduled after uninstall (#68699)

    Cancel the recurring fetch_patterns action on uninstall

    PTKPatternsStore already cancels this action on `deactivated_plugin`, but
    it is the only service scheduling a recurring action that is instantiated
    conditionally (admin and REST requests only). A WP-CLI deactivation never
    registers that callback, so the daily action survives deactivation and the
    uninstall sweep did not list it.

    The group is passed because `fetch_patterns` is not namespaced, and an
    unscoped cancel would also remove another plugin's action of that name.

diff --git a/plugins/woocommerce/uninstall.php b/plugins/woocommerce/uninstall.php
index cf16e329534..26973b4314f 100644
--- a/plugins/woocommerce/uninstall.php
+++ b/plugins/woocommerce/uninstall.php
@@ -84,6 +84,14 @@ if ( class_exists( ActionScheduler::class ) && ActionScheduler::is_initialized()
 	as_unschedule_all_actions( 'woocommerce_cleanup_rate_limits_wrapper' );
 	as_unschedule_all_actions( 'wc_admin_daily_wrapper' );
 	as_unschedule_all_actions( 'generate_category_lookup_table_wrapper' );
+
+	/*
+	 * PTKPatternsStore cancels this itself on `deactivated_plugin`, but it is only instantiated for
+	 * admin and REST requests, so a WP-CLI deactivation never registers that callback and leaves the
+	 * recurring action behind. The group is passed because `fetch_patterns` is not namespaced and an
+	 * unscoped call would cancel another plugin's action of the same name.
+	 */
+	as_unschedule_all_actions( 'fetch_patterns', array(), 'woocommerce' );
 }

 /*