Skip to content

docs: document coupon support#145

Merged
kilbot merged 2 commits into
mainfrom
docs/issue-88-coupons
Apr 15, 2026
Merged

docs: document coupon support#145
kilbot merged 2 commits into
mainfrom
docs/issue-88-coupons

Conversation

@kilbot
Copy link
Copy Markdown
Contributor

@kilbot kilbot commented Apr 15, 2026

Summary

  • Expands the existing "Coupon Codes" section on the checkout page with comprehensive coupon documentation
  • Adds Pro Feature admonition since coupon support requires WCPOS Pro
  • Documents supported discount types (percentage, fixed cart, fixed product)
  • Documents client-side validation rules that mirror WooCommerce (expiry, usage limits, min/max spend, individual use, email restrictions, product/category restrictions, sale item exclusions)
  • Notes that coupon discounts auto-recalculate when cart contents change

Closes #88

Test plan

  • Verify the build passes (npm run build -- --locale en)
  • Review the rendered "Coupon Codes" section on the checkout page
  • Confirm the Pro Feature admonition links correctly to /getting-started/pro-license

Summary by CodeRabbit

  • Documentation
    • Clarified coupon feature availability for WCPOS Pro users.
    • Documented supported WooCommerce coupon types (percentage, fixed cart, fixed product).
    • Enhanced checkout documentation with detailed coupon workflow, validation rules, and automatic synchronization from WooCommerce to POS.

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
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 15, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Canceled Canceled Apr 15, 2026 9:48pm

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 15, 2026

Warning

Rate limit exceeded

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

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 @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: Repository: wcpos/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: aaacbc1c-3d3e-464c-8ff6-0846396df765

📥 Commits

Reviewing files that changed from the base of the PR and between 6eac6f3 and 50fb457.

📒 Files selected for processing (1)
  • versioned_docs/version-1.x/pos/checkout/index.mdx
📝 Walkthrough

Walkthrough

Documentation 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

Cohort / File(s) Summary
Coupon Documentation
versioned_docs/version-1.x/pos/checkout/index.mdx
Replaced free-text coupon application steps with Pro-gated feature section; added callout, supported coupon types (percentage, fixed cart, fixed product), Add Coupon button workflow, client-side validation rules mirroring WooCommerce (expiry, usage limits, min/max spend, combination/email/product/category/sale restrictions), and automatic recalculation note.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related issues

  • Add discounts and coupons guide #101: Both PRs expand POS coupon and discount documentation content in the 1.x version docs, addressing similar documentation scope for transaction workflows.

Possibly related PRs


🐰 A coupon dance so grand, with Pro features hand in hand,
Validation rules precise, discounts calculated twice,
From WooCommerce they sync with a magical click!
✨💰

🚥 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 PR title 'docs: document coupon support' clearly and concisely summarizes the main change: adding comprehensive documentation for coupon functionality to the checkout page.
Linked Issues check ✅ Passed The PR fulfills issue #88's requirement to add documentation for using coupons in the POS, including supported discount types, validation rules, and Pro feature requirements.
Out of Scope Changes check ✅ Passed All changes are scoped to documenting coupon support as required by issue #88; no unrelated modifications are present in the documentation-only PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/issue-88-coupons

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

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread versioned_docs/version-1.x/pos/checkout/index.mdx Outdated
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 55b0cdb and 6eac6f3.

📒 Files selected for processing (1)
  • versioned_docs/version-1.x/pos/checkout/index.mdx

Comment thread versioned_docs/version-1.x/pos/checkout/index.mdx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document coupon support

1 participant