diff --git a/woocommerce/changelog.txt b/woocommerce/changelog.txt index 3d7b4af50..db9446c8c 100644 --- a/woocommerce/changelog.txt +++ b/woocommerce/changelog.txt @@ -1,6 +1,7 @@ *** SkyVerge WooCommerce Plugin Framework Changelog *** 2026.nn.nn - version 6.2.1 +* Fix - Protect against `ScriptHelper` fatal errors on plugin upgrades 2026.04.16 - version 6.2.0 * New - Added REST API support to Abilities for automatic route registration diff --git a/woocommerce/class-sv-wc-admin-notice-handler.php b/woocommerce/class-sv-wc-admin-notice-handler.php index 95e23cc3f..3410c2e0f 100644 --- a/woocommerce/class-sv-wc-admin-notice-handler.php +++ b/woocommerce/class-sv-wc-admin-notice-handler.php @@ -252,6 +252,11 @@ public function render_admin_notice_js() { return; } + // Bail if the script helper class does not exist. This can occur in the middle of plugin upgrades. + if (! class_exists(ScriptHelper::class)) { + return; + } + $plugin_slug = $this->get_plugin()->get_id_dasherized(); self::$admin_notice_js_rendered = true;