Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Eliminate varying URL Metrics by logged-in state
  • Loading branch information
westonruter committed Jan 10, 2025
commit 8737c8f35872f2d3c5f7c25596c95af07f363566
5 changes: 0 additions & 5 deletions plugins/optimization-detective/storage/data.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,6 @@ function od_get_normalized_query_vars(): array {
);
}

// Vary URL Metrics by whether the user is logged in since additional elements may be present.
if ( is_user_logged_in() ) {
$normalized_query_vars['user_logged_in'] = true;
}

return $normalized_query_vars;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public function data_provider_test_od_get_normalized_query_vars(): array {
'set_up' => function (): array {
wp_set_current_user( self::factory()->user->create( array( 'role' => 'subscriber' ) ) );
$this->go_to( home_url( '/' ) );
return array( 'user_logged_in' => true );
return array();
},
),
);
Expand Down