From 90a4fb5e6ad677490e27e3f665940e808da5c568 Mon Sep 17 00:00:00 2001 From: Barry Hughes <3594411+barryhughes@users.noreply.github.com> Date: Wed, 18 Sep 2024 15:12:03 -0700 Subject: [PATCH] Fix reference to `WC_Site_Tracking`. --- .../woocommerce/changelog/fix-unqualified-wc_site_tracking | 4 ++++ plugins/woocommerce/src/Admin/Notes/Notes.php | 2 ++ 2 files changed, 6 insertions(+) create mode 100644 plugins/woocommerce/changelog/fix-unqualified-wc_site_tracking diff --git a/plugins/woocommerce/changelog/fix-unqualified-wc_site_tracking b/plugins/woocommerce/changelog/fix-unqualified-wc_site_tracking new file mode 100644 index 00000000000..eaeb680842f --- /dev/null +++ b/plugins/woocommerce/changelog/fix-unqualified-wc_site_tracking @@ -0,0 +1,4 @@ +Significance: patch +Type: fix + +Prevent fatals resulting from incorrect reference to `WC_Site_Tracking` during admin notes API requests. diff --git a/plugins/woocommerce/src/Admin/Notes/Notes.php b/plugins/woocommerce/src/Admin/Notes/Notes.php index 8a7c6ccd2c2..7ec1903aa19 100644 --- a/plugins/woocommerce/src/Admin/Notes/Notes.php +++ b/plugins/woocommerce/src/Admin/Notes/Notes.php @@ -5,6 +5,8 @@ namespace Automattic\WooCommerce\Admin\Notes; +use WC_Site_Tracking; + if ( ! defined( 'ABSPATH' ) ) { exit; }