Commit 3cc4d749d9 for woocommerce

commit 3cc4d749d94c8cb5c4cef9b0eb476b9c117c5a56
Author: Michal Iwanow <4765119+mcliwanow@users.noreply.github.com>
Date:   Tue Nov 4 16:44:46 2025 +0100

    Flush product usage notice cache after plugin activation (#61606)

    * Flush product usage notice cache after plugin activation

    Usage notice can be incorrectly displayed after user connects their subscription to WCCOM. We should flush its cache upon subscription activation/deactivation.

    * Add changefile(s) from automation for the following project(s): woocommerce

    * Update plugins/woocommerce/includes/admin/helper/class-wc-helper.php

    Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

    * Update plugins/woocommerce/changelog/61606-fix-wccom-1883-race-condition-flush_product_usage_notice_rules_cache-not

    Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

    * Add changefile(s) from automation for the following project(s): woocommerce

    ---------

    Co-authored-by: github-actions <github-actions@github.com>
    Co-authored-by: Thilina Pituwala <thilina.hasantha@gmail.com>
    Co-authored-by: Boro Sitnikovski <buritomath@gmail.com>
    Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

diff --git a/plugins/woocommerce/changelog/61606-fix-wccom-1883-race-condition-flush_product_usage_notice_rules_cache-not b/plugins/woocommerce/changelog/61606-fix-wccom-1883-race-condition-flush_product_usage_notice_rules_cache-not
new file mode 100644
index 0000000000..b40cc7bf0b
--- /dev/null
+++ b/plugins/woocommerce/changelog/61606-fix-wccom-1883-race-condition-flush_product_usage_notice_rules_cache-not
@@ -0,0 +1,4 @@
+Significance: patch
+Type: fix
+
+Flush subscription usage cache when WooCommerce.com license is activated
\ No newline at end of file
diff --git a/plugins/woocommerce/includes/admin/helper/class-wc-helper.php b/plugins/woocommerce/includes/admin/helper/class-wc-helper.php
index 211272051a..69d7e7f630 100644
--- a/plugins/woocommerce/includes/admin/helper/class-wc-helper.php
+++ b/plugins/woocommerce/includes/admin/helper/class-wc-helper.php
@@ -1187,6 +1187,7 @@ class WC_Helper {

 		self::_flush_subscriptions_cache();
 		self::_flush_updates_cache();
+		self::flush_product_usage_notice_rules_cache();

 		return $activated;
 	}
@@ -1310,6 +1311,8 @@ class WC_Helper {
 		}

 		self::_flush_subscriptions_cache();
+		self::_flush_updates_cache();
+		self::flush_product_usage_notice_rules_cache();

 		return $deactivated;
 	}