Skip to content

Commit

Permalink
Jetpack Sync: Stop syncing 'automatic_updates_complete' actions (#39296)
Browse files Browse the repository at this point in the history
* Jetpack Sync: Stop syncing 'automatic_updates_complete' actions
  • Loading branch information
fgiannar committed Sep 9, 2024
1 parent 82cf82a commit 1662c02
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 21 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: removed

Jetpack Sync: Stop syncing 'automatic_updates_complete' actions
2 changes: 0 additions & 2 deletions projects/packages/sync/src/modules/class-updates.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,6 @@ public function init_listeners( $callable ) {
2
);

add_action( 'automatic_updates_complete', $callable );

if ( is_multisite() ) {
add_filter( 'pre_update_site_option_wpmu_upgrade_site', array( $this, 'update_core_network_event' ), 10, 2 );
add_action( 'jetpack_sync_core_update_network', $callable, 10, 3 );
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: other
Comment: Jetpack plugin: Update unit tests


Original file line number Diff line number Diff line change
Expand Up @@ -202,25 +202,6 @@ public function test_sync_wp_version() {
$this->assertEquals( 'bar', $this->server_replica_storage->get_callable( 'wp_version' ) );
}

public function test_automatic_updates_complete_sync_action() {
// Commenting this out for now. wp_maybe_auto_update();
do_action(
'automatic_updates_complete',
array(
'core' => array(
'item' => array( 'somedata' ),
'result' => 'some more data',
'name' => 'WordPress 4.7',
'messages' => array( 'it worked.' ),
),
)
);
$this->sender->do_sync();

$event = $this->server_event_storage->get_most_recent_event( 'automatic_updates_complete' );
$this->assertTrue( (bool) $event );
}

public function test_network_core_update_sync_action() {
if ( ! is_multisite() ) {
$this->markTestSkipped( 'Not compatible with single site mode' );
Expand Down

0 comments on commit 1662c02

Please sign in to comment.