Skip to content

Commit

Permalink
Don’t render the plugin update notices on VIP as they’re duplicated
Browse files Browse the repository at this point in the history
Closes #160
  • Loading branch information
darylldoyle committed Dec 17, 2024
1 parent 59bbef0 commit 0a7f6ac
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions includes/classes/Plugins/Plugins.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) ) {
Expand Down

0 comments on commit 0a7f6ac

Please sign in to comment.