docs: document coupon support#145
Conversation
Document coupon support as a Pro feature including supported discount types, how to apply coupons, client-side validation rules, and auto-recalculation behavior. Closes #88
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
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 6 minutes and 20 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: Repository: wcpos/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughDocumentation updated for coupon support in the POS checkout, replacing generic coupon steps with Pro-gated feature details. Added callout indicating coupon functionality requires WCPOS Pro, documented supported WooCommerce coupon types, and expanded validation rules covering expiry, usage limits, spend restrictions, and combination restrictions. Updated workflow to reference an Add Coupon button with local lookup and auto-recalculation. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related issues
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6eac6f3fd1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
versioned_docs/version-1.x/pos/checkout/index.mdx (1)
93-101: Consider clarifying pre-validation vs final validation.“Mirrors WooCommerce's coupon rules” can read as exact parity. A short caveat that final validity is confirmed during order processing would prevent edge-case confusion (e.g., stale local sync).
Suggested wording tweak
-The POS performs client-side validation that mirrors WooCommerce's coupon rules: +The POS performs client-side validation for WooCommerce coupon rules: @@ - Sale item exclusions + +Final coupon validity is confirmed by WooCommerce when the order is processed.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@versioned_docs/version-1.x/pos/checkout/index.mdx` around lines 93 - 101, The sentence "The POS performs client-side validation that mirrors WooCommerce's coupon rules" can imply exact parity; update this copy to clarify that this is pre-validation only and that final coupon validity is confirmed during server-side order processing (to cover stale local sync/edge cases). Edit the paragraph containing "mirrors WooCommerce's coupon rules" to add a brief caveat such as "this is client-side pre-validation — final validity is determined during order processing on the server" so readers know to expect a server-side authoritative check.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@versioned_docs/version-1.x/pos/checkout/index.mdx`:
- Around line 85-87: The terminology in the checkout doc is inconsistent: the
steps refer to an "Add Coupon" button while the overview calls it a "Coupon code
field"; update one to match the other so the UI control name is consistent
across the page (choose either "Add Coupon" button or "Coupon code field"),
e.g., change the overview text that mentions "Coupon code field" or change the
step text that mentions "Add Coupon" so both use the exact same phrase; ensure
you update occurrences in the overview paragraph (the text containing "Coupon
code field") and the step list (the line containing "Add Coupon") so they match
exactly.
---
Nitpick comments:
In `@versioned_docs/version-1.x/pos/checkout/index.mdx`:
- Around line 93-101: The sentence "The POS performs client-side validation that
mirrors WooCommerce's coupon rules" can imply exact parity; update this copy to
clarify that this is pre-validation only and that final coupon validity is
confirmed during server-side order processing (to cover stale local sync/edge
cases). Edit the paragraph containing "mirrors WooCommerce's coupon rules" to
add a brief caveat such as "this is client-side pre-validation — final validity
is determined during order processing on the server" so readers know to expect a
server-side authoritative check.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: wcpos/coderabbit/.coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: c9ef6ac9-bd12-4263-9da4-6e6bffe614c3
📒 Files selected for processing (1)
versioned_docs/version-1.x/pos/checkout/index.mdx
Summary
Closes #88
Test plan
npm run build -- --locale en)/getting-started/pro-licenseSummary by CodeRabbit