Check that the possibly_add_note function exists before calling it (https://github.com/woocommerce/woocommerce-admin/pull/4680)
Co-authored-by: Rebecca Scott <me@becdetat.com>
This commit is contained in:
parent
1649706b22
commit
89342be595
|
@ -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, '<' ) ) {
|
||||
if ( method_exists( $update_version, 'possibly_add_note' ) ) {
|
||||
$update_version::possibly_add_note();
|
||||
}
|
||||
} else {
|
||||
$update_version::delete_note();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue