Repository navigation
Conversation
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>
|
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
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:
If you have questions about anything, reach out in #jetpack-developers for guidance! Wpcomsh plugin:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. |
Code Coverage SummaryThis 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. 🤷 |
Fixes DOTDEV-581
Proposed changes
WPCOM_Features::EDGE_RULES = 'edge-rules'to the wpcomsh copy of the class, mapped toWPCOM_PAID_BUSINESS_AND_COMMERCE_PLANS(the four Business terms and the Commerce plans).wpcom_site_has_feature(), read the wpcomsh copy, so they need this to seeedge-rules.WpcomFeaturesMapTestcase: Business and Commerce get the feature; Premium, Pro, the hosting and Commerce trials and Student do not. It catches the entry being widened toWPCOM_BUSINESS_PLANS, which would also cover Student and the trials.Related product discussion/links
Does this pull request change what data or activity we track or use?
No.
Testing instructions
jp docker phpunit wpcomsh -- --filter WpcomFeaturesMapTestpasses.EDGE_RULESmap entry toself::WPCOM_BUSINESS_PLANSand the hosting trial, Commerce trial and Student rows fail.wp eval 'var_dump( wpcom_site_has_feature( "edge-rules" ) );'printstrue; on a Premium site it printsfalse.🤖 Generated with Claude Code