Skip to content

WPCOM Features: Add the edge-rules feature - #55561

Open
wojtekn wants to merge 1 commit into
trunkfrom
add/wpcom-features-edge-rules
Open

wojtekn wants to merge 1 commit into
trunkfrom
add/wpcom-features-edge-rules

Conversation

@wojtekn

@wojtekn wojtekn commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

Fixes DOTDEV-581

Proposed changes

  • Add WPCOM_Features::EDGE_RULES = 'edge-rules' to the wpcomsh copy of the class, mapped to WPCOM_PAID_BUSINESS_AND_COMMERCE_PLANS (the four Business terms and the Commerce plans).
  • This mirrors the same change in the wpcom copy of the class. Checks that run on the Atomic site itself, such as wpcom_site_has_feature(), read the wpcomsh copy, so they need this to see edge-rules.
  • Add a WpcomFeaturesMapTest case: Business and Commerce get the feature; Premium, Pro, the hosting and Commerce trials and Student do not. It catches the entry being widened to WPCOM_BUSINESS_PLANS, which would also cover Student and the trials.

Related product discussion/links

  • wpcom counterpart: 264574-gh-Automattic/wpcom
  • DOTDEV-581

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

No.

Testing instructions

  • jp docker phpunit wpcomsh -- --filter WpcomFeaturesMapTest passes.
  • Break check: change the EDGE_RULES map entry to self::WPCOM_BUSINESS_PLANS and the hosting trial, Commerce trial and Student rows fail.
  • Optional: on an Atomic test site running this branch with a Business or Commerce plan, wp eval 'var_dump( wpcom_site_has_feature( "edge-rules" ) );' prints true; on a Premium site it prints false.

🤖 Generated with Claude Code

Add the edge-rules feature to the wpcomsh copy of WPCOM_Features,
granted by paid Business and Commerce plans. This copies the same
change in the wpcom copy of the class, so checks that run on the Atomic
site, such as wpcom_site_has_feature(), see it too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@wojtekn wojtekn added the [Status] Needs Review This PR is ready for review. label Nov 27, 2026
@wojtekn wojtekn self-assigned this Nov 27, 2026
@github-actions

github-actions Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

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 add/wpcom-features-edge-rules 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

github-actions Bot commented Nov 27, 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 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!


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.

@jp-launch-control

Copy link
Copy Markdown

Code Coverage Summary

This PR did not change code coverage!

That could be good or bad, depending on the situation. Everything covered before, and still is? Great! Nothing was covered before? Not so great. 🤷

Full summary · PHP report

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant