feat: add simple checkout form template with auto-generated credentials#737
feat: add simple checkout form template with auto-generated credentials#737superdav42 merged 1 commit intomainfrom
Conversation
Introduces a new 'simple' checkout form preset that requires only an email address from the customer. Username is derived from the email, password is generated server-side, site title from username, and site URL from site title — all via existing auto-generate mechanisms. Changes: - Signup_Field_Password: add auto_generate_password toggle; emits a hidden flag when enabled so no password field is rendered - Checkout: generate password via wp_generate_password() when the flag is present; skip password/password_conf/valid_password validation rules - Checkout_Form model: add 'simple' to template enum, use_template(), and save() step_types; add get_simple_template() private method - API schemas (create + update): add 'simple' to template enum
|
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 (5)
📝 WalkthroughWalkthroughThe changes introduce a new "simple" checkout template option and an auto-generate password feature for customer signup. Schema definitions are updated to permit the "simple" template value, backend logic conditionally handles password auto-generation with modified validation rules, and signup field UI toggles password visibility when auto-generation is enabled. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 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 168b8b8 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:
|
|
Completed via PR #737, merged to main. Merged by deterministic merge pass (pulse-wrapper.sh). No worker summary was available — the worker either crashed before writing one or this PR predates the merge summary convention.aidevops.sh v3.5.611 spent 4m on this as a headless bash routine. |
…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
simplecheckout form template preset that requires only an email address from the customerwp_generate_password(), site title from username, and site URL from site title — all via existing auto-generate mechanismsauto_generate_passwordtoggle to the Password signup field; when enabled, no password field is rendered and validation rules are skippedChanges
Signup_Field_Password: addauto_generate_passwordtoggle; emits a hidden flag when enabled so no password field is rendered; hides strength meter and confirm field viav-showCheckout: generate password viawp_generate_password(16)when the auto-generate flag is present; skippassword/password_conf/valid_passwordvalidation rulesCheckout_Formmodel: add'simple'to template enum,use_template(), andsave()step_types; addget_simple_template()private method withwu_checkout_form_simple_templatefiltercheckout-form-create.php+checkout-form-update.php): add'simple'to template enumTesting
aidevops.sh v3.5.611 plugin for OpenCode v1.3.0 with claude-sonnet-4-6 spent 2m and 6,362 tokens on this as a headless worker.
Summary by CodeRabbit