Skip to content

fix(login): allow Cornerstone previews - #1688

Merged
superdav42 merged 1 commit into
mainfrom
feature/auto-20260731-132157
Jul 31, 2026
Merged

fix(login): allow Cornerstone previews#1688
superdav42 merged 1 commit into
mainfrom
feature/auto-20260731-132157

Conversation

@superdav42

@superdav42 superdav42 commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Exclude Cornerstone preview requests from the logged-in custom-login redirect.
  • Cover the Cornerstone preview marker with a checkout-pages regression test.

Verification

vendor/bin/phpcs inc/checkout/class-checkout-pages.php tests/WP_Ultimo/Checkout/Checkout_Pages_Test.php
vendor/bin/phpstan analyse inc/checkout/class-checkout-pages.php
vendor/bin/phpunit --filter Checkout_Pages_Test

aidevops.sh v3.32.200 plugin for OpenCode v1.18.9 with gpt-5.6-terra

Summary by CodeRabbit

  • Bug Fixes

    • Cornerstone preview mode now remains accessible on the configured login page without being redirected to the admin panel.
  • Tests

    • Added coverage to verify that login-page requests during Cornerstone preview complete without an unwanted redirect.

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: ee94ceea-c3d1-416b-a607-daacf8128fff

📥 Commits

Reviewing files that changed from the base of the PR and between a370ef7 and f85b558.

📒 Files selected for processing (2)
  • inc/checkout/class-checkout-pages.php
  • tests/WP_Ultimo/Checkout/Checkout_Pages_Test.php

📝 Walkthrough

Walkthrough

The checkout redirect handler now excludes requests with cs_preview_state. A regression test verifies that Cornerstone preview requests on the login page complete without an admin-panel redirect.

Changes

Cornerstone preview redirect handling

Layer / File(s) Summary
Add preview exclusion and regression coverage
inc/checkout/class-checkout-pages.php, tests/WP_Ultimo/Checkout/Checkout_Pages_Test.php
The redirect exclusion list includes cs_preview_state. A regression test verifies that the handler does not redirect Cornerstone preview requests and cleans up request and user state.

Estimated code review effort: 1 (Trivial) | ~5 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: allowing Cornerstone previews through the login redirect logic.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/auto-20260731-132157

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.

@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

@superdav42
superdav42 merged commit 965e826 into main Jul 31, 2026
11 checks passed
@superdav42 superdav42 added the review-feedback-scanned Merged PR already scanned for quality feedback label Aug 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review-feedback-scanned Merged PR already scanned for quality feedback

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant