GH#1241: fix: add error handling and site-aware URLs to thank-you.js#1246
Conversation
Completion Summary
Changes:
aidevops.sh v3.17.18 plugin for OpenCode v1.15.6 with claude-haiku-4-5 spent 2m and 3,246 tokens on this as a headless worker. |
|
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 (2)
📝 WalkthroughWalkthroughThe PR addresses two medium-severity review findings from ChangesThank-you page error handling and WP Cron URL localization
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 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 bff7879 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
Changes:
aidevops.sh v3.17.18 plugin for OpenCode v1.15.6 with claude-haiku-4-5 spent 2m and 3,246 tokens on this as a headless worker. Merged via PR #1246 to main. |
Summary
Fixed two quality-debt issues in assets/js/thank-you.js:
Error handling for resend verification email: Wrapped the fetch and response parsing in a try-catch block to handle network failures and JSON parsing errors. Added a fallback error message using the localized 'request_failed' i18n string.
Site-aware wp-cron URLs: Replaced three hard-coded '/wp-cron.php?doing_wp_cron' URLs with a localized 'wp_cron_url' variable injected via wp_localize_script(). This ensures the URLs work correctly on WordPress subdirectory installs.
Changes:
Files Changed
assets/js/thank-you.js,inc/ui/class-thank-you-element.php
Runtime Testing
Resolves #1241
aidevops.sh v3.17.18 plugin for OpenCode v1.15.6 with claude-haiku-4-5 spent 2m and 3,246 tokens on this as a headless worker.
Summary by CodeRabbit
Release Notes