Skip to content

Conversation

ukilla
Copy link
Collaborator

@ukilla ukilla commented Oct 14, 2025

Description

Refactored the WordPress.com environment detection logic to use a transient that refreshes weekly instead of relying on a static option check.
The detection now verifies constants such as IS_ATOMICand WPCOMSH_VERSION to more accurately determine whether the site is hosted on WordPress.com (Atomic) environments.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I have commented my code, particularly in hard-to-understand areas.
  • I have confirmed that my changes do not introduce any new PHPCS warnings or errors.
  • I have checked plugin debug logs that my changes do not introduce any new PHP warnings or FATAL errors.
  • I followed general Pull Request best practices. Meta employees to follow this wiki.
  • I have added tests (if necessary) and all the new and existing unit tests pass locally with my changes.
  • I have completed dogfooding and QA testing, or I have conducted thorough due diligence to ensure that it does not break existing functionality.
  • [] I have updated or requested update to plugin documentations (if necessary).

Changelog entry

Improved WordPress.com environment detection by checking IS_ATOMIC and WPCOMSH_VERSION constants and refreshing the status weekly using transient caching.

Test Plan

  1. Verified plugin detects WordPress.com Atomic hosting correctly via constants on WordPress.com hosted website.
  2. Checked plugin debug logs for any PHP warnings or errors - none observed.
  3. Tested on non-Atomic self-hosted site to ensure detection returns false.

@meta-cla meta-cla bot added the cla signed label Oct 14, 2025
@ukilla ukilla requested a review from vahidkay-meta October 14, 2025 15:09
Copy link

meta-codesync bot commented Oct 14, 2025

@vahidkay-meta has imported this pull request. If you are a Meta employee, you can view this in D84612389.

@facebook-github-bot
Copy link
Contributor

@ukilla has updated the pull request. You must reimport the pull request before landing.

Copy link

meta-codesync bot commented Oct 15, 2025

@vahidkay-meta merged this pull request in 94a7b21.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants