This is an info Alert.
x402 Logo
  • Product
    • Become Agent-Ready
      • Merchants
        Agentic Commerce — list your store across ChatGPT, Gemini, Claude & Perplexity
      • Publishers
        Monetize your content when AI agents read, cite, or train on it
      • SaaS Companies
        Treat AI agents as first-class customers with agent-priced checkout
    • Monetize
      • Monetize MCP Server
        Charge per call on any MCP server in 2 minutes
      • Monetize AI Agents
        Turn n8n, Zapier, Activepieces workflows into revenue
      • Agent Feed
        Pay-per-query access to licensed publisher content for your agents
  • Resources
    • xpay Ecosystem
      • xpay✦ Tools
        1,000+ pay-per-use tools for your AI agents
      • Agent-Ready SaaS Index
        25,481 SaaS scored on agent-buyability
      • SaaS Pricing Database
        Pricing pages indexed across 1,000+ categories
      • Shopify Apps Directory
        Every Shopify app, with its full review history
      • WooCommerce Plugins Directory
        Every WooCommerce plugin, scored on how well it is maintained
      • GitHub
        Open source repositories
    • Agent Building
      • Agent Frameworks
        AI frameworks for building multi-agent systems
      • x402 Integration
        AI frameworks with x402 payment integration
      • Networks
        Blockchain networks supporting x402
    • Company
      • About xpay✦
        Our mission, products, and protocols
      • Blog
        Latest insights and updates
      • Docs
        Complete xpay documentation
  • Pricing
  • Blog
  • Docs
Get Started
  1. xpay✦ Commerce

  2. Directory

  3. WooCommerce plugins

  4. Coupons Role Restriction for WooCommerce

Coupons Role Restriction for WooCommerce

Restrict the usage of WooCommerce coupons based on user roles.

60+ active installsFree on WordPress.org
View on WordPress.orgSupport forum
Will this break my store?

What the WordPress.org registry says about keeping Coupons Role Restriction for WooCommerce running.

WordPress compatibility
Tested to 6.9.5 — 1 branch behind 7.0
Tested against the WordPress branch in use today.
Last updated
7 months ago
At least 3.4 releases a year since launch. WordPress.org only lists versions still available for download, so the real number may be higher.
Requires PHP
7.4
Your host must be running at least this version.
Requires WordPress
6.4
Requires other plugins
woocommerce
These must be installed and active first.
Contributors
1
A single maintainer. Worth knowing if the plugin is load-bearing for your store.

60+ active installsWordPress.org reports installs in bands, not exact counts.
Maintenance & trust

Scored on how Coupons Role Restriction for WooCommerce is looked after — not on how many stores run it.

Mixed signals
Not enough public feedback to put a confident number on this one. Little public feedback — score rests mostly on release activity. What we can see is below.

Maintenance
26 / 35
Updated 206 days ago.
WordPress compatibility
14 / 20
Tested to WP 6.9.5, 1 branch(es) behind.
Support responsiveness
Not enough data
Only 0 support thread(s) — not enough to judge.
Merchant satisfaction
Not enough data
No ratings yet.
Listing transparency
7 / 10
Provides: screenshots, homepage
2 of 5 measures had too little evidence to score. They are left out of the total rather than counted as zero — otherwise a plugin would be marked down for being small rather than for being poorly kept.Measured 2026-08-01 from the WordPress.org plugin registry.
Ratings

No one has rated this plugin on WordPress.org yet. That is a statement about the ratings page, not about the plugin — plenty of well-kept plugins never collect them.

This plugin allows you to restrict the usage of WooCommerce coupons based on user roles, including guest users.

You can specify which roles (including guests) are allowed or excluded from using a coupon, providing more control over your discount strategies.

Features

  • Restrict coupon usage based on user roles.
  • Option to specify both allowed and excluded roles.
  • Support for guest users with a “Customer Is A Guest” pseudo-role.
  • Customize the error message via a filter.

Filters

runthings_wc_coupons_role_restrict_error_message

This filter allows customization of the error message shown when a coupon is not valid for the user’s account type.

For detailed documentation and advanced examples, see the full documentation on GitHub.

Parameters:

  1. $message (string): The default error message, e.g., "Sorry, this coupon is not valid for your account type.".
  2. $context (array): Additional context for the error, including the coupon, user roles, and guest status.

$context object format:

The $context array contains the following keys:
– coupon (WC_Coupon): The coupon object being validated.
– is_guest (bool): Whether the current user is a guest (not logged in).
– user (WP_User): The current user object. For guests, this will be an empty user object.
– allowed_roles (array): Roles explicitly allowed to use the coupon, in the format [role_id => role_name].
– excluded_roles (array): Roles explicitly excluded from using the coupon, in the format [role_id => role_name].
– effective_allowed_roles (array): The final calculated roles allowed to use the coupon, after considering exclusions, in the format [role_id => role_name]. This is the set of roles that can use the coupon.

License

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, see http://www.gnu.org/licenses/gpl-3.0.html.

Icon – Discount by Gregor Cresnar, from Noun Project, https://thenounproject.com/browse/icons/term/discount/ (CC BY 3.0)

