Skip to content

Drop the repeated client_id check in the WPCC guard - #51826

Open
darkdi wants to merge 2 commits into
Automattic:trunkfrom
darkdi:dup-client-id-check
Open

darkdi wants to merge 2 commits into
Automattic:trunkfrom
darkdi:dup-client-id-check

Conversation

@darkdi

@darkdi darkdi commented Sep 1, 2026 •

Copy link
Copy Markdown

Proposed changes

  • Remove the repeated empty( $wpcc_options['client_id'] ) operand from the WPCC activation guard.
  • Preserve the guard's current behavior for empty options, a missing or empty client_id, and a present client_id.
  • Add the required Jetpack changelog entry (patch, fixed).

If the third operand was intended to check another key, client_secret is the obvious candidate, but this repository only reads wpcc_options; I did not change behavior without evidence.

Related product discussion/links

  • No issue or product discussion; found while reading the guard.

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

No. It removes a duplicate boolean operand and does not change data collection, storage, transmission, or behavior.

Testing instructions

  1. Check out this branch.
  2. Run php -l projects/plugins/jetpack/class.jetpack.php.
  3. Review the guard in Jetpack::handle_deprecated_modules() and confirm its result is unchanged for:
    • empty wpcc_options;
    • a missing or empty client_id;
    • a present, non-empty client_id.

The removed operand was identical to the preceding one, so the boolean expression has the same truth table before and after the change.

@darkdi
darkdi force-pushed the dup-client-id-check branch from 7a651d9 to 4b2a3d9 Compare September 1, 2026 13:54
@github-actions github-actions Bot added the [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ label Sep 1, 2026
@github-actions

github-actions Bot commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

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 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 🤖



Jetpack plugin:

The Jetpack plugin has different release cadences depending on the platform:

  • WordPress.com Simple releases happen as soon as you deploy your changes after merging this PR (PCYsg-Jjm-p2).
  • WoA releases happen weekly.
  • Releases to self-hosted sites happen monthly:
    • Scheduled release: October 6, 2026

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

@github-actions github-actions Bot added [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. OSS Citizen This Pull Request was opened by an Open Source contributor. labels Sep 1, 2026
@darkdi

darkdi commented Sep 13, 2026

Copy link
Copy Markdown
Author

The bot added Needs Author Reply when the PR was opened, but its checklist is all green and nobody asked anything yet, so I think it's waiting on review rather than on me. The changelog entry is in

This branch has not been deployed

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

Labels

OSS Citizen This Pull Request was opened by an Open Source contributor. [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [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.

1 participant