Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion woocommerce/Plugin/Lifecycle.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,10 @@ public function handle_activation() {
public function handle_deactivation() {

// if the enhanced admin is available, delete all of this plugin's notes on deactivation
if ( SV_WC_Plugin_Compatibility::is_enhanced_admin_available() ) {
// note: the class_exists() check needs to remain due to how the namespace changes with each framework version
// not checking can cause fatal errors in the middle of plugin upgrades
// @link https://github.com/godaddy-wordpress/wc-plugin-framework/issues/824
if ( SV_WC_Plugin_Compatibility::is_enhanced_admin_available() && class_exists( Notes_Helper::class ) ) {

Notes_Helper::delete_notes_with_source( $this->get_plugin()->get_id_dasherized() );

Expand Down
1 change: 1 addition & 0 deletions woocommerce/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
*** SkyVerge WooCommerce Plugin Framework Changelog ***

2026.nn.nn - version 6.1.5
* Fix - Protect against `Notes_Helper` fatal errors on plugin upgrades

2026.04.01 - version 6.1.4
* Fix - Remove package.json from export-ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -810,7 +810,7 @@ protected function add_gateway_not_configured_notices() {

$note->save();

} catch ( \Exception $exception ) {}
} catch ( \Throwable $exception ) {}
}

// if not an enhanced admin screen, output the legacy style notice
Expand All @@ -822,7 +822,10 @@ protected function add_gateway_not_configured_notices() {
}

// if all's well with this gateway, make sure and delete any previously added notes
} elseif ( $is_enhanced_admin_available && Admin\Notes_Helper::note_with_name_exists( $note_name ) ) {
// note: the class_exists() check needs to remain due to how the namespace changes with each framework version
// not checking can cause fatal errors in the middle of plugin upgrades
// @link https://github.com/godaddy-wordpress/wc-plugin-framework/issues/824
} elseif ( $is_enhanced_admin_available && class_exists( Admin\Notes_Helper::class ) && Admin\Notes_Helper::note_with_name_exists( $note_name ) ) {

WC_Admin_Notes::delete_notes_with_name( $note_name );
}
Expand Down
Loading