Skip to content

Conversation

@gcsecsey
Copy link
Contributor

@gcsecsey gcsecsey commented Oct 27, 2025

Fixes DOTDEV-234
Related thread p1761317492233479-slack-CDLH4C1UZ

Proposed changes:

  • Fix Calypso auto-update toggle not working for newly installed plugins on WordPress.com Atomic (WoA) sites
  • Trigger Jetpack sync when the auto_update_plugins option is updated via the wpcomsh_auto_update_new_plugins_by_default function
  • Ensure that when new plugins are automatically added to the auto-update list, the change is properly synced to the shadow site

Other information:

  • Have you written new tests for your changes, if applicable?
  • Have you checked the E2E test CI results, and verified that your changes do not break them?
  • Have you tested your changes on WordPress.com, if applicable (if so, you'll see a generated comment below with a script to run)?

Jetpack product discussion

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

Testing instructions:

This issue only affects sites where auto updates haven't yet been set from the WP Admin side.

Setup:

  1. Set up a new Atomic or WoA site and install Jetpack Beta on it
  2. Use the beta tested to check out wpcomsh from this branch
CleanShot 2025-10-28 at 13 32 57@2x

Test the fix:

  1. Install a new plugin on the site, eg. https://wordpress.com/plugins/manage/sites/all-in-one-wp-migration
  2. After the plugin is installed, check that the Autoupdate toggle is enabled by default
  3. Try to disable the auto-update toggle
  4. Check that the toggle is disabled and the value is the same after a refresh
  5. Check on Site Explorer (39688-pb) that jetpack_autoupdate_plugins option is synced
After installing After disabling and refreshing
CleanShot 2025-10-28 at 13 34 01@2x CleanShot 2025-10-28 at 13 34 22@2x

@github-actions
Copy link
Contributor

github-actions bot commented Oct 27, 2025

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 (WordPress.com Site Helper), and enable the update/auto-update-trigger-sync branch.

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
Contributor

github-actions bot commented Oct 27, 2025

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 a "[Type]" label (Bug, Enhancement, Janitorial, Task).
  • ✅ 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!


Wpcomsh plugin:

  • Next scheduled release: Atomic deploys happen twice daily on weekdays (p9o2xV-2EN-p2)

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.

@github-actions github-actions bot added the [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. label Oct 27, 2025
@jp-launch-control
Copy link

jp-launch-control bot commented Oct 27, 2025

Code Coverage Summary

Coverage changed in 1 file.

File Coverage Δ% Δ Uncovered
projects/plugins/wpcomsh/feature-plugins/managed-plugins.php 8/195 (4.10%) -0.04% 2 ❤️‍🩹

Full summary · PHP report

@gcsecsey gcsecsey marked this pull request as ready for review October 28, 2025 13:18
@gcsecsey gcsecsey requested a review from a team October 28, 2025 13:38
Copy link
Contributor

@epeicher epeicher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for solving this @gcsecsey ! I have tested it, and it works as advertised. I was able to reproduce the issue using the production version of the wpcomsh plugin and then I was not able to reproduce it anymore after applying this branch. LGTM! :shipit:

Before

CleanShot.2025-10-28.at.16.19.00.mp4

After

CleanShot.2025-10-28.at.17.11.58.mp4

Copy link
Contributor

@epeicher epeicher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have reviewed it again after some Slack discussion p1762421903778689/1761317492.233479-slack-CDLH4C1UZ and I have identified an issue with this by following the following test steps:

  • Ensure you have a WoW Dev blog with Jetpack Beta pointing to this branch
  1. Install a new plugin on the site, eg. https://wordpress.com/plugins/manage/sites/all-in-one-wp-migration
  2. After the plugin is installed, check that the Autoupdate toggle is enabled by default
  3. Try to disable the auto-update toggle -> Refresh the page
  4. The toggle changes to disable

This is the result when I am on the step 2 above, just after installing the plugin, refreshing the page:

CleanShot.2025-11-06.at.11.23.30.mp4

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

Labels

[Plugin] Wpcomsh [Status] In Progress [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants