GH#1254: feat: disable tenant-side checkout in sovereign mode#1261
Conversation
- Guard 4 AJAX handlers (wu_create_order, wu_validate_form, wu_check_user_exists, wu_inline_login) to return JSON error in sovereign context - Add get_main_site_checkout_url() helper method to Checkout and Checkout_Pages classes - Guard Cart class instantiation to prevent DB access in sovereign context - Replace checkout URLs with main site URL in sovereign tenant context via page_link and post_type_link filters - Replace checkout element output with 'Upgrade on main site' link in sovereign context - Add comprehensive unit tests for all sovereign tenant guards Fixes #1254
Completion Summary
aidevops.sh v3.17.27 plugin for OpenCode v1.15.7 with claude-haiku-4-5 spent 5m and 1,374 tokens on this as a headless worker. |
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
✨ Finishing Touches🧪 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.17.27 plugin for OpenCode v1.15.7 with claude-haiku-4-5 spent 5m and 1,374 tokens on this as a headless worker. Merged via PR #1261 to main. |
🔨 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: |
|
Performance Test Results Performance test results for 68f824f are in 🛎️! Note: the numbers in parentheses show the difference to the previous (baseline) test run. Differences below 2% or 0.5 in absolute values are not shown. URL:
|
…ments (#1266) Extends the sovereign-mode disable pattern (established in #1257, #1258, #1261) to the remaining 8 customer-facing UI elements. When WU_MT_SOVEREIGN_TENANT is defined, each element renders a single 'Manage on main site' link instead of its normal output. Changes: - Add sovereign helper function wu_mt_main_site_account_url() in inc/functions/sovereign.php - Add sovereign-redirect template in views/elements/sovereign-redirect.php - Add sovereign-mode short-circuit to output() method in 8 UI elements: * Account_Summary_Element * Billing_Info_Element * Invoices_Element * My_Sites_Element * Current_Membership_Element * Current_Site_Element * Template_Switching_Element * Domain_Mapping_Element - Add comprehensive unit tests for sovereign-mode functionality Resolves #1263 Resolves Ultimate-Multisite/ultimate-multisite-multi-tenancy#86 Resolves Ultimate-Multisite/ultimate-multisite-multi-tenancy#87
Summary
Implemented ADR-001 Phase 3.5 PR-4: Checkout always runs on the main site. Sovereign tenants are the result of a checkout, not its host. Disabled tenant-side checkout AJAX, form rendering, cart, and signup-field validators in sovereign tenants. Users who land on a checkout URL inside a sovereign tenant are redirected to the main site's /register/ page.
Files Changed
inc/checkout/class-cart.php,inc/checkout/class-checkout-pages.php,inc/checkout/class-checkout.php,inc/ui/class-checkout-element.php,tests/WP_Ultimo/Checkout/Checkout_Test.php
Runtime Testing
Resolves #1254
aidevops.sh v3.17.27 plugin for OpenCode v1.15.7 with claude-haiku-4-5 spent 5m and 1,374 tokens on this as a headless worker.