From 0a7f6ac069272e465f573710c8488b7fa4589cf2 Mon Sep 17 00:00:00 2001 From: Daryll Doyle Date: Tue, 17 Dec 2024 11:29:39 +0000 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20render=20the=20plugin=20update?= =?UTF-8?q?=20notices=20on=20VIP=20as=20they=E2=80=99re=20duplicated?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #160 --- includes/classes/Plugins/Plugins.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/includes/classes/Plugins/Plugins.php b/includes/classes/Plugins/Plugins.php index 10aab88..8036800 100644 --- a/includes/classes/Plugins/Plugins.php +++ b/includes/classes/Plugins/Plugins.php @@ -172,6 +172,18 @@ public function plugin_deactivation_warning() { * constant it is not possible to update any plugin. */ public function set_plugin_update_actions() { + + /** + * VIP has it's own update notification system that performs this same logic. + * + * As such, if we're on a VIP environment, we should not run this logic. + * + * See: https://github.com/Automattic/vip-go-mu-plugins/blob/develop/codebase-manager/plugins/plugins-manager.php#L65-L77 + */ + if ( defined( 'VIP_GO_APP_ENVIRONMENT' ) ) { + return; + } + $plugins = get_site_transient( 'update_plugins' ); if ( isset( $plugins->response ) && is_array( $plugins->response ) ) {