Icon – restriction by Puspito, from Noun Project, https://thenounproject.com/browse/icons/term/restriction/ (CC BY 3.0)

Why was this plugin created?

This plugin was created to provide a more secure option for restricting coupon usage.

The default email usage restriction for coupons in WooCommerce is based on the unverified billing email address field, which can be freely set by users.

By using role restrictions, you can ensure that only verified and authorized users in specific roles—or guests, when appropriate—can use certain coupons, making it a secure option.

My personal motivation was to have 100% discount coupons that could be used only be staff or developers, without the possibility of this being exploited by somebody putting a fake staff email into the billing email address field.

How do I restrict a coupon to specific roles?

Edit the coupon and go to the “Usage restriction” tab.

In the “Roles” section, select the roles allowed to use the coupon.

If you want to exclude specific roles, select them in the “Excluded roles” section. For guest users, select or exclude the “Customer Is A Guest” pseudo-role.

What happens if a role is both allowed and excluded?

If a role is both allowed and excluded, the exclusion will take precedence, and users with that role will not be able to use the coupon.

How do I allow a coupon for guests only?

To restrict a coupon to guests only, select the “Customer Is A Guest” pseudo-role in the “Roles” section and leave all other roles unselected.

Can I use this plugin with other WooCommerce coupon restrictions?

Yes, this plugin works alongside other WooCommerce coupon restrictions such as minimum spend, maximum spend, and product restrictions.

Categories
Discounts & coupons
Plugin details
Version1.1.3
Last updated2026-01-07 1:30am GMT
Added2024-07-15
Requires WordPress6.4
Tested up to6.9.5
Requires PHP7.4

Tags on WordPress.org
coupons
discount
role restriction
user roles
woocommerce
Alternatives
Other plugins in the same categories.
Loyalty Points Rewards and Referral for WooCommerce – WPLoyalty
3K+ installs
5.0(283)
YayPricing – WooCommerce Dynamic Pricing & Discounts
3K+ installs
5.0(71)
Discount Rules for WooCommerce
100K+ installs
4.9(1,342)
Advanced coupon for WooCommerce
900+ installs
5.0(18)
Auto Coupons for WooCommerce
4K+ installs
4.9(16)
Discount Rules and Dynamic Pricing for WooCommerce
10K+ installs
4.7(247)
x402 Logo

The agent-readiness stack for the AI shopping era — helping merchants, publishers and SaaS companies get discovered, cited and transacted with by ChatGPT, Perplexity, Claude, Gemini and the custom shopping agents underneath them.

CompanyAgentically Inc. (d/b/a xpay✦)1875 Mission St, Ste 103San Francisco, CA 94103, United Stateslegal@xpay.sh · privacy@xpay.sh
or ask your AI app
Company
About xpayAgency PartnersGitHubDiscordllms.txt
DevelopersDocumentationAPI ReferenceSDKs & LibrariesQuickstart GuideOpenAPI Spec
Stay Updated
Occasional product updates and agent-readiness playbooks from xpay (Agentically Inc.) — typically a couple of emails a month. Double opt-in: we email you a link to confirm before sending anything, and every email has one-click unsubscribe.
Social
  • For Publishers
    • News
    • Finance
    • Dev / Tech
    • Travel
    • View all verticals
  • Agent Feed
    • AI Search Engines
    • RAG Builders
    • Browser Agents
    • Vertical Research
    • Browse full catalog
  • Agent-Ready Index
    • SaaS Pricing Database
    • Agent-Ready SaaS Index
    • Verified band
    • AI & ML
    • Sales & CRM
  • Products
    • Pricing Widget
    • Monetize MCP Server
    • Paywall
    • Smart Proxy
    • Monetize AI Agents
    • xpay x402 Facilitator
  • Agentic Economy
    • Timeline
    • Resources
    • Manifesto
    • Stack
  • Agentic Commerce
    • Get listed
    • ChatGPT Ads
    • How ChatGPT Ads work
    • ChatGPT Ads · Apparel
    • ChatGPT Ads · Health & Beauty
    • xpay Listings · Amazon + Google
    • Pricing
    • Free audit
    • Shopify
    • WooCommerce
    • Apparel & Accessories
    • Health & Beauty
    • Overview
  • Commerce Index
    • Shopify apps directory
    • Agentic Commerce Ready Index
    • Methodology
    • Pet brands · WooCommerce
    • Pet brands · Shopify
  • Marketplace
    • 🛍️ xpay.deals — agentic storefront for deals
  • Protocols
    • Overview
    • x402
    • MPP
    • UCP
    • ACP
    • AP2
    • TAP
    • A2A
  • Agent Frameworks
    • Overview
    • LangChain
    • CrewAI
    • Claude MCP
    • AutoGPT
    • LangChain vs Mastra
    • LangGraph vs Pydantic AI
  • Company
    • About xpay
    • Blog
    • Docs
    • GitHub
  • Free prompts
    • Ecommerce prompts
    • Email marketing prompts
    • Product description prompts
    • Facebook ad prompts
    • Skincare prompts
    • Supplement prompts
    • Wine prompts
    • Electronics prompts

© 2025 Agentically Inc. All rights reserved.
Privacy PolicyTerms of UseAcceptable Use Policy