fix: repair checkout billing address field handling#1615
Conversation
📝 WalkthroughWalkthroughThis PR updates checkout billing localization, validation, and field visibility, changes select-icon option loading to support callable attributes, and makes PR performance metrics advisory after repeated unavailable-server attempts. ChangesBilling address checkout flow
Select-icon field rendering
PR performance workflow
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
🔨 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: |
Merge summary
Verification
|
🔨 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.
🧹 Nitpick comments (1)
.github/workflows/tests.yml (1)
313-316: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd the same server-not-responding delay to the baseline run for consistency.
The new
sleep 10beforecontinuewhen the PR server is unresponsive is a good improvement — it gives the server time to recover between probes. However, the baseline run (lines 241-243) handles the same "Server not responding" case without any delay, immediately continuing to the next attempt. Adding the same delay there would make both loops consistent and improve the baseline's chances of recovery too.♻️ Suggested fix for the baseline run
if ! curl -sf --max-time 5 http://127.0.0.1:9400/ > /dev/null 2>&1; then echo "Server not responding — skipping" + [ "$attempt" -lt 3 ] && sleep 10 continue fi🤖 Prompt for 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. In @.github/workflows/tests.yml around lines 313 - 316, Update the baseline server-probe loop near the existing “Server not responding” handling to match the PR loop: sleep 10 seconds when another attempt remains before continuing. Preserve the attempt guard so the final attempt exits without an unnecessary delay, ensuring both baseline and PR checks behave consistently.
🤖 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.
Nitpick comments:
In @.github/workflows/tests.yml:
- Around line 313-316: Update the baseline server-probe loop near the existing
“Server not responding” handling to match the PR loop: sleep 10 seconds when
another attempt remains before continuing. Preserve the attempt guard so the
final attempt exits without an unnecessary delay, ensuring both baseline and PR
checks behave consistently.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 090a83ff-a76a-45ed-8f33-e1fd02bc7f94
📒 Files selected for processing (1)
.github/workflows/tests.yml
Status: blocked on branch protection reviewThe WP Performance Metrics failure has been repaired and the branch is updated. Evidence:
Remaining action: maintainer review/approval is required by branch protection before merge. aidevops.sh v3.32.4 plugin for OpenCode v1.17.13 |
Summary
Verification
vendor/bin/phpcs inc/checkout/class-checkout.php inc/checkout/signup-fields/class-signup-field-billing-address.php views/admin-pages/fields/field-select-icon.phpvendor/bin/phpunit --filter 'test_get_validation_rules_relaxes_optional_billing_address_fields|test_get_validation_rules_relaxes_optional_billing_address_fields_from_all_steps|test_get_validation_rules_keeps_required_billing_for_free|test_get_checkout_variables_contains_uses_postal_code'vendor/bin/phpunit --filter Signup_Field_Billing_Address_TestSummary by CodeRabbit
Bug Fixes
UI Updates
Enhancements
Tests