Skip to content

Commit

Permalink
do not autoupdate plugins immeditately after they are fetched
Browse files Browse the repository at this point in the history
  • Loading branch information
vykes-mac committed Nov 6, 2024
1 parent a203a91 commit 886ce72
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions client/state/plugins/installed/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -608,15 +608,6 @@ export function fetchSitePlugins( siteId ) {
const receivePluginsDispatchSuccess = ( data ) => {
dispatch( receiveSitePlugins( siteId, data.plugins ) );
dispatch( { ...defaultAction, type: PLUGINS_REQUEST_SUCCESS } );

data.plugins.map( ( plugin ) => {
if (
pluginHasTruthySiteProp( 'update', plugin, siteId ) &&
pluginHasTruthySiteProp( 'autoupdate', plugin, siteId )
) {
updatePlugin( siteId, plugin )( dispatch );
}
} );
};

const receivePluginsDispatchFail = ( error ) => {
Expand All @@ -643,20 +634,6 @@ export function fetchAllPlugins() {
dispatch( { type: PLUGINS_ALL_REQUEST_SUCCESS } );

dispatch( receiveAllSitesPlugins( sites ) );

Object.entries( sites ).forEach( ( [ siteId, plugins ] ) => {
// Cast the enumerable string-keyed property to a number.
siteId = Number( siteId );

plugins.forEach( ( plugin ) => {
if (
pluginHasTruthySiteProp( 'update', plugin, siteId ) &&
pluginHasTruthySiteProp( 'autoupdate', plugin, siteId )
) {
updatePlugin( siteId, plugin )( dispatch );
}
} );
} );
};

const receivePluginsDispatchFail = ( error ) => {
Expand Down

0 comments on commit 886ce72

Please sign in to comment.