Skip to content

Upgrade menu: do not show when not connected or in offline mode#47993

Closed
jeherve wants to merge 2 commits intotrunkfrom
fix/upgrade-jetpack-not-connected
Closed

Upgrade menu: do not show when not connected or in offline mode#47993
jeherve wants to merge 2 commits intotrunkfrom
fix/upgrade-jetpack-not-connected

Conversation

@jeherve
Copy link
Copy Markdown
Member

@jeherve jeherve commented Apr 8, 2026

Fixes JETPACK-1518

Warning

We may be able to replace this PR by #47967.

Proposed changes

On self-hosted sites, when we're not connected or in Offline mode we cannot upgrade the site to a different plan so we shouldn't show the menu.

Other information

Related product discussion/links

N/A

Does this pull request change what data or activity we track or use?

No

Testing instructions

  • Create a brand new site (e.g. JN)
    • You should not see the "Upgrade Jetpack" submenu right away, only once you've connected the site to WordPress.com.
  • Switch that site to offline mode by adding define( 'JETPACK_DEV_DEBUG', true ); to your site's wp-config.php file (on JN sites you can go to Settings > Jetpack Constants and enable the mode there).
    • The submenu should not be displayed then.

Fixes JETPACK-1518

On self-hosted sites, when we're not connected or in Offline mode we cannot upgrade the site to a different plan so we shouldn't show the menu.
@jeherve jeherve requested a review from DevinWalker April 8, 2026 08:24
@jeherve jeherve self-assigned this Apr 8, 2026
@jeherve jeherve added Bug When a feature is broken and / or not performing as intended [Status] Needs Review This PR is ready for review. [Feature] Offline Mode aka Development Mode or Debug Mode [Pri] Normal labels Apr 8, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.

  • To test on WoA, go to the Plugins menu on a WoA dev site. Click on the "Upload" button and follow the upgrade flow to be able to upload, install, and activate the Jetpack Beta plugin. Once the plugin is active, go to Jetpack > Jetpack Beta, select your plugin (Jetpack or WordPress.com Site Helper), and enable the fix/upgrade-jetpack-not-connected branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack fix/upgrade-jetpack-not-connected
bin/jetpack-downloader test jetpack-mu-wpcom-plugin fix/upgrade-jetpack-not-connected

Interested in more tips and information?

  • In your local development environment, use the jetpack rsync command to sync your changes to a WoA dev blog.
  • Read more about our development workflow here: PCYsg-eg0-p2
  • Figure out when your changes will be shipped to customers here: PCYsg-eg5-p2

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ✅ Add a "[Status]" label (In Progress, Needs Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖


Follow this PR Review Process:

  1. Ensure all required checks appearing at the bottom of this PR are passing.
  2. Make sure to test your changes on all platforms that it applies to. You're responsible for the quality of the code you ship.
  3. You can use GitHub's Reviewers functionality to request a review.
  4. When it's reviewed and merged, you will be pinged in Slack to deploy the changes to WordPress.com simple once the build is done.

If you have questions about anything, reach out in #jetpack-developers for guidance!

@jp-launch-control
Copy link
Copy Markdown

jp-launch-control bot commented Apr 8, 2026

Code Coverage Summary

Coverage changed in 1 file.

File Coverage Δ% Δ Uncovered
projects/packages/admin-ui/src/class-admin-menu.php 137/162 (84.57%) 0.80% 0 💚

Full summary · PHP report · JS report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug When a feature is broken and / or not performing as intended [Feature] Offline Mode aka Development Mode or Debug Mode [Package] Admin Ui [Pri] Normal [Status] Blocked / Hold [Tests] Includes Tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants