GH#738: fix: simple checkout form follow-up fixes#739
Conversation
- Skip JS password validation rules when auto_generate_password is enabled on the checkout form (class-checkout.php). The server-side logic already handles this via request_or_session(), but at render time the flag is not in the request, so detect it from form settings. - Register wu_dmtable on $wpdb early in WP_Ultimo::init() to prevent PHP notices about undefined property when domain mapping code runs before Domain_Mapping::startup() (class-wp-ultimo.php). - Add the same wu_dmtable fallback in Domain::get_by_domain() for non-sunrise plugin load paths (class-domain.php). - Add 'simple' template entry (Email Only icon) to the checkout form template list (class-checkout-form-list-admin-page.php). Closes #738
Completion Summary
This summary was written by the worker at PR creation time for the deterministic merge pass. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThis PR commits four uncommitted fixes from the simple checkout form follow-up. Changes include adding a "simple" template option to the checkout form admin UI, skipping password validation rules when auto-generation is enabled, initializing domain-mapping table globals early in plugin startup, and providing fallback initialization for domain lookups. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
🔨 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 3e7588b 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:
|
Completion Summary
Merged via PR #739 to main.
|
…password - Signup_Field_Password_Test: 6 new tests covering auto_generate_password defaults, get_fields toggle, to_fields_array hidden flag emission, v-show guards on strength meter and confirm field - Checkout_Form_Test: 11 new tests covering simple template validation, use_template() structure, field presence, auto-generate flags on username/password/site_title/site_url, filterable hook, and save path All 17 tests pass against the implementation already in main (PRs #737, #739, #742). Closes #746
…erated credentials (#747) * chore: add t524 simple checkout form feature to backlog (re-implement PR #740) * test(checkout): add unit tests for simple template and auto-generate password - Signup_Field_Password_Test: 6 new tests covering auto_generate_password defaults, get_fields toggle, to_fields_array hidden flag emission, v-show guards on strength meter and confirm field - Checkout_Form_Test: 11 new tests covering simple template validation, use_template() structure, field presence, auto-generate flags on username/password/site_title/site_url, filterable hook, and save path All 17 tests pass against the implementation already in main (PRs #737, #739, #742). Closes #746
Summary
auto_generate_passwordis enabled on the checkout form — the server-side logic already handles this but at render time the flag is not in the request, so detect it from form settings instead.wu_dmtableon$wpdbearly inWP_Ultimo::init()to prevent PHP notices about undefined property when domain mapping code runs beforeDomain_Mapping::startup().wu_dmtablefallback inDomain::get_by_domain()for non-sunrise plugin load paths.simpletemplate entry (Email Only icon) to the checkout form template list.Files Changed
inc/checkout/class-checkout.php— JS validation fix for auto-generated passwordsinc/class-wp-ultimo.php— earlywu_dmtableregistrationinc/models/class-domain.php—wu_dmtablefallback inget_by_domain()inc/admin-pages/class-checkout-form-list-admin-page.php— addsimpletemplate entryRuntime Testing
Risk level: Low — these are follow-up fixes to PR #737 (already merged). Changes are: a JS validation guard (no new logic path, only skips rules when flag is set), two `` property guards (defensive fallbacks, no new queries), and a template list entry (UI-only addition). Self-assessed.
Closes #738
aidevops.sh v3.5.611 plugin for OpenCode v1.3.0 with claude-sonnet-4-6 spent 2m on this as a headless worker.
Summary by CodeRabbit
New Features
Bug Fixes