GH#710: fix(paypal-rest): use $title param in get_checkout_label_html and assert it in test#711
Conversation
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 8 minutes and 44 seconds. ⌛ 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 (2)
✨ 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: |
|
Performance Test Results Performance test results for dedda38 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:
|
…ert it in test The implementation was ignoring the $title argument and always rendering the hardcoded 'PayPal' string via esc_html__(). Switch to esc_html($title) so the caller-supplied label is rendered in the checkout option span. Update test_get_checkout_label_html_includes_title to assert both the custom title and the PayPal logo alt text, fixing the intent/expectation mismatch flagged by CodeRabbit in PR #636. Closes #710
a1a5388 to
2e33513
Compare
🔨 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: |
Summary
get_checkout_label_html()was ignoring its$titleargument and always rendering the hardcoded'PayPal'string viaesc_html__(). Changed toesc_html($title)so the caller-supplied label is rendered in the checkout option span.test_get_checkout_label_html_includes_titlenow asserts both'Custom Title'(the passed argument) and'PayPal'(the logo alt text), fixing the intent/expectation mismatch flagged by CodeRabbit in PR t458: test(paypal-rest): expand PayPal_REST_Gateway test coverage toward ≥80% #636.Files changed (2)
inc/gateways/class-paypal-rest-gateway.php— use$titlein sprintf instead of hardcoded i18n stringtests/WP_Ultimo/Gateways/PayPal_REST_Gateway_Test.php— addassertStringContainsString('Custom Title', $html)assertionRisk
Low — test-only assertion change plus a one-line fix in a rendering helper. No business logic altered.
Closes #710
aidevops.sh v3.5.466 plugin for OpenCode v1.3.0 with claude-sonnet-4-6 spent 2m and 5,266 tokens on this as a headless worker.