Skip to content

Commit

Permalink
Merge pull request #6117 from Automattic/staging
Browse files Browse the repository at this point in the history
Production release v20250128.0
  • Loading branch information
rebeccahum authored Jan 28, 2025
2 parents ec2d0a1 + da7f2b0 commit d03b503
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 14 deletions.
6 changes: 3 additions & 3 deletions __tests__/e2e/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 6 additions & 11 deletions jetpack.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function vip_default_jetpack_version() {
} elseif ( version_compare( $wp_version, '6.3', '<' ) ) {
// WordPress 6.2.x.
return '12.8';
} elseif ( version_compare( $wp_version, '6.4', '<' ) ) {
} elseif ( version_compare( $wp_version, '6.4', '<' ) ) {
// WordPress 6.3.x
return '13.1';
} elseif ( version_compare( $wp_version, '6.5', '<' ) ) {
Expand Down Expand Up @@ -492,22 +492,17 @@ function vip_jetpack_token_send_signature_error_headers( $error ) {
) );

/**
* Prevent the jetpack_active_plan from ever being overridden.
*
* All VIP sites should always have have a valid Jetpack plan.
*
* This will prevent issues from the plan option being corrupted,
* which can then break features like Jetpack Search.
* Prevent the jetpack_active_plan from missing.
* All VIP sites should always have a valid Jetpack plan.
*/
add_filter( 'pre_option_jetpack_active_plan', function ( $pre_option ) {
add_filter( 'default_option_jetpack_active_plan', function ( $default_value ) {
if ( true === WPCOM_IS_VIP_ENV && defined( 'VIP_JETPACK_DEFAULT_PLAN' ) ) {
return VIP_JETPACK_DEFAULT_PLAN;
$default_value = VIP_JETPACK_DEFAULT_PLAN;
}

return $pre_option;
return $default_value;
} );


/**
* Load the jetpack plugin according to several defines:
* - If VIP_JETPACK_SKIP_LOAD is true, Jetpack will not be loaded
Expand Down

0 comments on commit d03b503

Please sign in to comment.