Skip to content

Commit

Permalink
Merge pull request #5934 from Automattic/develop
Browse files Browse the repository at this point in the history
Staging release v20241115.1
  • Loading branch information
rebeccahum authored Oct 15, 2024
2 parents 5936702 + 4f8794e commit e566c6e
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 19 deletions.
8 changes: 1 addition & 7 deletions jetpack.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,7 @@
function vip_default_jetpack_version() {
global $wp_version;

if ( version_compare( $wp_version, '5.9', '<' ) ) {
// WordPress 5.8.x and older. Not including 5.9.
return '10.9';
} elseif ( version_compare( $wp_version, '6.0', '<' ) ) {
// WordPress 5.9.x
return '11.4';
} elseif ( version_compare( $wp_version, '6.1', '<' ) ) {
if ( version_compare( $wp_version, '6.1', '<' ) ) {
// WordPress 6.0.x
return '12.0';
} elseif ( version_compare( $wp_version, '6.2', '<' ) ) {
Expand Down
2 changes: 1 addition & 1 deletion telemetry/tracks/class-tracks-event-dto.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class Tracks_Event_DTO {

public string $vipgo_env;

public string $vipgo_org;
public int $vipgo_org;

public bool $is_vip_user = false;
}
2 changes: 1 addition & 1 deletion telemetry/tracks/class-tracks-event.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ protected function process_properties(
// Set VIP organization if it exists.
if ( defined( 'VIP_ORG_ID' ) ) {
$org_id = constant( 'VIP_ORG_ID' );
if ( is_string( $org_id ) && '' !== $org_id ) {
if ( is_integer( $org_id ) && $org_id > 0 ) {
$event->vipgo_org = $org_id;
}
}
Expand Down
2 changes: 1 addition & 1 deletion tests/telemetry/tracks/test-class-tracks-event.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Tracks_Event_Test extends WP_UnitTestCase {

protected const VIP_GO_APP_ENVIRONMENT = 'test';

protected const VIP_ORG_ID = '17';
protected const VIP_ORG_ID = 17;

private WP_User $user;

Expand Down
16 changes: 7 additions & 9 deletions tests/test-jetpack.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,13 @@ public function test__vip_default_jetpack_version() {

$versions_map = [
// WordPress version => Jetpack version
'5.8.6' => '10.9',
'5.9' => '11.4',
'5.9.5' => '11.4',
'6.0' => '12.0',
'6.1' => '12.5',
'6.2' => '12.8',
'6.3' => '13.1',
'6.4' => '13.6',
'6.5' => $latest,
'6.0' => '12.0',
'6.1' => '12.5',
'6.2' => '12.8',
'6.3' => '13.1',
'6.4' => '13.6',
'6.5' => $latest,
'6.6' => $latest,
];

foreach ( $versions_map as $wordpress_version => $jetpack_version ) {
Expand Down

0 comments on commit e566c6e

Please sign in to comment.