Skip to content

Commit 85b6231

Browse files
authored
Enable WordPress auto-updates when enabled for a site (#2262)
1 parent 80f46b7 commit 85b6231

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

common/lib/mu-plugins.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ function getStandardMuPlugins( options: MuPluginOptions ): MuPlugin[] {
245245
`,
246246
} );
247247

248-
// Disable auto-updates if configured
248+
// Configure auto-updates based on Studio settings
249249
if ( ! options.isWpAutoUpdating ) {
250250
muPlugins.push( {
251251
filename: '0-disable-auto-updates.php',
@@ -256,6 +256,16 @@ function getStandardMuPlugins( options: MuPluginOptions ): MuPlugin[] {
256256
add_filter( 'allow_major_auto_core_updates', '__return_false' );
257257
`,
258258
} );
259+
} else {
260+
muPlugins.push( {
261+
filename: '0-enable-auto-updates.php',
262+
content: `<?php
263+
// Enable auto-updates
264+
add_filter( 'allow_dev_auto_core_updates', '__return_true' );
265+
add_filter( 'allow_minor_auto_core_updates', '__return_true' );
266+
add_filter( 'allow_major_auto_core_updates', '__return_true' );
267+
`,
268+
} );
259269
}
260270

261271
// HTTP request timeout

0 commit comments

Comments
 (0)