From 89342be595bedece5e0977f8f634238ca74aabf4 Mon Sep 17 00:00:00 2001 From: Bec Scott Date: Thu, 25 Jun 2020 06:38:43 +1000 Subject: [PATCH] Check that the possibly_add_note function exists before calling it (https://github.com/woocommerce/woocommerce-admin/pull/4680) Co-authored-by: Rebecca Scott --- plugins/woocommerce-admin/src/Package.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/woocommerce-admin/src/Package.php b/plugins/woocommerce-admin/src/Package.php index ede1468ab73..8b990df796f 100644 --- a/plugins/woocommerce-admin/src/Package.php +++ b/plugins/woocommerce-admin/src/Package.php @@ -53,7 +53,9 @@ class Package { self::$active_version = WC_ADMIN_VERSION_NUMBER; $update_version = new WC_Admin_Notes_Deactivate_Plugin(); if ( version_compare( WC_ADMIN_VERSION_NUMBER, self::VERSION, '<' ) ) { - $update_version::possibly_add_note(); + if ( method_exists( $update_version, 'possibly_add_note' ) ) { + $update_version::possibly_add_note(); + } } else { $update_version::delete_note(); }