Skip to content

Commit 2922d4c

Browse files
committed
Replace od_version with xpath_version in ETag data
1 parent 8c526e5 commit 2922d4c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

plugins/optimization-detective/storage/data.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ function od_get_current_url_metrics_etag( OD_Tag_Visitor_Registry $tag_visitor_r
200200
}
201201

202202
$data = array(
203-
'od_version' => OPTIMIZATION_DETECTIVE_VERSION,
203+
'xpath_version' => 2, // Bump whenever a major change to the XPath format occurs so that new URL Metrics are proactively gathered.
204204
'tag_visitors' => array_keys( iterator_to_array( $tag_visitor_registry ) ),
205205
'queried_object' => $queried_object_data,
206206
'queried_posts' => array_filter(

plugins/optimization-detective/tests/storage/test-data.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ static function ( array $data ) use ( &$captured_etag_data ) {
533533
$etag = $get_etag();
534534
$this->assertMatchesRegularExpression( '/^[a-z0-9]{32}\z/', $etag );
535535
$this->assertIsArray( $captured_etag_data );
536-
$expected_keys = array( 'od_version', 'tag_visitors', 'queried_object', 'queried_posts', 'active_theme', 'current_template' );
536+
$expected_keys = array( 'xpath_version', 'tag_visitors', 'queried_object', 'queried_posts', 'active_theme', 'current_template' );
537537
foreach ( $expected_keys as $expected_key ) {
538538
$this->assertArrayHasKey( $expected_key, $captured_etag_data );
539539
}

0 commit comments

Comments
 (0)