Skip to content

fix: use site-aware wp-cron URL#1351

Merged
superdav42 merged 1 commit into
mainfrom
fix/thank-you-wp-cron-url
Jun 5, 2026
Merged

fix: use site-aware wp-cron URL#1351
superdav42 merged 1 commit into
mainfrom
fix/thank-you-wp-cron-url

Conversation

@superdav42

@superdav42 superdav42 commented Jun 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • change the thank-you page cron kick URL from a non-existent wu_wp_cron AJAX action to the real wp-cron.php?doing_wp_cron endpoint
  • use site_url() so Bedrock/subdirectory WordPress installs resolve to the core path, e.g. /wp/wp-cron.php

Context

The previous AJAX URL returned WordPress's default admin-ajax 0 response with HTTP 400 because no wu_wp_cron action is registered. home_url() would still fail in this install because it resolves to the public root, not the WordPress core directory.

Verification

  • php -l inc/ui/class-thank-you-element.php
  • vendor/bin/phpcs inc/ui/class-thank-you-element.php
  • wp --path=site/web/wp --url=https://sdaiagent.com eval 'echo site_url("wp-cron.php?doing_wp_cron") . "\n";'https://sdaiagent.com/wp/wp-cron.php?doing_wp_cron
  • curl -sk -o /dev/null -w '%{http_code} %{size_download}\n' 'https://sdaiagent.com/wp/wp-cron.php?doing_wp_cron'200 0

For #1241


aidevops.sh v3.20.13 plugin for OpenCode v1.15.13 with gpt-5.5

Summary by CodeRabbit

  • Bug Fixes
    • Improved background task processing configuration on the thank-you page for better reliability.

@coderabbitai

coderabbitai Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Linter diff in the way? Review this PR in Change Stack to focus on meaningful changes and expand context only when needed.

Review Change Stack

Caution

Review failed

Pull request was closed or merged during review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 971a103b-2e82-4133-adec-3be14d972202

📥 Commits

Reviewing files that changed from the base of the PR and between 9711cd9 and 699a2eb.

📒 Files selected for processing (1)
  • inc/ui/class-thank-you-element.php

📝 Walkthrough

Walkthrough

This single-line change updates the cron endpoint URL provided to the thank-you page frontend. The client-side JavaScript now receives the direct wp-cron.php endpoint instead of an admin-ajax action URL for triggering background cron tasks.

Changes

wp-cron Endpoint Localization

Layer / File(s) Summary
wp-cron URL endpoint change
inc/ui/class-thank-you-element.php
The wp_cron_url value passed to the localized wu_thank_you script data is updated to use site_url('wp-cron.php?doing_wp_cron') instead of the admin-ajax wu_wp_cron action endpoint.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

  • Ultimate-Multisite/ultimate-multisite#1246: Both PRs modify inc/ui/class-thank-you-element.php to localize wu_thank_you.wp_cron_url for use by thank-you.js, with the main PR changing the cron URL value (endpoint) that the client-side cron polling uses.
  • Ultimate-Multisite/ultimate-multisite#972: Both PRs touch the thank-you page flow: the main PR changes the localized wu_thank_you.wp_cron_url endpoint used by client-side cron triggering, while the retrieved PR updates assets/js/thank-you.js logic to prevent reload loops—so the JS behavior depends on the cron URL being correct.

Suggested labels

review-feedback-scanned, origin:worker

Poem

🐰 A thank-you page so fine,
Now greets the cron with a direct line,
No AJAX hops, just straight to the task,
The rabbit approves—that's all we ask!

🚥 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 'fix: use site-aware wp-cron URL' directly and clearly describes the main change: replacing a non-existent AJAX action URL with the real wp-cron endpoint and using site_url() for proper subdirectory handling.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 fix/thank-you-wp-cron-url

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.

@github-actions

github-actions Bot commented Jun 5, 2026

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 63dc3b9 into main Jun 5, 2026
9 of 11 checks passed
@superdav42

Copy link
Copy Markdown
Collaborator Author

Summary

  • change the thank-you page cron kick URL from a non-existent wu_wp_cron AJAX action to the real wp-cron.php?doing_wp_cron endpoint
  • use site_url() so Bedrock/subdirectory WordPress installs resolve to the core path, e.g. /wp/wp-cron.php

Context

The previous AJAX URL returned WordPress's default admin-ajax 0 response with HTTP 400 because no wu_wp_cron action is registered. home_url() would still fail in this install because it resolves to the public root, not the WordPress core directory.

Verification

  • php -l inc/ui/class-thank-you-element.php
  • vendor/bin/phpcs inc/ui/class-thank-you-element.php
  • wp --path=site/web/wp --url=https://sdaiagent.com eval 'echo site_url("wp-cron.php?doing_wp_cron") . "\n";'https://sdaiagent.com/wp/wp-cron.php?doing_wp_cron
  • curl -sk -o /dev/null -w '%{http_code} %{size_download}\n' 'https://sdaiagent.com/wp/wp-cron.php?doing_wp_cron'200 0
    For quality-debt: assets/js/thank-you.js — PR #1222 review feedback (medium) #1241

aidevops.sh v3.20.13 plugin for OpenCode v1.15.13 with gpt-5.5


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

@superdav42 superdav42 added the review-feedback-scanned Merged PR already scanned for quality feedback label Jun 6, 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