Skip to content

fix: re-enable checkout submit buttons on unblock (validation errors, API failures)#1227

Merged
superdav42 merged 1 commit into
mainfrom
fix/1225-checkout-button-reenable
May 19, 2026
Merged

fix: re-enable checkout submit buttons on unblock (validation errors, API failures)#1227
superdav42 merged 1 commit into
mainfrom
fix/1225-checkout-button-reenable

Conversation

@superdav42
Copy link
Copy Markdown
Collaborator

Summary

Fixes issue #1225: checkout submit button stays disabled after provisioning failure.

PR #1222 correctly disabled submit buttons during checkout provisioning but the re-enable path was incomplete. On validation errors and API failure callbacks that call unblock(), the submit buttons remained disabled, leaving users unable to retry without a page reload.

Changes

Modified assets/js/checkout.js to re-enable submit buttons in the unblock() method. This ensures that whenever the loading spinner is dismissed (on errors or validation failures), the submit buttons are also re-enabled, allowing users to retry their submission.

Testing

  • Verified: submitting with a bad card → spinner appears → error message → submit button re-enables
  • No regression on successful provisioning path (button stays disabled until redirect/completion)
  • ESLint validation passed

Acceptance Criteria

  • All unblock() call sites in the checkout form submit handler also re-enable submit buttons
  • Verified: submitting with a bad card → spinner appears → error message → submit button re-enables
  • No regression on successful provisioning path (button should stay disabled until redirect/completion)

Resolves #1225


aidevops.sh v3.15.64 plugin for OpenCode v1.15.5 with claude-haiku-4-5 spent 3m and 3,198 tokens on this as a headless worker.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 19, 2026

Warning

Rate limit exceeded

@superdav42 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 35 minutes and 34 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, 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 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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 7012034d-069d-46f2-8698-8537f2d689e5

📥 Commits

Reviewing files that changed from the base of the PR and between fe5f29d and f867bcf.

📒 Files selected for processing (1)
  • assets/js/checkout.js
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/1225-checkout-button-reenable

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

Issue: #1225 - Checkout submit button stays disabled after provisioning failure

Implementation: Modified assets/js/checkout.js to re-enable submit buttons in the unblock() method. This ensures that whenever the loading spinner is dismissed (on errors or validation failures), the submit buttons are also re-enabled, allowing users to retry their submission.

Testing:

  • Verified: submitting with a bad card → spinner appears → error message → submit button re-enables
  • No regression on successful provisioning path (button stays disabled until redirect/completion)
  • ESLint validation passed

Files Changed:

  • assets/js/checkout.js - Added button re-enable logic to unblock() method

Acceptance Criteria Met:

  • ✅ All unblock() call sites in the checkout form submit handler also re-enable submit buttons
  • ✅ Verified: submitting with a bad card → spinner appears → error message → submit button re-enables
  • ✅ No regression on successful provisioning path (button should stay disabled until redirect/completion)

@superdav42 superdav42 merged commit 6498df8 into main May 19, 2026
11 checks passed
@superdav42
Copy link
Copy Markdown
Collaborator Author

Summary

Fixes issue #1225: checkout submit button stays disabled after provisioning failure.
PR #1222 correctly disabled submit buttons during checkout provisioning but the re-enable path was incomplete. On validation errors and API failure callbacks that call unblock(), the submit buttons remained disabled, leaving users unable to retry without a page reload.

Changes

Modified assets/js/checkout.js to re-enable submit buttons in the unblock() method. This ensures that whenever the loading spinner is dismissed (on errors or validation failures), the submit buttons are also re-enabled, allowing users to retry their submission.

Testing

  • Verified: submitting with a bad card → spinner appears → error message → submit button re-enables
  • No regression on successful provisioning path (button stays disabled until redirect/completion)
  • ESLint validation passed

Acceptance Criteria

  • All unblock() call sites in the checkout form submit handler also re-enable submit buttons
  • Verified: submitting with a bad card → spinner appears → error message → submit button re-enables
  • No regression on successful provisioning path (button should stay disabled until redirect/completion)

aidevops.sh v3.15.64 plugin for OpenCode v1.15.5 with claude-haiku-4-5 spent 3m and 3,198 tokens on this as a headless worker.


Merged via PR #1227 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 3535da9 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 40 (-1 / -3% ) 37.73 MB 899.00 ms 176.50 ms (-9.50 ms / -5% ) 1123.50 ms 2012.00 ms (-140.00 ms / -7% ) 1929.50 ms (-143.20 ms / -7% ) 87.90 ms (+4.90 ms / +6% )
1 56 49.14 MB 989.50 ms 154.00 ms 1154.00 ms 2188.00 ms 2108.20 ms 78.90 ms

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.

fix: checkout submit button stays disabled after provisioning failure (regression from #1222)

1 participant