Skip to content

GH#1289: fix: invalidate skipped cart initialization#1292

Merged
superdav42 merged 1 commit into
mainfrom
feature/auto-20260526-235228-gh1289
May 27, 2026
Merged

GH#1289: fix: invalidate skipped cart initialization#1292
superdav42 merged 1 commit into
mainfrom
feature/auto-20260526-235228-gh1289

Conversation

@superdav42
Copy link
Copy Markdown
Collaborator

Summary

  • Mark carts skipped by wu_cart_skip_initialization as invalid when the filter does not provide its own error.
  • Preserve existing filter-provided errors and merge WP_Error filter responses.
  • Add regression coverage for the true-return skip path.

Testing

  • vendor/bin/phpcs inc/checkout/class-cart.php
  • WP_TESTS_DIR=/tmp/wordpress-tests-lib vendor/bin/phpunit --filter test_cart_constructor_sets_default_error_when_skip_filter_returns_true

Resolves #1289


aidevops.sh v3.19.5 plugin for OpenCode v1.15.10 with gpt-5.5 spent 5m and 131,290 tokens on this as a headless worker.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 27, 2026

Warning

Review limit reached

@superdav42, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 14 minutes and 7 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ab4323c3-b398-4f37-81f4-6a9b2a7e7273

📥 Commits

Reviewing files that changed from the base of the PR and between 4a3f5a6 and 1206762.

📒 Files selected for processing (2)
  • inc/checkout/class-cart.php
  • tests/WP_Ultimo/Checkout/Checkout_Test.php
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/auto-20260526-235228-gh1289

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@superdav42
Copy link
Copy Markdown
Collaborator Author

MERGE_SUMMARY

Summary

  • Mark carts skipped by wu_cart_skip_initialization as invalid when no filter-provided error exists.
  • Preserve existing cart errors and merge WP_Error skip-filter responses.
  • Added regression coverage for skipped initialization returning true.

Files changed

  • inc/checkout/class-cart.php
  • tests/WP_Ultimo/Checkout/Checkout_Test.php

Testing

  • vendor/bin/phpcs inc/checkout/class-cart.php
  • WP_TESTS_DIR=/tmp/wordpress-tests-lib vendor/bin/phpunit --filter test_cart_constructor_sets_default_error_when_skip_filter_returns_true

aidevops.sh v3.19.5 plugin for OpenCode v1.15.10 with gpt-5.5 spent 5m and 131,860 tokens on this as a headless worker.

@superdav42 superdav42 added origin:worker Auto-created by pulse labelless backfill (t2112) status:in-review PR open, awaiting review/merge labels May 27, 2026
@superdav42 superdav42 merged commit 4ce587b into main May 27, 2026
9 of 11 checks passed
@superdav42
Copy link
Copy Markdown
Collaborator Author

Summary

  • Mark carts skipped by wu_cart_skip_initialization as invalid when the filter does not provide its own error.
  • Preserve existing filter-provided errors and merge WP_Error filter responses.
  • Add regression coverage for the true-return skip path.

Testing

  • vendor/bin/phpcs inc/checkout/class-cart.php
  • WP_TESTS_DIR=/tmp/wordpress-tests-lib vendor/bin/phpunit --filter test_cart_constructor_sets_default_error_when_skip_filter_returns_true

aidevops.sh v3.19.5 plugin for OpenCode v1.15.10 with gpt-5.5 spent 5m and 131,290 tokens on this as a headless worker.


Merged via PR #1292 to main.
Merged by deterministic merge pass (pulse-wrapper.sh).

@github-actions
Copy link
Copy Markdown

🔨 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!
Playground support for multisite is very limitied, hopefully it will get better in the future.

🚀 Launch in Playground

Login credentials: admin / password

@github-actions
Copy link
Copy Markdown

Performance Test Results

Performance test results for aad4dd6 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: /

Run DB Queries Memory Before Template Template WP Total LCP TTFB LCP - TTFB
0 41 37.78 MB 932.50 ms (+99.00 ms / +11% ) 162.50 ms 1094.50 ms (+80.50 ms / +7% ) 1970.00 ms 1895.50 ms 77.90 ms (-2.30 ms / -3% )
1 56 49.13 MB 865.50 ms (-80.50 ms / -9% ) 139.00 ms (-6.50 ms / -5% ) 1004.00 ms (-87.50 ms / -9% ) 1982.00 ms (-96.00 ms / -5% ) 1909.90 ms (-95.00 ms / -5% ) 72.80 ms

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

origin:worker Auto-created by pulse labelless backfill (t2112) status:in-review PR open, awaiting review/merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

quality-debt: inc/checkout/class-cart.php — PR #1278 review feedback (high)

1 participant