GH#1717: skip switch_blog hooks for global tables - #1718
Conversation
|
Warning Review limit reached
Next review available in: 53 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe table constructor now removes ChangesTable hook optimization
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Completion Summary
aidevops.sh v3.32.250 plugin for OpenCode v1.18.9 with gpt-5.6-terra spent 8m and 125,002 tokens on this as a headless worker. Merged via PR #1718 to main. Routing feedback
|
🔨 Build Complete - Ready for Testing!📦 Download Build Artifact (Recommended)Download the zip build, upload to WordPress and test:
🌐 Test in WordPress Playground (Very Experimental)Click the link below to instantly test this PR in your browser - no installation needed! Login credentials: |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@inc/database/engine/class-table.php`:
- Around line 81-83: Update the condition in the Table class cleanup block to
use the required Yoda comparison, changing the global-state check to compare
true against $this->global while preserving the existing remove_action call.
In `@tests/WP_Ultimo/Database/Engine/Table_Test.php`:
- Line 32: Replace the site creation calls in the test setup with
wu_create_site() for both test sites, handling any WP_Error result before
continuing. Use each returned site's get_id() value when calling
switch_to_blog(), updating the affected setup paths around the existing site
variables.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 090d3a5b-6920-4875-8e02-d7daf9f4764d
📒 Files selected for processing (2)
inc/database/engine/class-table.phptests/WP_Ultimo/Database/Engine/Table_Test.php
🔨 Build Complete - Ready for Testing!📦 Download Build Artifact (Recommended)Download the zip build, upload to WordPress and test:
🌐 Test in WordPress Playground (Very Experimental)Click the link below to instantly test this PR in your browser - no installation needed! Login credentials: |
Summary
switch_blogcallback from global Ultimate Multisite database tables.Testing
vendor/bin/phpcs inc/database/engine/class-table.php tests/WP_Ultimo/Database/Engine/Table_Test.phpvendor/bin/phpstan analyse inc/database/engine/class-table.phpvendor/bin/phpunit --filter Table_TestRuntime Testing
Resolves #1717
aidevops.sh v3.32.250 plugin for OpenCode v1.18.9 with gpt-5.6-terra spent 8m and 122,392 tokens on this as a headless worker.
Summary by CodeRabbit
Bug Fixes
Tests